Skip to contents

The default interval for a proportion here. It behaves sensibly at zero and at one, where the Wald interval does not.

Usage

wilson_ci(x, n, conf_level = 0.95)

Arguments

x

Number of successes. Vectorised.

n

Number of trials. Vectorised.

conf_level

Confidence level.

Value

A two-column matrix with columns lo and hi, on the 0-1 scale.

Examples

wilson_ci(80, 100)
#>             lo        hi
#> [1,] 0.7111708 0.8666331