Skip to content

Commit

Permalink
Increase minimum z-score of normal approx. to binomial dist. problem
Browse files Browse the repository at this point in the history
The table in Stevens says to use P(Z < z) = 0.0001 for all z < -3.5,
which isn't accurate when z is still near -3.5, so we avoid this
making z >= -3.4.
  • Loading branch information
d-torrance committed Jul 6, 2022
1 parent fb68f2a commit f0a4e8b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ $p = 0.48;
$q = 1 - $p;
$mu = Compute($n*$p);
$sigma = Compute(sqrt($n*$p*$q));
$x = random(round(-3.5*$sigma + $mu), round(-2*$sigma+$mu));
$x = random(round(-3.4*$sigma + $mu), round(-2*$sigma+$mu));

$z = Compute(($x - $mu)/$sigma)->with(
tolType => 'absolute',
Expand Down

0 comments on commit f0a4e8b

Please sign in to comment.