1use Statistics::PointEstimation; 2use Statistics::TTest; 3my @r1=(); 4my @r2=(); 5my $rand; 6 7 for($i=1;$i<=32;$i++) #generate a uniformly distributed sample with mean=5 8 { 9 10 $rand=rand(10); 11 push @r1,$rand; 12 $rand=rand(10)-2; 13 push @r2,$rand; 14 } 15 16 17my $ttest = new Statistics::TTest; 18$ttest->set_significance(90); 19$ttest->load_data(\@r1,\@r2); 20$ttest->output_t_test(); 21$ttest->set_significance(99); 22$ttest->print_t_test(); 23 24 25 26