Tutorials › VEE Mathematical Statistics › Normal Mean Tests With Unknown Variance

VEE Mathematical Statistics · Likelihood Ratio Tests · Tutorial 639 of 880

Normal Mean Tests With Unknown Variance

Learn how the unknown variance is estimated under each hypothesis and why the resulting likelihood ratio test is equivalent to a two-sided one-sample t test.

Advanced 12 min read

What You'll Learn

  • Set up the likelihood ratio for a normal sample with unknown mean and variance.
  • Find the variance maximum likelihood estimates under the null and unrestricted models.
  • Express the likelihood ratio in terms of the one-sample t statistic.
  • Calibrate the test exactly using a Student t distribution.
  • Distinguish the variance maximum likelihood estimate from the unbiased sample variance.
  • Recognize when a two-sided likelihood ratio test is not the right directional test.

Why the Unknown Variance Changes the Test

When observations are normal and the variance is known, evidence about a specified mean can be assessed using a standardized sample mean. If the variance is unknown, it must also be estimated from the data. For a likelihood ratio test, that estimate is made separately under the null hypothesis and under the unrestricted model. The comparison of those two maximized likelihoods leads directly to the one-sample t statistic.

The test developed here concerns a sample from a normal population, with the null hypothesis that the population mean equals a specified value and the alternative allowing any other mean. This is a two-sided likelihood ratio test. Its exact small-sample calibration uses a Student t distribution, not a normal approximation.

Model and hypotheses: Let \(X_1,\ldots,X_n\) be independent observations from \(N(\mu,\sigma^2)\), where both \(\mu\) and \(\sigma^2>0\) are unknown parameters. We test \(H_0:\mu=\mu_0\) against \(H_1:\mu\ne\mu_0\), with \(\mu_0\) specified. The variance is a nuisance parameter: it is not the parameter being tested, but it must be estimated to form the likelihood ratio.

Write \(\bar X=n^{-1}\sum_{i=1}^n X_i\), and define the residual sum of squares about the sample mean by \(SSE=\sum_{i=1}^n(X_i-\bar X)^2\). The residual sum of squares if the mean is fixed at its null value is \(SSE_0=\sum_{i=1}^n(X_i-\mu_0)^2\). The identity \(SSE_0=SSE+n(\bar X-\mu_0)^2\) will be useful throughout.

Maximizing the Likelihood Under Both Models

For observed values \(x_1,\ldots,x_n\), the likelihood under the normal model is

$$ L(\mu,\sigma^2) =(2\pi\sigma^2)^{-n/2} \exp\left\{-\frac{1}{2\sigma^2}\sum_{i=1}^n(x_i-\mu)^2\right\}. $$

The likelihood ratio is the maximum likelihood under the null divided by the unrestricted maximum likelihood. Thus it is at most 1: a restricted model cannot fit better than the model with both parameters free. The variance is profiled out by maximizing the likelihood over \(\sigma^2\) separately for each model.

1
Unrestricted fit.
For each fixed \(\sigma^2\), the likelihood is maximized over \(\mu\) at \(\widehat\mu=\bar x\). The residual sum of squares is then \(SSE\).
2
Null fit.
Under \(H_0\), the mean is fixed at \(\mu_0\). The residual sum of squares is \(SSE_0\), so only \(\sigma^2\) is maximized.
3
Profile the variance.
For a residual sum of squares \(Q>0\), the log likelihood as a function of \(\sigma^2\) is \(-\frac n2\log(2\pi\sigma^2)-Q/(2\sigma^2)\). Differentiating with respect to \(\sigma^2\) and setting the derivative to zero gives \(\widehat{\sigma}^2=Q/n\).
4
Compare the maxima.
Substituting the two variance estimates into the likelihood gives the ratio in terms of \(SSE\) and \(SSE_0\).

The variance estimate in this maximization is \(Q/n\), not \(Q/(n-1)\). The latter is the unbiased estimator of variance when the mean is estimated; it is not the maximum likelihood estimate used to maximize the likelihood. At the maximum, the exponential factor in the likelihood is \(\exp(-n/2)\) for either fit, so those factors cancel in their ratio. Consequently,

$$ \Lambda =\frac{\sup_{H_0}L}{\sup_{\mu,\sigma^2}L} =\left(\frac{SSE}{SSE_0}\right)^{n/2} =\left\{1+\frac{n(\bar x-\mu_0)^2}{SSE}\right\}^{-n/2}. $$
Condition: These formulas assume \(n\ge 2\) and \(SSE>0\), so that the unrestricted variance maximum is finite and positive. For a normal sample with \(n\ge2\), \(SSE=0\) has probability zero under the model. If all observations are identical, the likelihood can increase without bound as the variance approaches zero; the ordinary finite-variance maximum likelihood calculation above does not apply.

Expressing the Likelihood Ratio Using the t Statistic

For the exact t test, define the sample variance \(s^2=SSE/(n-1)\) and the one-sample statistic \(T=(\bar X-\mu_0)/(s/\sqrt n)\). Under \(H_0\), the normal model assumptions imply \(T\) has a Student t distribution with \(n-1\) degrees of freedom. The distinction between \(s^2\) and the variance maximum likelihood estimate matters: \(s^2\) is used to define the usual t statistic, while \(SSE/n\) is used in the likelihood maximization.

To connect the two, square the t statistic and use \(s^2=SSE/(n-1)\):

$$ T^2 =\frac{n(\bar X-\mu_0)^2}{s^2} =\frac{n(n-1)(\bar X-\mu_0)^2}{SSE}. $$

It follows that \(n(\bar X-\mu_0)^2/SSE=T^2/(n-1)\). Substituting this identity into the likelihood ratio gives the central relationship:

$$ \Lambda =\left(1+\frac{T^2}{n-1}\right)^{-n/2}. $$

This expression decreases as \(T^2\) increases. Therefore, a likelihood ratio test that rejects for sufficiently small \(\Lambda\) rejects for sufficiently large \(|T|\). At significance level \(\alpha\), the exact two-sided rejection rule is

$$ \text{Reject }H_0 \quad\Longleftrightarrow\quad |T|\ge t_{1-\alpha/2,n-1}, $$

where \(t_{1-\alpha/2,n-1}\) is the \(1-\alpha/2\) quantile of the Student t distribution with \(n-1\) degrees of freedom. This rule has size \(\alpha\) under the stated normal model. Equivalently, one may compare \(\Lambda\) with the corresponding cutoff \(\left(1+t_{1-\alpha/2,n-1}^2/(n-1)\right)^{-n/2}\).

The likelihood ratio statistic can also be written as \(-2\log\Lambda=n\log(1+T^2/(n-1))\). Its exact distribution under the null is determined by the t relationship above. A chi-square approximation to this statistic is an asymptotic consideration; it is not needed for the exact one-sample test.

Worked Applications

Worked Example: A Moderate Difference With Unknown Variance

A hypothetical quality-control study observes \(n=10\) independent measurements from a normal process. The sample mean is \(\bar x=52\), and \(SSE=81\). Test \(H_0:\mu=50\) against \(H_1:\mu\ne50\) at \(\alpha=0.05\). Find the t statistic, degrees of freedom, decision, and likelihood ratio.

Method. Use the sample variance \(SSE/(n-1)\) to form \(T\), then use the profiled likelihood formula. This avoids substituting the maximum likelihood variance into the t statistic.

Calculate the t statistic. Here \(s^2=81/9=9\), so \(s=3\), and the standard error is \(3/\sqrt{10}\). Therefore \(T=(52-50)/(3/\sqrt{10})=2\sqrt{10}/3\approx2.1082\). The degrees of freedom are \(10-1=9\).

The two-sided 5% critical value is \(t_{0.975,9}\approx2.2622\). Since \(2.1082<2.2622\), do not reject \(H_0\) at the 5% level.

Calculate the likelihood ratio. The null residual sum of squares is \(SSE_0=81+10(52-50)^2=81+40=121\). Thus \(\Lambda=(81/121)^5=(9/11)^{10}\approx0.1344\), rounded to four decimal places. The small ratio corresponds to appreciable evidence against the null, but it does not cross the 5% rejection threshold for this sample size.

Check. The t statistic is below its critical value, and the likelihood ratio is above its equivalent 5% cutoff. Both forms give the same decision.

Worked Example: A Large Standardized Difference

Suppose a hypothetical instrument produces \(n=8\) independent normal readings. The sample mean is \(\bar x=12.5\), \(SSE=14\), and the specified value is \(\mu_0=10\). Test the two-sided hypothesis at \(\alpha=0.05\), and calculate \(\Lambda\).

Method. Profile the variance under the null and unrestricted models, and use the t distribution for the exact decision.

Calculate the t statistic. The sample variance is \(s^2=14/7=2\), so \(s=\sqrt2\). Its standard error is \(\sqrt2/\sqrt8=0.5\). Therefore \(T=(12.5-10)/0.5=5\), with \(7\) degrees of freedom.

The two-sided 5% critical value is \(t_{0.975,7}\approx2.3646\). Since \(5>2.3646\), reject \(H_0\).

Calculate the likelihood ratio. The null residual sum of squares is \(SSE_0=14+8(12.5-10)^2=14+8(6.25)=64\). Hence \(\Lambda=(14/64)^{8/2}=(7/32)^4\approx0.0023\), rounded to four decimal places.

Check. The t statistic is far beyond its critical value, and the very small likelihood ratio is consistent with rejection. The method avoids treating the unknown variance as if it were known.

Worked Example: A Non-Rejection and the Variance Denominator Trap

A hypothetical normal population is sampled independently \(n=12\) times. The observed mean is \(\bar x=7.5\), the residual sum of squares is \(SSE=44\), and the null value is \(\mu_0=8\). At \(\alpha=0.10\), find the test statistic, decision, and likelihood ratio.

Method. Use \(SSE/(n-1)\) for the t statistic but \(SSE/n\) when profiling the likelihood. The two variance formulas serve different purposes.

Calculate the t statistic. We have \(s^2=44/11=4\), \(s=2\), and standard error \(2/\sqrt{12}=1/\sqrt3\). Thus \(T=(7.5-8)/(1/\sqrt3)=-\sqrt3/2\approx-0.8660\). There are \(11\) degrees of freedom. The two-sided 10% critical value is \(t_{0.95,11}\approx1.7959\), so \(|T|<1.7959\) and we do not reject \(H_0\).

Calculate the likelihood ratio. Here \(SSE_0=44+12(7.5-8)^2=44+3=47\). Therefore \(\Lambda=(44/47)^6\approx0.6732\), rounded to four decimal places.

Common mistake and correction. Using \(44/12\) as the sample variance for the t statistic would give the wrong standard error and the wrong statistic. The t statistic uses \(44/11\), because the sample variance has \(n-1\) degrees of freedom. The likelihood maximum, in contrast, uses the variance estimate \(44/12\); this is why its formula is based directly on \(SSE\).

Check. The magnitude of the t statistic is small and the likelihood ratio is not close to zero, agreeing with the non-rejection.

Scope and Common Exam Traps

The equivalence above applies to the likelihood ratio test of a specified mean against the unrestricted alternative \(\mu\ne\mu_0\), with a common unknown variance under both hypotheses. It is therefore a two-sided test: departures above and below \(\mu_0\) count as evidence. If the scientific alternative is specifically \(\mu>\mu_0\) or \(\mu<\mu_0\), a directional test uses a one-sided rejection region and its corresponding one-sided t critical value; one should not automatically apply the two-sided likelihood ratio rule.

  • Using the wrong variance denominator. Use \(SSE/(n-1)\) for the usual t statistic, but \(SSE/n\) for the normal variance maximum likelihood estimate.
  • Reversing the likelihood ratio. With \(\Lambda=\sup_{H_0}L/\sup L\), smaller values indicate greater conflict with the null. The reciprocal is not the convention used here.
  • Using a normal critical value in a small sample. With unknown variance, the exact statistic has \(n-1\) degrees of freedom under the normal model. The normal approximation is not the exact test.
  • Ignoring the alternative's direction. The likelihood ratio derived here is for a two-sided alternative. A one-sided question requires a one-sided decision rule.
  • Forgetting the model assumptions. The exact t calibration requires independent observations from a normal population. Without those assumptions, the exact small-sample result need not hold.
Key takeaway: For an independent normal sample with unknown variance, profiling the variance gives \(\Lambda=(1+T^2/(n-1))^{-n/2}\). Because this is a decreasing function of \(T^2\), the exact two-sided likelihood ratio test rejects precisely when the usual one-sample t statistic exceeds its Student t critical value in absolute magnitude.

Check Your Understanding

For each problem, assume independent observations from a normal population with unknown variance. Use a two-sided likelihood ratio test unless the question specifies otherwise.

  1. A sample has \(n=9\), \(\bar x=18\), and \(SSE=32\). Test \(H_0:\mu=20\) at level \(0.05\). Give \(T\), degrees of freedom, the decision, and \(\Lambda\). (Answer: \(T=-3.0000\), \(df=8\), reject; \(\Lambda=(8/17)^{9/2}\).)
  2. A sample has \(n=10\), \(\bar x=5.4\), and \(SSE=72\). Test \(H_0:\mu=5\) at level \(0.10\), and express the likelihood ratio exactly. (Answer: \(T=0.4472\), \(df=9\), do not reject; \(\Lambda=(45/46)^5\).)
  3. A sample has \(n=6\), \(\bar x=11\), and \(SSE=5\). Test \(H_0:\mu=10\) at level \(0.05\). Give the test decision and exact likelihood ratio. (Answer: \(T=\sqrt6\approx2.4495\), \(df=5\), do not reject; \(\Lambda=(5/11)^3\).)
  4. A sample has \(n=15\), \(\bar x=101.2\), and \(SSE=140\). Test \(H_0:\mu=100\) at level \(0.10\). Give \(T\), the degrees of freedom, decision, and likelihood ratio. (Answer: \(T\approx1.4697\), \(df=14\), do not reject; \(\Lambda=(175/202)^{15/2}\).)
  5. For \(n=12\), an observed one-sample statistic is \(T=2.20\). At level \(0.05\), determine the likelihood ratio and the decision for \(H_0:\mu=\mu_0\). (Answer: \(\Lambda=(25/36)^6\approx0.1122\), \(df=11\), do not reject because \(2.20<t_{0.975,11}\approx2.2010\).)
Clinical Biostats