TL;DR
A model often has two kinds of unknowns: the quantity you want to report, and the nuisance parameters the model needs but you do not care about. The profile likelihood fixes the quantity you want, and for each value of it takes the best possible setting of the nuisance parameters. What remains is a likelihood for the quantity of interest alone, which you can use for confidence intervals and tests as if it had been the only unknown.
Where you'll see it: in the confidence intervals that statistical software reports for a single effect in a model with many other unknowns, and in particle physics, where a signal strength is tested while background rates are nuisance parameters.
Intuition
Suppose you measure a quantity and also need to estimate its noise level. You want an interval for the quantity, but the noise level is in the way. Two bad options come to mind. You could pretend the noise level is known, which makes your interval too narrow. Or you could ignore the noise level altogether, which is not even a valid model.
The profile likelihood takes a middle path. Think of the full likelihood as a landscape over two axes: the quantity you care about, and the nuisance . For each fixed , walk along and find the highest point in that direction. Record that height. Doing this for every traces a ridge over the landscape, and the ridge is the profile. Its shape tells you how strongly the data favour each value of , with the nuisance parameter already set as well as the data allow.
The plot below uses the example worked out later in this lesson. The curve shows how far each value of the mean falls below its best value once the variance is set as well as the data allow. The dashed line is the cutoff for a 95 percent interval.
- profile ratio for the mean
- 95% cutoff (3.84)
The math
Write the model's parameters as a pair . Here is the parameter of interest, a vector or a single number, and collects the nuisance parameters. Let be the log-likelihood of the observed data, the Logarithm of the likelihood.
For each fixed value of , let be the value of that maximises . The profile log-likelihood is
Let be the overall maximum likelihood estimate. The profile likelihood ratio statistic is
It is zero at the estimate and grows as moves away from it.
Read the definition in words. For each candidate , you pretend it is the truth and refit the nuisance parameters to that pretence. The profile is the best fit you get for that . The statistic measures how much worse that best fit is than the overall best fit, in units that will turn out to have a known distribution.
Using the statistic
Wilks' theorem says that under regularity conditions and for a true value of , is approximately chi-squared distributed. The degrees of freedom equal the number of components of being tested. For a single parameter of interest the reference distribution is , whose 95th percentile is .
So an approximate 95 percent confidence set for is
For one parameter, this set is usually an interval, and you read its endpoints off the profile.
Why it works with a nuisance parameter
Consider a Gaussian with unknown mean , the parameter of interest, and unknown variance , the nuisance parameter. For observations with sample mean and total squared deviation , the sum of squares for a candidate mean is
For a fixed , the variance that maximises the likelihood is . Substituting it back gives a profile that depends on only through . This closed form is what makes the Gaussian a good teaching case, and it leads to
The nuisance variance has disappeared from the formula, and only the mean remains. That is the point of profiling.
Worked examples
Take the data , from a Gaussian with unknown mean and variance . Here .
- The sample mean is , so the MLE of the mean is .
- The sum of squares about is .
- Apply the formula with : .
- At the statistic is , as it should be.
- At it is , below , so is inside the set.
- Solve for : , so .
- The approximate 95 percent set is .
The interpretation is that the two observations are compatible with a mean anywhere from about to . This interval is a poor approximation, because is far too small for Wilks' theorem to be accurate. The exact -based interval, which uses the sample variance and , is , about . Profiling is not a substitute for enough data, and this example shows the gap clearly.
Suppose , , and , so the unbiased sample variance is .
- Use the formula: .
- Set . Then , so the bracket equals .
- Then , which gives and .
- The profile interval is , that is .
- For comparison, the exact interval uses and , giving .
The profile interval is shorter than the exact one. This is a known feature of the approximation. The profile uses , which divides by rather than , and it treats the variance as if it were known once fitted. At ten observations the difference is visible, and it shrinks as grows.
A lab records measurements of a concentration. The sample mean is and the unbiased sample variance is , so .
- Set .
- Then , so the bracket equals .
- Then , which gives and .
- The profile interval is , that is .
- The exact interval uses and , giving .
The two intervals agree to within a few hundredths. At this sample size the approximation is good, and the lab can report either. The profile method has the advantage that it generalises to models where no closed form for the interval exists, which is the usual situation when the nuisance parameters are many or the model is not Gaussian.
Tradeoffs and failure modes
| Situation | What goes wrong | Better choice |
|---|---|---|
| Small sample | Wilks' theorem is inaccurate, and intervals can be too short or too long. | Simulate the distribution of , or use an exact method where one exists. |
| Many nuisance parameters, especially ones that grow with | The maximised nuisance values can be biased, and the profile can mislead. | Use conditional or marginal likelihood, or a Bayesian integration over . |
| Parameter at a boundary, such as a variance at zero | The reference is wrong; the correct mixture distribution is needed. | Use the boundary-adjusted reference distribution. |
| Likelihood with several flat ridges | The profile can have multiple maxima, and the maximisation over may find a local one. | Restart the optimiser from several starting points and check the profile curve. |
Profiling ignores the uncertainty in the nuisance parameters, which is why it can be too narrow in small samples. Marginal likelihood, which averages instead of maximises over , is the usual remedy when that matters.
History
The likelihood ideas behind this lesson go back to Ronald Fisher's work in the 1920s, which introduced maximum likelihood as a general estimation method and studied the role of nuisance parameters. Samuel Wilks published his result on the large-sample distribution of the likelihood ratio in 1938, which gave the reference used here. Jerzy Neyman and Elizabeth Scott's 1948 paper showed that maximum likelihood can give inconsistent estimates when the number of nuisance parameters grows with the sample, which is the reason for the caution in the tradeoffs table.
Recap
A nuisance parameter is needed to fit a model but is not the thing you want to report. The profile likelihood maximises over the nuisance parameters for each value of the parameter of interest, giving a one-dimensional likelihood. Wilks' theorem turns the profile into an approximate statistic, which gives intervals and tests. The method is accurate for large samples and needs care when samples are small or nuisance parameters are many. The next step is the likelihood ratio test, which uses the same statistic to compare two models.
Check yourself
QuestionIn one sentence, what does the profile likelihood do with the nuisance parameters?Show answer
It maximises the likelihood over the nuisance parameters separately for each fixed value of the parameter of interest, leaving a likelihood that depends only on the parameter of interest.
QuestionFor the data x = (1, 3), the profile ratio for the mean is Lambda(mu) = 2 log(1 + (mu - 2)^2). Compute Lambda at mu = 0 and state whether mu = 0 lies in the approximate 95 percent set.Show answer
At , , so . This is below , so lies inside the approximate 95 percent set. The set runs from about to , which contains .
QuestionWhy does the profile interval for the mean with n = 10 come out shorter than the exact t interval?Show answer
The profile fixes the variance at its maximum likelihood value, , and then applies a chi-squared reference. That ignores the extra uncertainty in estimating the variance, and it uses the approximation of Wilks' theorem, which is loose at small . The exact interval accounts for the estimated variance through the heavier tails of the distribution.
QuestionA model has a parameter of interest and four nuisance parameters, and you want a 95 percent interval for the parameter of interest. What reference value should you compare the profile statistic to, and why?Show answer
The parameter of interest is a single number, so the test has one degree of freedom, and the reference is the 95th percentile, . The four nuisance parameters do not change the degrees of freedom, because they are eliminated by maximising over them. They do affect how good the approximation is, and with many nuisance parameters the profile can mislead.
QuestionGive one reason to be cautious about profile likelihood intervals in a study with a small sample.Show answer
Wilks' theorem is an asymptotic result, so for small samples the true distribution of the statistic can differ substantially from , and the resulting interval can be too narrow or too wide. Checking against an exact method, or simulating the distribution, is the safer route.