ArticleslgStudy

mathematics

Deviance (statistics)

Deviance (statistics) is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Deviance (statistics) rather than just read about it. In short: In statistics, deviance is a goodness-of-fit statistic for a statistical model; it is often used for statistical hypothesis testing. It is a generalization of the idea of using the sum of squares of residuals (SSR) in ordinary least squares to cases where model-fitting is achieved by maximum likelihood.

Key takeaways

  • Deviance (statistics) belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Deviance (statistics) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Deviance (statistics) from memory before moving on to harder problems.

Reference excerpt

In statistics, deviance is a goodness-of-fit statistic for a statistical model; it is often used for statistical hypothesis testing. It is a generalization of the idea of using the sum of squares of residuals (SSR) in ordinary least squares to cases where model-fitting is achieved by maximum likelihood. It plays an important role in exponential dispersion models and generalized linear models. Deviance can be related to Kullback–Leibler divergence.

Definition The unit deviance d(y,μ) is a bivariate function that satisfies the following conditions:

d(y,y)=0 d(y,μ)>0∀y≠μ The total deviance D(𝐲,𝝁̂) of a model with predictions 𝝁̂ of the observation 𝐲 is the sum of its unit deviances: D(𝐲,𝝁̂)=∑id(yi,μ̂i). The (total) deviance for a model M0 with estimates μ̂=E[Y|θ̂0], based on a dataset y, may be constructed by its likelihood as: D(y,μ̂)=2(log⁡[p(y∣θ̂s)]−log⁡[p(y∣θ̂0)]). Here θ̂0 denotes the fitted values of the parameters in the model M0, while θ̂s denotes the fitted parameters for the saturated model: both sets of fitted values are implicitly functions of the observations y. Here, the saturated model is a model with a parameter for every observation so that the data are fitted exactly. This expression is simply 2 times the log-likelihood ratio of the full model compared to the reduced model. The deviance is used to compare two models – in particular in the case of generalized linear models (GLM) where it has a similar role to residual sum of squares from ANOVA in linear models (RSS). Suppose in the framework of the GLM, we have two nested models, M1 and M2. In particular, suppose that M1 contains the parameters in M2, and k additional parameters. Then, under the null hypothesis that M2 is the true model, the difference between the deviances for the two models follows, based on Wilks' theorem, an approximate chi-squared distribution with k-degrees of freedom. This can be used for hypothesis testing on the deviance. Some usage of the term "deviance" can be confusing. According to Collett:

"the quantity −2log⁡[p(y∣θ̂0)] is sometimes referred to as a deviance. This is [...] inappropriate, since unlike the deviance used in the context of generalized linear modelling, −2log⁡[p(y∣θ̂0)] does not measure deviation from a model that is a perfect fit to the data." However, since the principal use is in the form of the difference of the deviances of two models, this confusion in definition is usually unimportant.

Examples The unit deviance for the Poisson distribution is d(y,μ)=2(ylog⁡yμ−y+μ), the unit deviance for the normal distribution with unit variance is given by d(y,μ)=(y−μ)2.

See also Akaike information criterion Deviance information criterion Hosmer–Lemeshow test, a quality of fit statistic that can be used for binary data Pearson's chi-squared test, an alternative quality of fit statistic for generalized linear models for count data Peirce's criterion, a rule for eliminating outliers from data sets

Notes

References McCullagh, Peter; Nelder, John (1989). Generalized Linear Models, Second Edition. Chapman & Hall/CRC. ISBN 0-412-31760-5. Collett, David (2003). Modelling Survival Data in Medical Research, Second Edition. Chapman & Hall/CRC. ISBN 1-58488-325-1.

External links Generalized Linear Models - Edward F. Connor Lectures notes on Deviance

Worked examples

Example 1 — a first encounter with Deviance (statistics)

Start with the simplest possible case. Write down what Deviance (statistics) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Deviance (statistics) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Deviance (statistics) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Deviance (statistics)

In research
Deviance (statistics) appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Deviance (statistics) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Deviance (statistics) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Statistical deviation and dispersion, Statistical hypothesis testing, so understanding it makes those chapters shorter.
In everyday life
Look for Deviance (statistics) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Deviance (statistics)” →

How to study Deviance (statistics) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Deviance (statistics) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Deviance (statistics) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Deviance (statistics) in simple terms?

In statistics, deviance is a goodness-of-fit statistic for a statistical model; it is often used for statistical hypothesis testing. It is a generalization of the idea of using the sum of squares of residuals (SSR) in ordinary least squares to cases where model-fitting is achieved by maximum likeli…

Why does Deviance (statistics) matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Deviance (statistics)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Deviance (statistics).

Tags

  • Statistical deviation and dispersion
  • Statistical hypothesis testing

Keep exploring