perl进行z检验

use Statistics::Zed;
my $zed = Statistics::Zed->new();
my $p_value = $zed->p_value(tails => 1, observed => 30, expected => 0, variance => 100);
my $z_score = $zed->p2z(value => $p_value, tails => 1);
print "$p_value\t$z_score\n";

其中variance指方差,tails=>1表明单尾检验

posted on 2015-05-21 11:31  云中道长  阅读(258)  评论(0编辑  收藏  举报

导航