Why the Sample Sum Determines the Test
Suppose a process produces independent waiting times, and the question is whether its event rate is one specified value or another. A larger rate means shorter waiting times on average; a smaller rate means longer ones. For a sample, the total waiting time summarizes the direction of the evidence: a large total tends to favor the smaller rate, while a small total tends to favor the larger rate.
The Neyman–Pearson approach makes this intuition precise for two simple hypotheses, each specifying one rate. The likelihood ratio ranks possible samples by how well they support the alternative relative to the null. In this model, that ranking depends on the observations only through their sum. The ratio’s direction then tells us which one-tail critical region to use.
Write \(T=\sum_{i=1}^n X_i\) for the sample sum. With the likelihood ratio defined as alternative likelihood divided by null likelihood, the joint density gives
For the most powerful test of a given size, the Neyman–Pearson lemma says to reject \(H_0\) when this ratio is sufficiently large. Whether that means a large or small value of \(T\) depends on the sign of \(\lambda_1-\lambda_0\).
| Rate comparison | How the likelihood ratio changes with \(T\) | Most powerful rejection region |
|---|---|---|
| \(\lambda_1>\lambda_0\) | Decreases as \(T\) increases | Small \(T\): \(T<c\) |
| \(\lambda_1<\lambda_0\) | Increases as \(T\) increases | Large \(T\): \(T>c\) |
The strict inequalities describe the critical region; in this continuous model, the probability of landing exactly on the boundary is zero. The test therefore needs no boundary randomization. The cutoff \(c\) is chosen to give the desired size under \(H_0\), or is specified directly when the task is to calculate the size and power of a particular test.
Deriving the Ratio and Its Direction
Independence means that the joint density is the product of the individual densities. Under a candidate rate \(\lambda\), this product is
Dividing the likelihood under \(H_1\) by the likelihood under \(H_0\) gives the stated ratio. Its only part that changes with the observed sample is \(\exp[-(\lambda_1-\lambda_0)T]\). If \(\lambda_1>\lambda_0\), its exponent becomes more negative as \(T\) grows, so the ratio falls and evidence for \(H_1\) occurs at small sums. If \(\lambda_1<\lambda_0\), the exponent increases with \(T\), so evidence for \(H_1\) occurs at large sums. This monotonicity is why the most powerful critical region is a single tail rather than two tails.
To find a size-\(\alpha\) cutoff, use the distribution of \(T\) under the null. The sum of \(n\) independent exponential observations with common rate \(\lambda\) has an Erlang distribution, a gamma distribution with shape \(n\) and rate \(\lambda\). For integer \(n\), its density and upper-tail probability are
The corresponding lower-tail probability is one minus the upper-tail probability. Thus, when \(\lambda_1<\lambda_0\), choose \(c\) to satisfy \(P_{\lambda_0}(T>c)=\alpha\); when \(\lambda_1>\lambda_0\), choose \(c\) to satisfy \(P_{\lambda_0}(T<c)=\alpha\). These formulas assume an uncensored sample of a fixed size \(n\) with a common exponential rate.
Worked Tests
Worked Example: A Larger Alternative Rate Gives a Lower-Tail Test
A hypothetical inspection process records two independent waiting times, in hours. Each is exponential with rate \(1\) per hour under \(H_0\), and rate \(3\) per hour under \(H_1\). Consider the likelihood-ratio test that rejects when \(\Lambda>1\). Find its critical region, size, and power.
Method and direction. Here \(n=2\), \(\lambda_0=1\), and \(\lambda_1=3\), so
Because this ratio decreases with \(T\), \(\Lambda>1\) is equivalent to a lower-tail rule. Solving the inequality gives \(9e^{-2T}>1\), or \(T<\frac{\ln 9}{2}\). The cutoff is about \(1.0986\) hours. For simpler arithmetic, instead consider the same lower-tail test with cutoff \(c=1\) hour.
Under a rate-\(\lambda\) exponential model with \(n=2\), \(P_\lambda(T<1)=1-e^{-\lambda}(1+\lambda)\). Therefore the size, evaluated at the null rate, is
The power is the probability of that same rejection region at the alternative rate:
Check. The cutoff \(1\) is below the ratio-threshold cutoff \(\frac{\ln 9}{2}\), so at \(T=1\), \(\Lambda=9e^{-2}\approx1.2180>1\). The specified ratio rule would reject there, while the cutoff-\(1\) test would not. These are different tests: the computed size and power above apply to the explicitly chosen cutoff \(T<1\), not to the original rule \(\Lambda>1\). The key mistake to avoid is silently treating a chosen sum cutoff as if it were the ratio cutoff.
Worked Example: A Single Waiting Time at a Target Size
A hypothetical monitoring system records one waiting time \(X\), in days. Test \(H_0:\lambda=2\) per day against \(H_1:\lambda=0.5\) per day using a test of size \(0.05\). Find the critical value and power.
Method and direction. The likelihood ratio is
It increases with \(x\), as expected because the alternative rate is smaller. The most powerful size-\(0.05\) test rejects for \(X>c\). Under \(H_0\), \(P(X>c)=e^{-2c}\), so set \(e^{-2c}=0.05\). Solving gives
Under \(H_1\), the power is \(P(X>c)=e^{-0.5c}\). Substituting the cutoff gives
Check. At the null rate, \(e^{-2c}=e^{-\ln 20}=0.05\), as required. The common error is to use the smaller-rate alternative to set the size cutoff. Size is defined under the null; the alternative rate is used to calculate power.
Worked Example: Finding a Sum Cutoff Numerically
A hypothetical system produces two independent waiting times, in hours. Test \(H_0:\lambda=1\) per hour against \(H_1:\lambda=0.5\) per hour at size \(0.10\). Find the critical value and calculate the power.
Method and direction. Since the alternative rate is smaller, the likelihood ratio \((0.5)^2e^{0.5T}\) increases with \(T\). Reject for \(T>c\). Under the null, the sum of two exponential observations has upper-tail probability \(e^{-c}(1+c)\). Thus \(c\) solves
This equation has no simple algebraic solution. Solving numerically gives \(c\approx3.8897\) hours: \(e^{-3.8897}\approx0.02045\), and \(0.02045(1+3.8897)\approx0.1000\). The power uses the same upper-tail formula with the alternative rate \(0.5\):
Check. The null upper-tail probability at the cutoff is \(0.1000\), while the alternative upper-tail probability is about \(0.4211\). Both rates are expressed per hour, so the cutoff is in hours. Mixing a rate per hour with a cutoff in another time unit would invalidate both calculations.
Common Mistakes and Practical Checks
The tail direction follows from the likelihood ratio, not from a memorized rule that “a large statistic rejects.” The test statistic \(T\) is not itself the likelihood ratio: depending on which rate is larger, high values of \(T\) can either favor or oppose the alternative.
- Reversing the ratio. If the ratio is defined as alternative likelihood divided by null likelihood, the Neyman–Pearson rejection rule is for a large ratio. Reversing the ratio requires reversing that comparison.
- Reversing the tail. When \(\lambda_1>\lambda_0\), large \(T\) makes the ratio smaller, not larger. Reject for small \(T\). When \(\lambda_1<\lambda_0\), reject for large \(T\).
- Calculating size at the alternative. Size is the rejection probability under \(H_0\); power is the rejection probability under \(H_1\).
- Ignoring the sample size. The sample sum’s distribution depends on \(n\). A one-observation exponential cutoff formula does not apply unchanged to a sum of several observations.
- Mixing time units. A rate of \(2\) per day must be paired with times measured in days. If the units change, convert the rate or the observations before using the formulas.
The result is useful because it reduces a likelihood comparison involving an entire sample to a one-dimensional calculation involving \(T\). Once the direction is established, the remaining work is to select a null-tail probability for the cutoff and evaluate that same rejection region under the alternative. This is aligned with the SOA VEE Mathematical Statistics syllabus.
Check Your Understanding
For each problem, identify the tail before calculating probabilities. Rates refer to the time unit stated in the problem, and the observations are independent exponential variables with the specified common rate.
- Two waiting times are observed in days under \(H_0:\lambda=4\) per day versus \(H_1:\lambda=1\) per day. In which direction does the likelihood ratio change as the sample sum increases, and which tail should a most powerful test use? (Answer: The ratio increases with the sum; reject for a large sum, \(T>c\).)
- One waiting time, in hours, is tested under \(H_0:\lambda=3\) per hour versus \(H_1:\lambda=1\) per hour at size \(0.20\). Find the cutoff and power. (Answer: Reject for \(X>c\), \(c=-\ln(0.20)/3\approx0.5365\) hours; power \(e^{-c}\approx0.5848\).)
- For two observations in days, test \(H_0:\lambda=2\) per day against \(H_1:\lambda=1\) per day using the rule \(T>1\). Find its size and power. (Answer: Size \(3e^{-2}\approx0.4060\); power \(2e^{-1}\approx0.7358\).)
- For three observations in hours, test \(H_0:\lambda=1\) per hour against \(H_1:\lambda=2\) per hour using \(T<2\). Find its size and power. (Answer: Size \(1-5e^{-2}\approx0.3233\); power \(1-13e^{-4}\approx0.7619\).)
- Two observations are tested under \(H_0:\lambda=1\) per day versus \(H_1:\lambda=0.5\) per day at size \(0.05\). State the tail and the equation that determines the critical value; give the value to four decimals. (Answer: Reject for large \(T\); solve \(e^{-c}(1+c)=0.05\), giving \(c\approx4.7439\) days.)