One proportion test
What is-it?
A one proportion test, also known as a one-sample proportion test or a test of a single proportion, is a statistical method used to assess whether the proportion of a specific attribute or characteristic in a sample significantly differs from a hypothesized population proportion.
The one proportion test is commonly used when dealing with categorical data and aims to determine if the observed proportion in a single sample is statistically different from a predetermined value or a hypothesized proportion.
Data
\(x_1,\cdots,x_n\in\left\{0, 1\right\}\)
Assume date are realizations of random variables \(X_1,\cdots,X_n\overset{iid}{\sim}\mathcal{B}(\pi)\)
Reference proportion: \(\pi_0\)
Hypothesis
Null Hypothesis
- \(\mathcal{H}_0\): \(\pi=\pi_0\)
Alternative Hypotheses
Two-tailed: \(\pi\neq\pi_0\)
Left-tailed: \(\pi <\pi_0\)
Right-tailed: \(\pi > \pi_0\)
Test Statistic
Observed proportion: \(p=\dfrac{1}{n}\sum_{i=1}^nX_i\)
Variance of \(p\) under \(\mathcal{H}_0\): \(S^2\left(p\right)=\dfrac{\pi_0\left(1-\pi_0\right)}{n}\)
\(T=\dfrac{p-\pi_0}{\sqrt{S^2\left(p\right)}}\ \overset{\mathcal{H}_0}{\rightarrow}\ \mathcal{N}(0, 1)\)
Critical region and P-value
Critical Region
Two-tailed: \(W=\left(-\infty,-q_{1-\alpha/2}\right)\cup\left(q_{1-\alpha/2}, +\infty\right)\)
Left-tailed: \(W=\left(-\infty, q_{\alpha}\right)\)
Right-tailed: \(W=\left(q_{\alpha},+\infty\right)\)
where \(q_{\alpha}\equiv q_{\alpha}\left(\mathcal{N}(0, 1)\right)\)
P-value
Two-tailed: \(pValue=2\mathbb{P}\left(T>|T_{obs}|\right)\)
Left-tailed: \(pValue=\mathbb{P}\left(T<T_{obs}\right)\)
Right-tailed: \(pValue=\mathbb{P}\left(T>T_{obs}\right)\)
Decision
Based on the Critical Region
- Reject \(\mathcal{H}_0\) if and only if \(T_{obs}\in W\)
Based on the P-value
- Reject \(\mathcal{H}_0\) if and only if \(pValue<\alpha\)