Skip to contents

P(X <= x) ~ pnorm((x + 0.5 - n p) / sqrt(n p (1 - p))) (Hedderich, Sachs & Reynarowych 2023, eq 5.54); correct = FALSE drops the 0.5.

Usage

bnappx(x, n, p, correct = TRUE)

Arguments

x, n, p

Quantile, trials and success probability.

correct

Apply the continuity correction.

Value

Named list: z, approx, exact.

References

Hedderich, J., Sachs, L. & Reynarowych, Z. (2023). Applied Statistics: Methods Using R. Springer.

Examples

bnappx(3, 10, 0.4)
#> $z
#> [1] -0.3227486
#> 
#> $approx
#> [1] 0.3734428
#> 
#> $exact
#> [1] 0.3822806
#>