Confidence interval of a proportion

What is-it?

  • A confidence interval of a proportion is a statistical range that provides an estimate of where the true population proportion is likely to fall. It is a way to quantify the uncertainty associated with estimating the population proportion based on a sample.

  • When we have a binary variable (e.g., success/failure, yes/no) and want to estimate the proportion of successes in a population, a confidence interval provides a range of values within which we can reasonably expect the true population proportion to lie.

Data and statistics

  • \(x_{1:n} = \left(x_1,\cdots, x_i,\cdots,x_n\right)\in\left\{0, 1\right\}^n\)

  • The observations \(x_{1:n}\) are supposed to be iid realizations of random variables \(X_{1:n}:=\left(X_1,\cdots,X_n\right)\), with \(X_i\overset{iid}{\sim}\mathcal{B}(\pi)\)

  • Observed proportion: \(p=\dfrac{1}{n}\sum_{i=1}^nX_i\)

  • The success and failure should not be “very” rare:

  • \(np \geq 5\) and \(n(1-p) \geq 5\)

Confidence interval of \(\pi\)

  • A procedure of CI (or asymptotic CI) at a confidence level \(\beta\) for a proportion \(\pi\) is a random interval \[IC_{\beta}=\left[T_{1,n}, T_{2,n}\right],\] where \(T_{1,n}=T_{1,n}\left(X_{1:n}\right)\) and \(T_{2,n}=T_{2,n}\left(X_{1:n}\right)\) are statistics that satisfy \[\mathbb{P}\left(T_{1,n}\leq\pi\leq T_{2,n}\right)\geq \beta=1-\alpha\] or \[\lim_{n\rightarrow +\infty}\mathbb{P}\left(T_{1,n}\leq\pi\leq T_{2,n}\right)\geq \beta=1-\alpha.\]

  • A confidence interval is obtained by replacing the random variables \(X_i\) in the procedure with the observed data \(x_i\).

  • \(S\left(p\right)=\sqrt{\dfrac{p(1-p)}{n}}\)

  • \(\dfrac{p-\pi}{S\left(p\right)}\rightarrow \mathcal{N}\left(0, 1\right)\),

  • \(CI_{1-\alpha}\left(\pi\right)\) \(=p\pm q_{1-\frac{\alpha}{2}}\left(\mathcal{N}(0, 1)\right)S\left(p\right)\)

  • \(T_{1,n}=p - q_{1-\frac{\alpha}{2}}\left(\mathcal{N}(0, 1)\right)S\left(p\right)\)

  • \(T_{2,n}=p + q_{1-\frac{\alpha}{2}}\left(\mathcal{N}(0, 1)\right)S\left(p\right)\)