Learn R Programming

lrstat (version 0.2.13)

ClopperPearsonCI: Clopper-Pearson Confidence Interval for One-Sample Proportion

Description

Obtains the Clopper-Pearson exact confidence interval for a one-sample proportion.

Usage

ClopperPearsonCI(n, y, cilevel = 0.95)

Value

A data frame with the following variables:

  • n: The sample size.

  • y: The number of responses.

  • phat: The observed proportion of responses.

  • lower: The lower limit of the confidence interval.

  • upper: The upper limit of the confidence interval.

  • cilevel: The confidence interval level.

Arguments

n

The sample size.

y

The number of responses.

cilevel

The confidence interval level.

Author

Kaifeng Lu, kaifenglu@gmail.com

Examples

Run this code

ClopperPearsonCI(20, 3)

Run the code above in your browser using DataLab