Why One Bernoulli Outcome Can Be a Test
A Bernoulli observation records whether a specified event occurs: the result is either success or failure. Even one such observation can provide evidence for choosing between two specified probabilities. The key is not to assume that a success always favors the alternative. Instead, compare how likely each possible outcome is under the null and alternative hypotheses.
This tutorial considers a single observation and two simple hypotheses. It derives the likelihood-ratio ordering of success and failure, then uses that ordering to identify the most powerful test at the resulting size. This is a compact application of the Neyman–Pearson framework, aligned with the SOA VEE Mathematical Statistics syllabus.
A test can be represented by a function \(\phi(X)\), where \(\phi(X)=1\) means reject \(H_0\) and \(\phi(X)=0\) means do not reject. For a nonrandomized test, each outcome is either rejected or not rejected. Since \(X\) has only two possible outcomes, the test can be described by saying whether it rejects on success, failure, both, or neither.
Likelihoods and the Rejection Outcome
For a Bernoulli observation, the probability of the observed value \(x\) under success probability \(p\) is \(p^x(1-p)^{1-x}\). Thus the likelihood under each hypothesis can be calculated separately for \(x=1\) and \(x=0\). The likelihood ratio below uses alternative likelihood divided by null likelihood; outcomes with larger ratios favor \(H_1\) more strongly.
The two likelihood ratios are
The Neyman–Pearson principle says to place rejection probability on outcomes with larger alternative-to-null likelihood ratio when seeking the most powerful test at a given size. For one Bernoulli observation, the ordering is especially simple: compare these two ratios. The algebra shows that their ordering is determined by whether \(p_1\) is greater or less than \(p_0\).
Why the Ordering Works
The ratio comparison follows directly by cross-multiplication, which is valid because \(p_0\) and \(1-p_0\) are positive. Success has the larger likelihood ratio precisely when
The last equivalence holds because the terms \(-p_0p_1\) on both sides cancel. If \(p_1<p_0\), the inequalities reverse and failure has the larger ratio. In either case, the observation that is relatively more likely under \(H_1\) is the natural one on which to reject \(H_0\).
This also explains the most-powerful choice. For any test function \(\phi\), its size and power are
Each unit of null probability assigned to rejection contributes power in proportion to that outcome's likelihood ratio. Therefore, if one outcome has the larger ratio, rejecting on it is more effective at detecting \(H_1\) than rejecting on the lower-ratio outcome. In a one-observation problem with unequal ratios, the test that rejects on the larger-ratio outcome is the likelihood-ratio test.
Worked Tests
Worked Example: A Positive Result Is Evidence for the Alternative
A hypothetical one-time screening indicator is recorded as \(X=1\) if positive and \(X=0\) if negative. Suppose \(X\sim\operatorname{Bernoulli}(0.20)\) under \(H_0\), and \(X\sim\operatorname{Bernoulli}(0.65)\) under \(H_1\). Find the likelihood-ratio test, its size and power, and its Type II error probability.
Method. Calculate the alternative-to-null likelihood ratio for each outcome, reject on the larger-ratio outcome, and evaluate that rejection event under both hypotheses.
For a positive result, the likelihood ratio is \(0.65/0.20=3.25\). For a negative result, it is \(0.35/0.80=0.4375\). Since \(3.25>0.4375\), success (a positive result) has the larger likelihood ratio. The test rejects \(H_0\) when \(X=1\).
Under \(H_0\), the rejection event has probability \(P_{p_0}(X=1)=0.20\), so the size is \(0.2000\). Under \(H_1\), the same event has probability \(P_{p_1}(X=1)=0.65\), so the power is \(0.6500\). The Type II error probability is the probability of not rejecting under \(H_1\): \(P_{p_1}(X=0)=1-0.65=0.3500\).
Check. Size plus the probability of not rejecting under \(H_0\) is \(0.20+0.80=1\). Power plus Type II error probability is \(0.65+0.35=1\). A common mistake would be to call \(0.35\), the probability of a negative result under \(H_1\), the size; it is instead the Type II error probability.
Worked Example: Failure Is Evidence for the Alternative
A hypothetical equipment check records \(X=1\) for a component that passes and \(X=0\) for one that fails. Suppose \(X\sim\operatorname{Bernoulli}(0.72)\) under \(H_0\), while \(X\sim\operatorname{Bernoulli}(0.38)\) under \(H_1\). Find the likelihood-ratio test, its size, power, and Type II error probability.
Method. Compare the likelihood ratios for passing and failing; do not assume that the outcome labelled “success” must support the alternative.
For a pass, the ratio is \(0.38/0.72=19/36\approx0.5278\). For a failure, it is \(0.62/0.28=31/14\approx2.2143\). Since \(2.2143>0.5278\), failure has the larger likelihood ratio. The test rejects when \(X=0\).
Under the null, failure has probability \(1-0.72=0.28\), so the size is \(0.2800\). Under the alternative, failure has probability \(1-0.38=0.62\), so the power is \(0.6200\). The Type II error probability is the probability of a pass under the alternative, \(0.38\), or \(0.3800\).
Check. Under \(H_0\), pass and failure probabilities sum to \(0.72+0.28=1\); under \(H_1\), they sum to \(0.38+0.62=1\). The common trap is to reject on a pass solely because it is called “success.” Here \(p_1<p_0\), so a pass is less likely under the alternative and a failure is the evidence against \(H_0\).
Worked Example: Comparing Both Candidate Rejection Outcomes
A hypothetical binary audit records \(X=1\) when an item meets a stated criterion. Under \(H_0\), \(X\sim\operatorname{Bernoulli}(0.45)\); under \(H_1\), \(X\sim\operatorname{Bernoulli}(0.70)\). Compare the tests that reject only on success and only on failure, then identify the likelihood-ratio test and calculate its size and power.
Method. Calculate both ratios first, then compare each candidate's size and power. This makes clear why the lower-ratio outcome is not the Neyman–Pearson choice.
For success, the ratio is \(0.70/0.45=14/9\approx1.5556\). For failure, the ratio is \(0.30/0.55=6/11\approx0.5455\). Success has the larger ratio, so the likelihood-ratio test rejects only on success.
For this test, size is \(P_{0.45}(X=1)=0.45\), or \(0.4500\), and power is \(P_{0.70}(X=1)=0.70\), or \(0.7000\). For comparison, a test that rejects only on failure has size \(1-0.45=0.55\), or \(0.5500\), and power \(1-0.70=0.30\), or \(0.3000\). The latter spends more null probability on rejection yet has lower power.
Check. The likelihood-ratio test rejects on the outcome with the larger ratio, not simply on whichever test has a larger size. Its Type II error probability is \(1-0.70=0.3000\). A common error is to treat the test with size \(0.55\) as automatically more powerful because it rejects more often overall; size is measured under \(H_0\), whereas power is measured under \(H_1\).
Size and Power at a Glance
The formulas for the likelihood-ratio test depend on the direction of the specified alternative. They follow by taking the probability of the selected outcome under each hypothesis. The Type II error probability, often denoted \(\beta\) for this specified alternative, is one minus the power.
| Relation between probabilities | Reject when | Size | Power | Type II error probability |
|---|---|---|---|---|
| \(p_1>p_0\) | \(X=1\) | \(p_0\) | \(p_1\) | \(1-p_1\) |
| \(p_1<p_0\) | \(X=0\) | \(1-p_0\) | \(1-p_1\) | \(p_1\) |
These are the size and power of the stated nonrandomized likelihood-ratio test. For a single Bernoulli observation, the size of a deterministic test can only be \(0\), \(p_0\), \(1-p_0\), or \(1\), corresponding to rejecting on neither outcome, success only, failure only, or both. Consequently, an arbitrary target size need not be attainable by a nonrandomized test. When a specified size falls between attainable values, randomization at a boundary can be considered; the likelihood-ratio ordering still determines which outcome is considered first.
Common Exam Traps
- Reversing the likelihood ratio. This tutorial uses alternative likelihood divided by null likelihood. If the ratio is reversed, smaller rather than larger values favor the alternative; either convention works only if applied consistently.
- Assuming success always supports \(H_1\). Success has the larger ratio only when \(p_1>p_0\). When \(p_1<p_0\), failure is the more informative outcome in favor of \(H_1\).
- Mixing up size and power. Size is calculated using the null probability, while power uses the alternative probability. The rejection event is the same in both calculations.
- Confusing power with the probability of a correct conclusion in every circumstance. Power is specifically the probability of rejection when the stated alternative is true. It is not the probability that \(H_1\) is true after observing an outcome.
- Extending a one-observation rule to a sample without checking the model. This derivation concerns one Bernoulli observation. A sample of several Bernoulli observations has a different set of possible outcomes and requires its own likelihood calculation.
Check Your Understanding
For each problem, identify the likelihood-ratio rejection outcome and calculate the requested operating probabilities.
- A hypothetical indicator has \(X\sim\operatorname{Bernoulli}(0.25)\) under \(H_0\) and \(X\sim\operatorname{Bernoulli}(0.60)\) under \(H_1\). Find both likelihood ratios, the rejection outcome, size, and power. (Answer: \(\Lambda(1)=2.4000\), \(\Lambda(0)=0.5333\); reject on success; size \(0.2500\); power \(0.6000\).)
- A hypothetical inspection passes with probability \(0.65\) under \(H_0\) and \(0.30\) under \(H_1\). Find the rejection outcome, size, power, and Type II error probability. (Answer: reject on failure; size \(0.3500\); power \(0.7000\); Type II error probability \(0.3000\).)
- For \(H_0:p=0.40\) versus \(H_1:p=0.40\), calculate both likelihood ratios and explain what the observation can distinguish. (Answer: both ratios equal \(1\); the hypotheses specify the same distribution, so no test based on this observation can have power different from its size.)
- A hypothetical process has success probability \(0.80\) under \(H_0\) and \(0.50\) under \(H_1\). Calculate the likelihood ratio for each outcome, identify the rejection region, and find size and power. (Answer: \(\Lambda(1)=0.6250\), \(\Lambda(0)=2.5000\); reject on failure; size \(0.2000\); power \(0.5000\).)
- For \(H_0:p=0.35\) versus \(H_1:p=0.65\), a test rejects only on success. Calculate its size, power, and Type II error probability, and verify that it rejects on the larger-ratio outcome. (Answer: \(\Lambda(1)=1.8571\), \(\Lambda(0)=0.5385\); size \(0.3500\); power \(0.6500\); Type II error probability \(0.3500\).)