Tutorials › VEE Mathematical Statistics › Likelihood Ratios for Categorical Outcomes

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

Likelihood Ratios for Categorical Outcomes

Calculate likelihood ratios for categorical data, rank the outcomes, and construct a most powerful test by adding their null probabilities in order.

Advanced 10 min read

What You'll Learn

  • Define and calculate likelihood ratios for categorical outcomes under two simple hypotheses
  • Rank outcomes from strongest to weakest evidence for the alternative
  • Construct a most powerful test by accumulating probabilities under the null model
  • Calculate a test’s size and power from the two specified probability models
  • Handle tied likelihood ratios and a boundary that requires randomization
  • Recognize why reversing the likelihood-ratio convention reverses the ordering

Why Categorical Outcomes Need an Ordering

When an observation can fall into one of several categories, the labels themselves do not say which outcomes support a specified alternative hypothesis. A test should reject the null hypothesis for outcomes that are relatively more likely under the alternative, while controlling the probability of rejection when the null is true. Likelihood ratios provide that ordering, and the null probabilities determine how much probability is used to reach a target test size.

This construction applies to a simple null hypothesis and a simple alternative hypothesis: each specifies all probabilities in the model. It is aligned with the SOA VEE Mathematical Statistics syllabus. The examples below concern hypothetical categorical observations; interest rates and mortality assumptions are not applicable.

Definition: Let \(X\) have possible outcomes \(x_1,\ldots,x_k\). Under the simple null hypothesis \(H_0\), let \(P(X=x_j)=p_{0j}\); under the simple alternative \(H_1\), let \(P(X=x_j)=p_{1j}\). When \(p_{0j}>0\), the likelihood ratio in favor of \(H_1\) over \(H_0\) at outcome \(x_j\) is $$ \Lambda(x_j)=\frac{p_{1j}}{p_{0j}}. $$ A larger value means that outcome is more supportive of \(H_1\) relative to \(H_0\). For a test function \(\phi(x)\), where \(\phi(x)\) is the probability of rejecting \(H_0\) after observing \(x\), the size is \(E_0[\phi(X)]\) and the power is \(E_1[\phi(X)]\).

For a nonrandomized test, \(\phi(x)\) is either 0 or 1. A randomized test can have an intermediate value: if \(\phi(x)=0.2\), the test rejects with probability 0.2 when that outcome occurs. Randomization matters when a discrete outcome has too much null probability to include fully at the target size.

From Likelihood Ratios to a Most Powerful Test

To construct the test, sort the outcomes by decreasing \(\Lambda(x_j)\). Starting with the largest ratio, add the corresponding null probabilities \(p_{0j}\). Continue until adding the next outcome would exceed the desired size \(\alpha\). If necessary, randomize at that boundary outcome or across a tied group. The probabilities used to build the size are always the null probabilities, not the alternative probabilities.

Once the rejection probabilities are fixed, calculate the power using the alternative probabilities. In formulas, for a categorical observation,

$$ \text{size}=\sum_{j=1}^k p_{0j}\phi(x_j), \qquad \text{power}=\sum_{j=1}^k p_{1j}\phi(x_j). $$

Here is a brief justification for why high-ratio outcomes should be used first. Suppose an amount of null probability is currently assigned to rejecting at an outcome \(a\), while an equal amount could instead be assigned at outcome \(b\), with \(\Lambda(b)>\Lambda(a)\). For a small reassignment of size \(\varepsilon\), the corresponding change in power is

$$ \varepsilon\left(\frac{p_{1b}}{p_{0b}}-\frac{p_{1a}}{p_{0a}}\right)>0. $$

The size stays the same, but power increases. Thus a test cannot be most powerful if it uses a lower-ratio outcome while leaving a higher-ratio outcome unused. This exchange argument explains the likelihood-ratio ordering behind the Neyman–Pearson construction. When ratios tie, exchanging probability within the tied group does not change power.

1
Calculate the ratios.
For every possible outcome, divide its probability under \(H_1\) by its probability under \(H_0\).
2
Rank the outcomes.
List them from largest likelihood ratio to smallest, keeping tied outcomes together.
3
Accumulate null probability.
Add the \(H_0\) probabilities in that order until the target size is reached or crossed.
4
Set the boundary rule and check.
If needed, randomize at the boundary. Verify the size under \(H_0\), then calculate power under \(H_1\).

Worked Categorical Tests

Worked Example: An Exact-Size Test With Four Possible Outcomes

A hypothetical claims-review system assigns each case one of four labels: A, B, C, or D. Under \(H_0\), the probabilities are \((0.40,0.30,0.20,0.10)\); under \(H_1\), they are \((0.10,0.20,0.40,0.30)\), in that order. Construct a most powerful test of size \(0.30\), and calculate its power. The categorical distribution and its parameters are fully specified by these probabilities; no interest or mortality assumption applies.

Method: likelihood-ratio ordering. Calculate \(p_{1j}/p_{0j}\) for each label:

$$ \Lambda(A)=\frac{0.10}{0.40}=0.25,\quad \Lambda(B)=\frac{0.20}{0.30}=\frac{2}{3},\quad \Lambda(C)=\frac{0.40}{0.20}=2,\quad \Lambda(D)=\frac{0.30}{0.10}=3. $$

The order from largest to smallest ratio is D, C, B, A. Under \(H_0\), the probability of D is \(0.10\). Adding C contributes another \(0.20\), for a total size of \(0.30\). Therefore, reject \(H_0\) when the label is C or D. The size is exactly \(0.10+0.20=0.30\).

Under \(H_1\), the probability of either rejection outcome is \(P_1(C)+P_1(D)=0.40+0.30=0.70\). The test’s power is \(0.70\).

Check: The rejection probability under the null is \(0.30\), as required, and the alternative probability of rejection is \(0.70\). This test avoids the mistake of ranking outcomes by their raw alternative probabilities alone: the ordering uses the ratio of alternative to null probability.

Worked Example: Two Independent Categorical Observations and a Randomized Boundary

A hypothetical monitoring process records two independent inspection outcomes, each in category A, B, or C. For each inspection, \(H_0\) specifies probabilities \((0.50,0.30,0.20)\), and \(H_1\) specifies \((0.20,0.30,0.50)\). Construct a most powerful test of size \(0.20\) and calculate its power. Independence and the stated categorical probabilities are the model assumptions; interest and mortality are not applicable.

For one observation, the likelihood ratios are

$$ \Lambda(A)=\frac{0.20}{0.50}=0.4,\qquad \Lambda(B)=\frac{0.30}{0.30}=1,\qquad \Lambda(C)=\frac{0.50}{0.20}=2.5. $$

For the ordered pair of observations, independence means that both the null and alternative likelihoods are products. Thus the pair’s likelihood ratio is the product of its two individual ratios. The largest ratio is for CC: \(2.5^2=6.25\). The next ratio is 2.5 for CB and BC. The next ratio is 1 for AC, CA, and BB.

Accumulate the null probabilities in that order. Under \(H_0\), \(P(CC)=0.20^2=0.04\), while \(P(CB)=P(BC)=0.20(0.30)=0.06\). The top group, CC, CB, and BC, therefore has null probability \(0.04+0.06+0.06=0.16\). The next tied group has null probability

$$ P(AC)+P(CA)+P(BB) =2(0.50)(0.20)+(0.30)^2 =0.20+0.09 =0.29. $$

The target size leaves \(0.20-0.16=0.04\) of null probability to allocate. Randomize equally across the tied ratio-1 outcomes with probability

$$ \gamma=\frac{0.04}{0.29}=\frac{4}{29}\approx 0.1379. $$

The test rejects for CC, CB, or BC, and rejects with probability \(4/29\) for AC, CA, or BB. Its size is \(0.16+(4/29)(0.29)=0.16+0.04=0.20\).

Under \(H_1\), the probability of the fully rejected group is \(P_1(CC)+P_1(CB)+P_1(BC)=0.25+0.15+0.15=0.55\). The boundary group has alternative probability \(2(0.20)(0.50)+(0.30)^2=0.20+0.09=0.29\). The power is therefore

$$ 0.55+\frac{4}{29}(0.29)=0.55+0.04=0.59. $$

Check: The size is \(0.20\) and the power is \(0.59\). The same randomization fraction applies to every outcome in the tied boundary group. Using the alternative probability of that group to choose \(\gamma\) would not produce the requested size.

Worked Example: Avoiding the Reversed-Ratio Trap

A hypothetical quality audit records one category, A, B, or C. Under \(H_0\), the probabilities are \((0.20,0.50,0.30)\); under \(H_1\), they are \((0.50,0.30,0.20)\). Construct a most powerful test of size \(0.25\), allowing randomization if needed, and calculate power. These are the full parameters of the categorical model; no interest or mortality assumption applies.

Method: rank by alternative probability divided by null probability. The ratios are

$$ \Lambda(A)=\frac{0.50}{0.20}=2.5,\qquad \Lambda(B)=\frac{0.30}{0.50}=0.6,\qquad \Lambda(C)=\frac{0.20}{0.30}=\frac{2}{3}. $$

The ranking is A, C, B because \(2.5>2/3>0.6\). Under \(H_0\), selecting A uses size \(0.20\), leaving \(0.25-0.20=0.05\). Outcome C has null probability \(0.30\), so reject with probability

$$ \gamma=\frac{0.05}{0.30}=\frac{1}{6} $$

when C occurs. Do not reject for B. The size is \(0.20+(1/6)(0.30)=0.25\). Under \(H_1\), the power is

$$ P_1(A)+\frac{1}{6}P_1(C) =0.50+\frac{1}{6}(0.20) =0.50+\frac{1}{30} =\frac{8}{15} \approx 0.5333. $$

Common mistake and correction. Reversing the ratio gives \(p_0/p_1\), which ranks the evidence in the opposite direction. For example, that reversed ratio is \(0.20/0.50=0.4\) for A and \(0.30/0.20=1.5\) for C, incorrectly placing C ahead of A. The Neyman–Pearson ordering for rejection in favor of \(H_1\) uses \(p_1/p_0\), so A must be used first.

Check: The null rejection probability is \(0.25\). The alternative rejection probability is \(8/15\), approximately \(0.5333\), rounded to four decimal places.

Practical Checks and Limits

A reliable construction keeps three probability calculations distinct: the likelihood ratio uses both models, the size uses probabilities under \(H_0\), and the power uses probabilities under \(H_1\). For independent observations, multiply the individual probabilities to obtain the joint likelihoods; do not rank a sample using only one observation’s ratio unless the sample has just one observation. If several outcomes tie, they have the same evidential strength for this test, even if their category labels differ.

The ratio \(p_1/p_0\) is directly defined when \(p_0>0\). If an outcome has zero probability under the null but positive probability under the alternative, it has infinite evidence ratio and can be included without increasing size. If the models assign zero probability to an outcome under both hypotheses, it cannot occur under either model and does not affect the test. Always check the models’ supports before applying a ratio formula.

  • Write which model is \(H_0\) and which is \(H_1\) before calculating ratios.
  • Order by \(p_1/p_0\), from largest to smallest, when testing \(H_0\) against \(H_1\).
  • Accumulate null probabilities to meet the size constraint; use alternative probabilities only when calculating power.
  • For a randomized boundary, divide the remaining size by the null probability of the outcome or tied group being randomized.

Check Your Understanding

For each problem, construct the likelihood-ratio ordering and use the stated null size. Unless a problem specifies randomization, allow it if required to attain the requested size. All scenarios are hypothetical categorical models; interest and mortality assumptions are not applicable.

  1. A single sensor report is A, B, or C. Under \(H_0\), the probabilities are \((0.55,0.25,0.20)\); under \(H_1\), they are \((0.25,0.35,0.40)\). Find a most powerful test of size \(0.20\) and its power. (Answer: reject for C; size \(0.20\), power \(0.4000\).)
  2. A single inspection outcome is A, B, or C, with \(H_0=(0.40,0.40,0.20)\) and \(H_1=(0.20,0.30,0.50)\). Find a most powerful test of size \(0.30\), including the boundary randomization, and calculate its power. (Answer: reject for C and reject for B with probability \(0.25\); power \(0.5750\).)
  3. Two independent observations each have categories A, B, C, with \(H_0=(0.60,0.30,0.10)\) and \(H_1=(0.20,0.30,0.50)\). Construct a most powerful test of size \(0.07\), and calculate its power. (Answer: reject for CC, CB, or BC; size \(0.0700\), power \(0.5500\).)
  4. A single outcome has categories A, B, C, with \(H_0=(0.20,0.50,0.30)\) and \(H_1=(0.50,0.30,0.20)\). Construct a most powerful test of size \(0.25\). Give the probability of rejection for each category and the power. (Answer: reject for A, reject for C with probability \(1/6\), and do not reject for B; power \(8/15\approx 0.5333\).)
Clinical Biostats