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表明单尾检验
时间: 2024-10-24 00:39:03