Tutorials › VEE Mathematical Statistics › Likelihood-Ratio Ordering of Sample Outcomes

VEE Mathematical Statistics · Neyman-Pearson Testing · Tutorial 609 of 880

Likelihood-Ratio Ordering of Sample Outcomes

Build and interpret the alternative-to-null likelihood ratio to compare how strongly observed outcomes support two specified models.

Advanced 13 min read

What You'll Learn

  • Define the likelihood ratio using the probability mass functions or densities under two simple hypotheses.
  • Calculate likelihood ratios for independent samples and identify how the sample outcome affects the result.
  • Rank outcomes by their relative support for the alternative versus the null.
  • Use log likelihood ratios to simplify products while preserving the ranking.
  • Distinguish a likelihood ratio from a probability that either hypothesis is true.
  • Identify support, direction, and reversal errors when interpreting a likelihood ratio.

Why Compare the Likelihoods of Two Hypotheses?

A test of two simple hypotheses compares two fully specified models for the data. Once a sample outcome is observed, one useful question is: which model assigns that outcome the greater likelihood, and by how much? The likelihood ratio gives a numerical comparison. It also lets us rank possible outcomes according to how strongly they favor one model over the other.

This tutorial focuses on constructing and interpreting that ratio. Ranking outcomes is not, by itself, a complete testing procedure: a decision rule also requires a specified testing framework and, for example, a rule for controlling error. The likelihood ratio is the comparison of the two models at the observed data.

Definition: Let \(H_0\) and \(H_1\) be two simple hypotheses. For observed sample outcome \(x\), let \(L_0(x)\) and \(L_1(x)\) denote the likelihoods of that outcome under \(H_0\) and \(H_1\), respectively. Define the alternative-to-null likelihood ratio by $$ \Lambda(x)=\frac{L_1(x)}{L_0(x)}. $$ When the sample has a probability mass function, its likelihood is the probability mass assigned to the observed outcome. For a continuous sample, its likelihood is the joint density evaluated at that outcome. This tutorial uses the alternative-to-null convention throughout.

The direction of the ratio matters. If \(\Lambda(x)>1\), the observed outcome has greater likelihood under \(H_1\) than under \(H_0\), so it relatively favors the alternative. If \(\Lambda(x)<1\), it relatively favors the null. A ratio equal to 1 means the two hypotheses assign equal likelihood to that outcome.

A likelihood ratio is not a probability that a hypothesis is true. For example, \(\Lambda(x)=4\) means that the observed outcome is four times as likely under \(H_1\) as under \(H_0\), according to the specified models. It does not mean there is a 4-to-1 probability that \(H_1\) is true.

Constructing the Ratio for a Sample

For independent observations, the joint likelihood under either hypothesis is the product of the individual probability masses or densities. Therefore, the likelihood ratio is the product of the individual likelihood ratios. This gives a direct way to calculate and compare sample outcomes.

Result: If \(X_1,\ldots,X_n\) are independent under both simple hypotheses, with individual probability mass functions or densities \(f_0\) under \(H_0\) and \(f_1\) under \(H_1\), then $$ \Lambda(x_1,\ldots,x_n) =\frac{\prod_{j=1}^n f_1(x_j)}{\prod_{j=1}^n f_0(x_j)} =\prod_{j=1}^n \frac{f_1(x_j)}{f_0(x_j)}, $$ provided the denominator is positive. The functions are probability mass functions in a discrete model and densities in a continuous model.

The product form follows because independence makes the joint likelihood under each hypothesis a product. Dividing those two products pairs the alternative and null contribution for each observation. Equivalently, taking logarithms turns the product into a sum:

$$ \log \Lambda(x_1,\ldots,x_n) =\sum_{j=1}^n \log\!\left(\frac{f_1(x_j)}{f_0(x_j)}\right). $$

Because the logarithm is strictly increasing, ranking outcomes by \(\Lambda(x)\) gives exactly the same ranking as by \(\log\Lambda(x)\). Logarithms can make products easier to compare, but the direction of the comparison does not change.

Worked Example: Ranking Bernoulli Sample Outcomes

A hypothetical quality audit records four independently selected components. Let \(X_j=1\) if component \(j\) passes inspection and \(X_j=0\) otherwise. Under \(H_0\), each component passes with probability \(p_0=0.25\); under \(H_1\), each passes with probability \(p_1=0.50\). The outcomes are independent under either hypothesis. Find the likelihood ratio for a sample with \(k\) passes and rank the possible values of \(k\).

Method. Use the Bernoulli probability mass for each observation, then multiply the four likelihood contributions. For a pass, the alternative-to-null ratio is \(0.50/0.25=2\). For a failure, it is \(0.50/0.75=2/3\). Thus

$$ \Lambda(k)=2^k\left(\frac{2}{3}\right)^{4-k}. $$

Evaluate this expression for each possible number of passes:

  • \(k=0\): \(\Lambda(0)=(2/3)^4=16/81\approx 0.1975\).
  • \(k=1\): \(\Lambda(1)=2(2/3)^3=16/27\approx 0.5926\).
  • \(k=2\): \(\Lambda(2)=2^2(2/3)^2=16/9\approx 1.7778\).
  • \(k=3\): \(\Lambda(3)=2^3(2/3)=16/3\approx 5.3333\).
  • \(k=4\): \(\Lambda(4)=2^4=16\).

The ratios increase with the number of passes. The outcome with no passes relatively favors \(H_0\); the outcome with four passes relatively favors \(H_1\). All ordered sample sequences with the same number of passes have the same ratio because their products contain the same numbers of pass and failure factors.

Check. At \(k=2\), the likelihood under \(H_1\) is \((0.50)^2(0.50)^2=0.0625\); under \(H_0\), it is \((0.25)^2(0.75)^2=0.03515625\). Their ratio is \(0.0625/0.03515625=16/9\), as calculated. A common mistake is to use the failure probability under \(H_1\) as \(0.50\) but the pass probability under \(H_0\) as \(0.75\); the pass probability under \(H_0\) is \(0.25\), while its failure probability is \(0.75\).

Likelihood Ratios for Continuous Outcomes

For continuous observations, use the densities specified by the hypotheses. The value of a density at a point is not the probability of observing exactly that point. Instead, it describes relative density at that point, and the ratio of the two densities compares the models locally. The same alternative-to-null interpretation applies.

Worked Example: Comparing Two Normal Mean Models

A hypothetical monitoring system records two independent measurement errors, \(X_1\) and \(X_2\), in units on a calibrated scale. Under \(H_0\), each has distribution \(N(10,4)\); under \(H_1\), each has distribution \(N(11,4)\). Thus, in both hypotheses, the variance is \(\sigma^2=4\). Compare the likelihood ratios for the observed samples \((10,10)\), \((10.5,10.5)\), and \((12,10)\).

Method. For a normal density with mean \(\mu\) and variance \(4\), the density at \(x\) is proportional to \(\exp(-(x-\mu)^2/8)\). The shared normalizing constant cancels in the ratio. For one observation, the alternative-to-null ratio is therefore

$$ \exp\!\left(\frac{(x-10)^2-(x-11)^2}{8}\right) =\exp\!\left(\frac{2x-21}{8}\right). $$

For two independent observations, multiply the two contributions:

$$ \Lambda(x_1,x_2) =\exp\!\left(\frac{2x_1-21+2x_2-21}{8}\right) =\exp\!\left(\frac{x_1+x_2-21}{4}\right). $$

Now substitute each sample outcome:

  • For \((10,10)\), the sum is \(20\), so \(\Lambda=\exp((20-21)/4)=e^{-0.25}\approx 0.7788\).
  • For \((10.5,10.5)\), the sum is \(21\), so \(\Lambda=\exp(0)=1\).
  • For \((12,10)\), the sum is \(22\), so \(\Lambda=\exp((22-21)/4)=e^{0.25}\approx 1.2840\).

Among these outcomes, \((12,10)\) relatively favors \(H_1\) most, while \((10,10)\) relatively favors \(H_0\). The samples \((12,10)\) and \((10,12)\) have the same likelihood ratio because both have sum \(22\).

Check. For \((10,10)\), the exponent in the numerator-to-denominator density ratio is \(((0)^2-(1)^2+ (0)^2-(1)^2)/8=-2/8=-0.25\), agreeing with \(e^{-0.25}\). A common mistake is to use the standard deviation \(2\) as though it were the variance in the density formula. The exponent denominator is \(2\sigma^2=8\), not \(2\sigma=4\).

Outcome-by-Outcome Evidence and Ties

When an outcome consists of several independent categorical observations, it is often convenient to calculate a ratio for each category and multiply. This makes clear both the direction of the evidence contributed by each observation and how those contributions combine. A contribution greater than 1 favors \(H_1\); a contribution less than 1 favors \(H_0\); a contribution equal to 1 does not distinguish the hypotheses for that observation.

Worked Example: Combining Contributions From Three Categories

A hypothetical inspection records one of three mutually exclusive labels, \(A\), \(B\), or \(C\), on each item. Items are sampled independently. Under \(H_0\), the probabilities of \((A,B,C)\) are \((0.50,0.30,0.20)\); under \(H_1\), they are \((0.20,0.30,0.50)\). Compare the ordered outcomes \((A,C)\), \((B,B)\), \((C,C)\), and \((A,A)\).

Method. First calculate the alternative-to-null ratio for each label:

  • For \(A\), the contribution is \(0.20/0.50=0.40\).
  • For \(B\), the contribution is \(0.30/0.30=1\).
  • For \(C\), the contribution is \(0.50/0.20=2.50\).

Independence means the two contributions multiply for each ordered pair:

  • \((A,C)\): \(\Lambda=0.40(2.50)=1\).
  • \((B,B)\): \(\Lambda=1(1)=1\).
  • \((C,C)\): \(\Lambda=2.50(2.50)=6.25\).
  • \((A,A)\): \(\Lambda=0.40(0.40)=0.16\).

Thus, \((C,C)\) most strongly favors \(H_1\) among these outcomes, and \((A,A)\) most strongly favors \(H_0\). The two outcomes with ratio 1 are equally likely under the two hypotheses: for \((A,C)\), the likelihoods are \(0.50(0.20)=0.10\) and \(0.20(0.50)=0.10\); for \((B,B)\), both likelihoods are \(0.30(0.30)=0.09\).

Check. For \((C,C)\), the likelihoods are \(0.20^2=0.04\) under \(H_0\) and \(0.50^2=0.25\) under \(H_1\), giving \(0.25/0.04=6.25\). Reversing the ratio would produce \(0.16\), which is the correct ratio for \((A,A)\), not for \((C,C)\).

Support, Interpretation, and Common Traps

The ratio is defined using the probability masses or densities of the models being compared. If \(L_0(x)>0\), the ratio is an ordinary nonnegative number. If \(L_0(x)=0\) but \(L_1(x)>0\), the alternative assigns positive likelihood where the null assigns none, and the alternative-to-null ratio is treated as infinite. If both likelihoods are zero, the outcome is outside the support of both models and the ratio does not provide a comparison there. In continuous models, these statements concern the chosen densities and their supports.

A further practical point is that shared positive factors cancel. For instance, a normalizing constant that is identical under both hypotheses need not be carried through the calculation. But a factor that depends on the hypothesis cannot be discarded. Always form the full likelihood under each hypothesis, then identify which terms genuinely cancel.

  • Reversing the ratio: Using \(L_0/L_1\) instead of the stated convention \(L_1/L_0\) reverses which outcomes have ratios above 1. If you use the reverse convention, label it clearly and reverse the interpretation consistently.
  • Confusing likelihood with probability of a hypothesis: The ratio compares how well the two specified models account for the observed outcome; it does not assign prior or posterior probabilities to the hypotheses.
  • Ignoring independence assumptions: The product formula applies when observations are independent under both models. Without independence, use the joint likelihood under each hypothesis rather than multiplying marginal likelihoods.
  • Using a density as a point probability: For a continuous observation, evaluate and compare densities. Do not describe the density at a point as the probability of that exact point.
  • Ranking by an unlabelled reciprocal: A reciprocal preserves the numerical information but reverses the ranking direction. State which hypothesis is in the numerator before interpreting values.
Key takeaway: With the alternative-to-null convention, \(\Lambda(x)>1\) means the observed outcome is more likely under the specified alternative than under the specified null. Larger ratios indicate stronger relative support for the alternative, while ratios below 1 favor the null. This is a comparison of likelihoods, not a probability that either hypothesis is true.

Check Your Understanding

For each problem, form the alternative-to-null likelihood ratio and interpret its direction.

  1. Three independent trials have success probability \(0.40\) under \(H_0\) and \(0.60\) under \(H_1\). The observed sequence is success, failure, success. Find its likelihood ratio. (Answer: \(1.5000\), so the outcome favors \(H_1\).)
  2. A single categorical observation has probability \(0.20\) under \(H_0\) and \(0.50\) under \(H_1\) when outcome \(D\) occurs. Find the likelihood ratio for observing \(D\). (Answer: \(2.5000\), so \(D\) is 2.5 times as likely under \(H_1\).)
  3. One observation has distribution \(N(5,9)\) under \(H_0\) and \(N(8,9)\) under \(H_1\), where the second parameter is the variance. If the observed value is \(7\), find the likelihood ratio to four decimals. (Answer: \(e^{1/6}\approx 1.1814\), so the value relatively favors \(H_1\).)
  4. Two independent Bernoulli trials have success probability \(0.20\) under \(H_0\) and \(0.40\) under \(H_1\). Find the likelihood ratio for each possible number \(k=0,1,2\) of successes, and rank the outcomes. (Answer: \(\Lambda(0)=0.5625\), \(\Lambda(1)=1.5000\), and \(\Lambda(2)=4.0000\); the ratios increase with \(k\).)
  5. Independent categorical observations have probabilities \((0.40,0.40,0.20)\) for \((A,B,C)\) under \(H_0\), and \((0.20,0.30,0.50)\) under \(H_1\). Find the likelihood ratio for the ordered sample \((B,C,A)\). (Answer: \((0.30/0.40)(0.50/0.20)(0.20/0.40)=0.9375\), so the sample slightly favors \(H_0\).)
Clinical Biostats