Test of one mean

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.

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\)

Hypothesis

Null Hypothesis \(\mathcal{H}_0\)

  • \(\mu = \mu_0\)

Alternative Hypothesis \(\mathcal{H}_1\)

  • Two-tailed test: \(\mu\neq \mu_0\)

  • Left-tailed test: \(\mu< \mu_0\)

  • Right-tailed test: \(\mu> \mu_0\)

Test Statistic

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)\)

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}\)

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)\)

Critical region and P-value

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)\)

Left-tailed Test

  • \(W=\left(-\infty, q_{\alpha}\left(\mathcal{N}(0, 1)\right)\right)\)

  • \(pValue = \mathbb{P}\left(T<T_{obs}\right)\)

Right-tailed Test

  • \(W=\left(q_{1-\alpha}\left(\mathcal{N}(0, 1)\right), +\infty\right)\)

  • \(pValue = \mathbb{P}\left(T>T_{obs}\right)\)

Decision

Decision by Critical Region

  • Reject \(\mathcal{H}_0\) if \(T_{obs}\in W\)

Decision by P-value

  • Reject \(\mathcal{H}_0\) if \(pValue<\alpha\)