AI Glossary / Statistics and probability / Intermediate

Linearity of regression

Definition

Linearity of regression is the assumption that the systematic mean relationship is adequately represented by the specified linear form. In the supplied glossary's bivariate sense, the conditional mean of Y at a given X follows a straight line, E(Y | X = x) = a + bx. Individual observations may vary around that line. Merely fitting a straight line does not verify the assumption, because software can fit one even when the underlying pattern is curved.

What it means

The assumption concerns the mean pattern, not whether every observation lies exactly on a line. It is distinct from constant error variance, independent errors, and normality. A model can satisfy one of those conditions while violating another.

In multiple regression, the corresponding requirement concerns the mean conditional on all included predictors. A raw two-variable scatter plot may not show that adjusted relationship. Also, a regression linear in coefficients can include squared predictors or splines; such a model need not assume a straight relationship in the original variable.

How it works

Specify the intended mean model and the range over which it should apply. After fitting, plot residuals against predictors and fitted values. Residuals that systematically rise, fall, or bend suggest that the fitted mean misses structure.

Compare plausible alternatives using subject knowledge and suitable validation. Curvature may motivate transformed features, polynomial terms, splines, or another model family. Interactions may be needed when the relationship changes across conditions. Do not choose complexity only because it reduces training error.

A formal lack-of-fit comparison can help when suitable replicated observations are available. Its interpretation depends on assumptions and design. No single p-value or plot proves that a model is correct for every future population or operating range.

Three practical examples

  • A sensor-calibration analyst checks whether average readings follow a straight response across the instrument's intended measurement range.
  • A staffing model examines whether handling time rises at a constant rate with workload or accelerates as capacity is approached.
  • An AI audit compares a simple regression with a flexible alternative to determine whether an apparent subgroup disparity partly reflects an inadequately modeled mean relationship.

Think of it this way

Think of checking whether a straight ruler is a suitable guide for a road. Cars may travel slightly to either side, but persistent bends in the road cannot be explained by random sideways variation. Similarly, a curved pattern in residuals signals that the guide itself may need changing, rather than that every deviation is an unusual observation.

Worked example

Construct ten fictional observations at five x values: -2, -1, 0, 1, and 2. At each x, record two outcomes equal to 5 + x squared minus one and 5 + x squared plus one.

The pairs are therefore (8,10), (5,7), (4,6), (5,7), and (8,10). Their means are 9, 6, 5, 6, and 9, forming a U-shaped pattern.

A least-squares straight-line fit has intercept 7 and slope 0 by symmetry. Its mean residuals at the five x values are 2, -1, -2, -1, and 2. The residual squared sum is 38, so the zero fitted slope does not mean there is no relationship.

A model using features 1, x, and x squared fits the pair means as 5 + x squared. Its remaining residuals are -1 and +1 at each x, giving squared sum 10. The curved mean remains linear in its coefficients.

The example separates missed curvature from within-x variation. The decrease from 38 to 10 is a checked arithmetic comparison, not a guarantee that adding a quadratic term will improve predictions in an unrelated dataset.

Illustrative case study

Fictional case: Bridgeway Fulfilment models dispatch delay from daily order volume using a straight line. The overall error score appears acceptable, but residuals are positive on the busiest days and negative in the middle of the range.

Operations staff explain that a second packing stage becomes congested above a workload threshold. Analysts compare a piecewise specification with the initial line, using later days for validation and retaining an uncertainty allowance.

The revised report states where a constant-rate approximation works and where it fails. The team avoids deleting busy days as outliers merely because those days expose a limitation in the original mean model.

Common misconceptions and mistakes

A common mistake is using a normality test as a test of linearity. Another is assuming a high R-squared proves the functional form is adequate. Residual shape, context, and predictive performance provide different evidence.

Do not infer absence of a relationship from a near-zero slope: symmetric curvature can produce exactly that result. Do not automatically fix nonlinearity by transforming the outcome without reconsidering the estimand and inverse transformation. A pattern can also arise from an omitted group, interaction, timing effect, or measurement issue rather than a smooth curve alone.

Business use

Checking linearity helps businesses avoid systematically biased predictions near capacity limits, pricing thresholds, or unusual operating conditions. It is particularly useful when a simple model influences staffing, inventory, or service commitments.

Document the chosen feature form and its valid range. Ask whether errors vary systematically across the decisions the business actually makes. A slightly better average score can conceal a material error at the point where action changes. Compare alternatives on that operational consequence as well as on statistical summaries.

People also ask

Does linearity require constant variance?

No. The conditional mean can be straight while variation changes with x.

Can polynomial regression still be linear regression?

Yes. It is linear in its coefficients even when it represents a curved relationship in x.

Does a residual plot without an obvious pattern prove linearity?

No. Limited sample size, restricted ranges, and noisy measurements can conceal departures, and deployment may involve different conditions.

Check your understanding

In the worked example, the straight-line slope is zero. Is the response unrelated to x?

Answer: No. Its pair means follow 5 + x squared. A straight slope misses the U-shaped relationship, while residuals reveal systematic positive and negative deviations across the range.

Related terms

  • Conditional means
  • Lack of fit
  • Polynomial regression
  • Homoscedasticity
  • conditional mean
  • residual plot
  • spline
  • interaction
  • model specification

Learn next

Next, compare residual patterns caused by curvature, changing variance, and time dependence. Then study validation strategies for choosing flexible terms without confusing a better training fit with better future performance.

More in Statistics and probability

  • Linear relationship - A linear relationship is one whose systematic pattern can be represented by a straight line on the stated measurement scales.
  • Linear transformation - In the supplied statistics glossary, a linear transformation changes a numerical variable by multiplying it by a constant and adding a constant: Y = a + bX.
  • Linear trend estimation - Linear trend estimation fits a straight-line change over time to observed data, commonly using a model such as Yt = a + bt + error.
  • Linkage disequilibrium score regression - Linkage disequilibrium score regression, usually abbreviated LD Score regression or LDSC, is a method that relates genome-wide association statistics to...
  • List sample - A list sample is a sample selected from an explicit list of units in the population being studied. The list acts as the sampling frame.
  • Local model - In the supplied Aalto dictionary's federated-learning terminology, a local model is the hypothesis space assigned to a particular node of a learning network.

Sources

Sources: Howell, Statistical Methods for Psychology glossary, Linearity of Regression: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html . NIST/SEMATECH, How Can I Tell If a Model Fits My Data?: https://www.itl.nist.gov/div898/handbook/pmd/section4/pmd44.htm . These primary references were read. The replicated quadratic dataset and fictional case are original; both regression fits, residual means and squared-error totals were independently checked.

Previous: Linear trend estimation Next: Linearly separable

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer