7 Test of one mean
7.1 What is-it?
The test of conformity of a mean compares the observed sample mean to the expected population mean and assesses whether any difference between the two is statistically significant.
It helps to determine whether the observed sample mean is representative of the population mean or if it is likely due to random sampling variability.
7.2 Data
\(x_i,\ i=1,\cdots,n\) modeled by \(X_i,\ i=1,\cdots,n\)
Assume that \(X_i,\ i=1,\cdots,n\) are iid
Let \(\mu=\mathbb{E}\left[X_i\right]=\mu\) and \(\sigma^2=\mathbb{V}ar\left(X_i\right)\)
Reference mean: \(\mu_0\)
Sample size: \(n\)
Sample mean: \(\overline{X}=\dfrac{1}{n}\sum_{i=1}^nX_i\)
Sample variance: \(S^2=\dfrac{1}{n}\sum_{i=1}^n\left(X_i-\overline{X}\right)^2\)
Unbiaised estimate of variance: \(\widehat{\sigma^2}=\dfrac{1}{n-1}\sum_{i=1}^n\left(X_i-\overline{X}\right)^2\)
7.3 Hypothesis
7.3.1 Null Hypothesis \(\mathcal{H}_0\)
- \(\mu = \mu_0\)
7.3.2 Alternative Hypothesis \(\mathcal{H}_1\)
Two-tailed test: \(\mu\neq \mu_0\)
Left-tailed test: \(\mu< \mu_0\)
Right-tailed test: \(\mu> \mu_0\)
7.4 Test Statistic
7.4.1 Gaussian Case with Known Variance
\(X_i\overset{iid}{\sim}\mathcal{N}\left(\mu,\sigma^2\right)\)
\(S\left(\overline{X}\right):=\sqrt{\dfrac{\sigma^2}{n}}\)
\(T=\dfrac{\overline{X}-\mu_0}{S\left(\overline{X}\right)}\overset{\mathcal{H}_0}{\sim}\mathcal{N}\left(0, 1\right)\)
7.4.2 Gaussian Case with Unknown Variance and \(n<30\)
\(X_i\overset{iid}{\sim}\mathcal{N}\left(\mu,\sigma^2\right)\)
\(S\left(\overline{X}\right):=\sqrt{\dfrac{S^2}{n-1}}\)
\(T=\dfrac{\overline{X}-\mu_0}{S\left(\overline{X}\right)}\overset{\mathcal{H}_0}{\sim}\mathcal{T}_{n-1}\)
7.4.3 Unknown Variance and \(n\geq 30\)
\(X_i\overset{iid}{\sim}\mathcal{N}\left(\mu,\sigma^2\right)\)
\(S\left(\overline{X}\right):=\sqrt{\dfrac{S^2}{n}}\)
\(T=\dfrac{\overline{X}-\mu_0}{S\left(\overline{X}\right)}\overset{\mathcal{H}_0}{\rightarrow}\mathcal{N}\left(0, 1\right)\)
7.5 Critical region and P-value
7.5.1 Two-tailed Test
\(W=\left(-\infty, q_{\alpha/2}\left(\mathcal{N}(0, 1)\right)\right)\) \(\cup\left(q_{1-\alpha/2}\left(\mathcal{N}(0, 1)\right), +\infty\right)\)
\(pValue = 2\mathbb{P}\left(T>|T_{obs}|\right)\)
7.5.2 Left-tailed Test
\(W=\left(-\infty, q_{\alpha}\left(\mathcal{N}(0, 1)\right)\right)\)
\(pValue = \mathbb{P}\left(T<T_{obs}\right)\)
7.5.3 Right-tailed Test
\(W=\left(q_{1-\alpha}\left(\mathcal{N}(0, 1)\right), +\infty\right)\)
\(pValue = \mathbb{P}\left(T>T_{obs}\right)\)
7.6 Decision
7.6.1 Decision by Critical Region
- Reject \(\mathcal{H}_0\) if \(T_{obs}\in W\)
7.6.2 Decision by P-value
- Reject \(\mathcal{H}_0\) if \(pValue<\alpha\)