Skip to contents

The exact tail is computed alongside, so the test is that the bound HOLDS – and separately that it is not vacuous, since a bound of 1 is always true and never useful.

Usage

morie_chernoff_bound(n, p, t, tail = c("upper", "lower"))

Arguments

n, p

Binomial parameters.

t

Threshold.

tail

"upper" or "lower".

Value

A list with bound, exact_tail, holds, vacuous, warnings.

References

Chernoff H (1952) Ann Math Stat 23(4):493-507.

Examples

morie_chernoff_bound(n = 5L, p = 0.5, t = 5L)
#> $bound
#> [1] 0.3807029
#> 
#> $exact_tail
#> [1] 0.03125
#> 
#> $holds
#> [1] TRUE
#> 
#> $vacuous
#> [1] FALSE
#> 
#> $slack
#> [1] 0.3494529
#> 
#> $mu
#> [1] 2.5
#> 
#> $delta
#> [1] 1
#> 
#> $tail
#> [1] "upper"
#> 
#> $n
#> [1] 5
#> 
#> $warnings
#> character(0)
#> 
#> $method
#> [1] "Chernoff bound (Chernoff 1952)"
#>