Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 37

Likelihood Ratio Tests for Simple Hypotheses

Recommended resources

Introduction

In our last lesson, you learned how to translate a real-world question into the formal language of hypothesis testing by stating a null hypothesis () and an alternative hypothesis (). This sets the stage for a statistical "trial." Now, we need the rules of that trial: how do we weigh the evidence provided by our data to reach a verdict?

This lesson addresses that very question. We will introduce the Likelihood Ratio Test (LRT), a powerful and fundamental method for constructing a decision rule. The core idea is beautifully simple and builds directly on concepts like likelihood that we've encountered before. We will ask: "Which hypothesis makes our observed data more probable?"

In line with your interest in the mathematical underpinnings, we won't just learn the rule; we will derive it from first principles. By the end of this lesson, you will be able to derive the LRT statistic for simple hypotheses and understand why it is considered the "best" possible test in this context.


1. The Principle of the Likelihood Ratio

Let's begin with a simple scenario. We have a set of observations , and we want to test between two simple hypotheses:

  • Null Hypothesis:
  • Alternative Hypothesis:

The likelihood function, which you'll recall from our discussions on Maximum Likelihood Estimation, tells us the probability (or probability density) of observing our data given a particular value of the parameter . We can write the likelihood under each hypothesis:

  • Likelihood under :
  • Likelihood under :

A natural way to decide between these two hypotheses is to compare their likelihoods. This is precisely what the likelihood ratio does:

The decision rule follows logically:

  • If is very large, the data are much more likely under than . This provides strong evidence against the null hypothesis, so we should reject .
  • If is small (close to 0), the data are much more likely under . This supports the null hypothesis, so we fail to reject .

This leads to the formal Likelihood Ratio Test:

Reject if

where is a critical value or threshold that we must choose. But how do we choose in a non-arbitrary way? And can we prove that this is a good decision rule? This brings us to one of the most celebrated results in hypothesis testing.


2. The Neyman-Pearson Lemma: Deriving the Optimal Test

Instead of just picking a threshold , let's frame the problem as an optimization, a perspective that should be familiar from your engineering background. We have two types of errors:

  • Type I Error (False Alarm/False Positive): Rejecting when it is true. The probability is .
  • Type II Error (Miss/False Negative): Failing to reject when it is false. The probability is .

The power of a test is the probability of correctly rejecting a false null hypothesis: .

The Neyman-Pearson approach is to fix the probability of a Type I error at a certain level (e.g., 5% or 1%) and find the test that maximizes the power (i.e., minimizes the Type II error ). This gives us the most powerful test for a given significance level .

The following video provides an elegant derivation of this optimal test using Lagrange multipliers, a technique you've likely used in mechanics and optimization.

Neyman-Pearson Test for Binary Hypothesis Testing

This video from Tim Schulz's channel shows how the Neyman-Pearson criterion for finding the most powerful test directly leads to the Likelihood Ratio Test. The use of Lagrange multipliers provides a direct and satisfying derivation.

Watch the first part of the video (00:00 - 03:13). Focus on how the problem is formulated as a constrained optimization problem and how applying the method of Lagrange multipliers naturally yields the likelihood ratio test.

As the video showed, maximizing the detection probability (power) subject to a fixed false alarm probability () leads to the decision rule: choose to reject in the region where . Rearranging this gives:

This is exactly the likelihood ratio test. The Lagrange multiplier becomes our decision threshold. We choose such that the resulting test has the desired Type I error rate, .

This result is formally stated in the Neyman-Pearson Lemma. For a deep dive into the formal statement and its proof, the following document is an excellent resource.

Lecture 3: Likelihood ratio tests, Neyman-Pearson detectors...

These lecture notes from the University of Chicago provide a rigorous treatment of the Neyman-Pearson Lemma. Reading the formal statement and its proof will solidify your understanding of why the LRT is optimal.

Please read Section 4, 'Neyman-Pearson Lemma' (pages 3-4). Pay close attention to the formal statement of the lemma and follow the steps of the proof. The proof elegantly shows that no other test can be more powerful than the LRT for a given significance level.


3. Practical Derivation of the Test Statistic

The abstract form is the principle, but in practice, we almost never compute the full likelihood ratio. Instead, we simplify the expression algebraically to get an equivalent test using a more convenient test statistic. Since the logarithm is a strictly increasing function, we can work with the log-likelihood ratio without changing the outcome of the test:

Reject if

Let's derive the test statistic for a common and important case.

Example: Mean of a Normal Distribution (Known Variance)

Suppose we have independent observations from a normal distribution with known variance and unknown mean . We want to test:

  • (let's assume )

1. Write the Likelihoods:
The PDF for a single observation is .
Since the observations are independent, the joint likelihood is the product:

2. Form the Log-Likelihood Ratio:

The log-likelihood is:

So the log-likelihood ratio becomes:

3. Simplify the Expression:
Let's expand the squared terms:



4. Formulate the Test:
The LRT is to reject if . Substituting our simplified expression:

Now, we just isolate , or even better, the sample mean . Since we assumed , the term is positive, so the inequality direction is preserved.


The entire right-hand side is just a constant that depends on and . We can call this new threshold .

This is a remarkable result! The "most powerful test" boils down to a simple rule: reject the null hypothesis if the sample mean is greater than some critical value. This is far more intuitive and computationally simpler than calculating the full likelihood ratio. The threshold is chosen to give the desired significance level .

To see this derivation and another one for Bernoulli trials laid out, please review the following resource.

Topic 17: Simple Hypotheses

These notes from the University of Arizona provide clear, step-by-step derivations for applying the LRT to practical examples. The examples for the normal distribution and Bernoulli trials are particularly illuminating.

Please read Section 3 'Examples' (pages 3-5). Focus on 'Example 2' (Normal observations) and 'Example 7' (Bernoulli trials). Follow the algebraic steps that simplify the likelihood ratio into a test based on the sample mean or the sum of successes.


Conclusion

In this lesson, we bridged the gap between formulating hypotheses and making a decision. You derived the Likelihood Ratio Test, one of the cornerstones of statistical inference, and understood its foundational importance.

Key Takeaways:

  • Likelihood Ratio (): The ratio of the data's likelihood under the alternative hypothesis to its likelihood under the null hypothesis. It quantifies which hypothesis is better supported by the data.
  • Likelihood Ratio Test (LRT): A decision rule that rejects if the likelihood ratio exceeds a certain threshold .
  • Neyman-Pearson Lemma: This fundamental theorem proves that for simple hypotheses, the LRT is the most powerful test. It yields the highest possible probability of detecting a true effect for a given acceptable rate of false alarms ().
  • Practical Simplification: The abstract LRT often simplifies algebraically into an equivalent test on a simple, intuitive statistic like the sample mean () or the number of successes.

Preview of the Next Lesson:

We have established a method for creating the best test for a given significance level . But what is the relationship between , the Type II error , and the sample size ? In our next lesson, we will explore the mathematical trade-off between Type-I and Type-II errors and the concept of statistical power. This will allow us to not only perform tests but also to evaluate their performance and design effective experiments.