View source: R/solve_p0_score_ci.R
solve_p0_score_ci | R Documentation |
This function calculates the adjusted proportion estimate (p0) and the confidence interval for a given proportion estimate (p_hat) and sample size (n) using the score method.
solve_p0_score_ci(p_hat, n, z = 1.96)
p_hat |
Numeric value. The proportion estimate. Must be between 0 and 1. |
n |
Numeric value. The sample size. Must be a positive integer. |
z |
Numeric value. The z-score for the desired confidence level. Default is 1.96 (approximately 95% confidence interval). |
A list with two elements:
p0 |
The adjusted proportion estimate. |
confidence_interval |
A numeric vector of length 2 containing the lower and upper bounds of the confidence interval. |
solve_p0_score_ci(p_hat = 9/10, n = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.