TL;DR
Most models have more than one unknown. A study asks about one quantity, the parameter of interest, but the model also needs others to describe the noise or the setting. Those others are nuisance parameters. You need them to fit the model, and you do not want to report them. The job is to use them to get a clean answer about the parameter of interest, without pretending they are known.
Where you'll see it: the unknown noise level in a measurement, the baseline rate in a comparison of two treatments, and the variance in a regression whose slope is what you care about.
Intuition
Start from a question you already know
You want to know how far a delivery van travels per litre of fuel. You have trip logs, but each trip also depends on traffic, which you did not record. Traffic is not what you asked about. It still changes every trip's fuel use, so you cannot ignore it. A good analysis estimates the fuel efficiency while letting traffic vary, then reports only the efficiency. Traffic is a nuisance: necessary to model, unwanted in the answer.
In statistics the same thing happens with a model. Take a Gaussian measurement with unknown mean and unknown spread (the standard deviation, whose square is the variance; see Mean and Variance). If you care about , then is a nuisance. You cannot write down the likelihood of alone without deciding what is, but the final answer should be about .
The two bad answers
There are two tempting shortcuts, and both are wrong in general.
The first is to guess the nuisance value and treat it as known. If you pick because it feels right, your confidence about will be too narrow or too wide depending on the truth. The uncertainty about has been silently thrown away.
The second is to ignore the nuisance by fitting a simpler model. This often fails because the nuisance changes what the data say about the parameter of interest. The methods in this lesson are the careful versions of these two ideas: they use the data to estimate the nuisance, or they average over its possible values.
- profile: best σ for each μ
- fixed σ = 0.5
The math
Setting up
Let be the parameter of interest and the nuisance parameter. The full model has a density for each observation. Given independent observations , the likelihood is
Here scores each pair of values by how probable the data would be under them. The log-likelihood is easier to work with, because it turns the product into a sum. The task is to say something about while is unknown.
Method 1: profiling
For each fixed value of , find the best nuisance value, the one that maximises the likelihood:
Then substitute it back in. The result is the profile log-likelihood
The symbol means "the value of the thing below that makes the expression largest". The profile curve depends only on , so you can plot it, find its peak, and read off intervals, as with a one-parameter model. Its peak is the maximum likelihood estimate of in the full model. The full treatment, including the likelihood-ratio test, is in Profile Likelihood.
Method 2: marginalising
If you have a prior over the nuisance (your beliefs about it before seeing the data), you can average it out. The marginal likelihood for is
The integral sign means "add up over every value of ", weighting each by . This is the Bayesian route, and it spreads the answer over the nuisance uncertainty rather than fixing it at its best value.
A key special case
Sometimes the nuisance does not affect the best value of the parameter of interest at all. This happens in a linear model with no intercept and an unknown noise variance: the least squares slope is the same whatever the noise variance is. Then profiling over the variance leaves the slope unchanged, and only the uncertainty depends on the nuisance.
Worked examples
Two observations, , come from a Gaussian with mean (the parameter of interest) and variance (the nuisance).
- For a fixed , the best variance is the average squared distance from : .
- Expand the numerator: . Divide by 2: .
- The profile log-likelihood for two observations is, up to a constant, .
- Its peak is at , where and . That is the sample mean, as expected.
- At , , so . The drop from the peak is .
Interpretation: the profile curve tells you how much the data disfavour after letting the spread adjust. The spread was estimated, not fixed.
Three observations, , come from a Gaussian with unknown mean and variance . Suppose the mean is the parameter of interest.
- The sample mean is . The sum of squared deviations is .
- The maximum likelihood estimate of the variance divides by : .
- The usual unbiased estimate divides by : .
- The profile estimate of the mean is , and it does not depend on which variance you use.
Interpretation: the nuisance estimate from the likelihood is too small on average, because it uses the sample mean that the data themselves picked. With few observations this matters. The estimate of the parameter of interest is unaffected here, but a confidence interval built from the variance would be too narrow if you used carelessly. Profiling does not fix this bias by itself.
Model (a linear regression through the origin): , where is Gaussian noise with unknown variance . The slope is the parameter of interest, and is the nuisance. Data: and .
- and .
- Best slope for any noise level: . The noise variance cancels out of the slope's best value, so profiling leaves unchanged.
- Fitted values: , , . Residuals: , , .
- Sum of squared residuals: , which equals .
- Estimated noise variance: . The unbiased version divides by , since one slope was estimated, giving about .
Interpretation: the slope is about 2.04, and the data are tight, since the residuals are about 0.1. The noise variance is needed to say how sure you are about the slope, but it does not change the slope itself. This is the case where profiling is cheap and clean.
Tradeoffs and failure modes
| Situation | Problem | Better choice |
|---|---|---|
| Few observations | Profiling underestimates uncertainty in | Use an adjusted method or a Bayesian marginal |
| The nuisance count grows with the sample size | The maximum likelihood estimate of can be inconsistent | Conditional or marginal likelihood |
| You have real prior knowledge about | Profiling ignores it | Marginalise with that prior |
| The nuisance is not identified by the data | Its best value is arbitrary | Fix it from outside information, or reparameterise |
| The nuisance changes the best | Fixing it gives a wrong answer | Profile or marginalise, never fix |
The classic warning is a paper by Neyman and Scott from 1948. In their setting, each new observation brings a new nuisance parameter, so the number of nuisance parameters grows with the data. Maximum likelihood then gives an estimate of the parameter of interest that does not converge to the truth, however much data you collect. Profiling is not a universal fix.
History
Ronald Fisher built the modern likelihood approach in the 1920s. Working with nuisance parameters became a standard part of statistical theory after that, because almost every real model has more than one unknown.
The Neyman and Scott paper of 1948 showed the limits of simple profiling, and it led to conditional likelihood methods. In 1971 Patterson and Thompson introduced restricted maximum likelihood (REML), which estimates variance components by removing the effect of the fixed parameters first. REML is a standard tool for mixed models, and it is one way to handle nuisance variances without the downward bias of plain maximum likelihood.
The phrase "nuisance parameter" is now used across statistics, and it appears in clinical trials, astronomy and physics, where a calibration constant or a background rate is usually a nuisance.
Recap
A model with an interest parameter and a nuisance needs a way to remove . Profiling replaces with its best value for each , and the result is a one-parameter curve you can read. Marginalising averages over a prior. Both are sound when the nuisance is well identified and the sample is large enough. When the number of nuisance parameters grows, or the sample is small, the simple versions can mislead, and conditional or restricted methods are the next step. For the curve itself, see Profile Likelihood, for the estimator bias seen in Example 2 see Bias-Variance Tradeoff, and for the intervals built from it, see Confidence Interval.
Check yourself
QuestionRecall: what is the difference between a parameter of interest and a nuisance parameter?Show answer
The parameter of interest is the quantity the analysis is designed to answer, such as a mean or a slope. A nuisance parameter is needed to write down the model and fit the data, such as a noise variance or a background rate, but it is not reported as the answer. Both are unknown, and both are estimated from the same data.
QuestionComputation: with and a Gaussian model with mean and variance , what is the best variance when ?Show answer
The best variance for a fixed mean is the average squared distance from it: . This matches the formula at , which gives .
QuestionWhy: why does fixing the nuisance at one value tend to make a confidence statement about the parameter of interest too narrow?Show answer
Fixing the nuisance pretends it is known exactly, so the uncertainty in the nuisance does not reach the answer. In the Gaussian example, a fixed, small spread gives a sharper likelihood curve for the mean than the profile curve, which lets the spread change with the mean. The profile curve is wider and reflects the data's real uncertainty.
QuestionApplied: in a regression of on with an unknown noise variance, you care only about the slope. Does the noise variance change the best slope estimate, and what should you do?Show answer
For a model with no intercept, the least squares slope does not depend on the noise variance, so profiling leaves the slope estimate unchanged. The noise variance still matters for the uncertainty about the slope, so estimate it from the residuals and use it when forming intervals. Use the correction, where is the number of slopes estimated, when the sample is small, since the plain maximum likelihood variance is biased downward.