AI Glossary / Statistics and probability / Intermediate

General linear model

Definition

A general linear model represents numerical outcomes as linear combinations of unknown coefficients and specified predictors, plus errors. It provides a common framework for ordinary regression, analysis of variance, and analysis of covariance. “Linear” refers to the coefficients: predictors may include category indicators, interactions, or fixed transformations. The general linear model and the generalized linear model are related but distinct terms, despite sharing the abbreviation GLM.

What it means

An analyst can compare group means and estimate relationships with numerical measurements within the same mathematical framework. A category becomes a set of coded columns, while a measured quantity can enter directly or through chosen transformations.

The model separates systematic predictions from unexplained deviations. Its coefficients describe relationships conditional on the other included columns, so interpreting a coefficient requires knowing the coding and specification.

Here the focus is the familiar single-outcome version. Multivariate versions accommodate several outcomes together. The broader generalized linear model framework adds choices such as binomial outcomes and a logit link; ordinary normal linear regression is a special case within that broader family.

How it works

Write y = Xβ + ε. The response vector y contains observed outcomes, X is the design matrix, β contains coefficients, and ε contains errors. An intercept usually contributes a column of ones. For ordinary least squares, choose coefficients that minimize the sum of squared residuals.

With linearly independent design columns, the coefficient estimates are uniquely determined. Interpret them in the units and coding of X. A term x² still enters linearly in its own coefficient; a group-by-x interaction allows different slopes across groups.

Classical exact tests and intervals commonly assume independent, normally distributed errors with constant variance and an appropriate conditional mean. Least-squares calculation itself does not require normality. Dependent observations, unequal variances, influential points, and misspecified relationships require suitable diagnostics and potentially different estimation or inference.

Three practical examples

  • Operations: relate processing duration to batch size and equipment category, separating a numerical trend from adjusted category differences.
  • Experimentation: express an analysis of variance comparing several randomized treatments through indicator columns and meaningful contrasts.
  • AI development: build an interpretable baseline for numerical prediction, then compare its held-out performance with more complex models under the same evaluation rules.

Think of it this way

Think of a mixing desk with fixed input channels. Each design-matrix column is a channel, and its coefficient controls how much that channel contributes to the prediction. Adding an interaction creates another channel; it does not turn the model into an unrestricted representation of every possible relationship.

Worked example

Consider six constructed records. Their x values are (0, 1, 2, 0, 1, 2), group indicators g are (0, 0, 0, 1, 1, 1), and outcomes y are (10, 13, 14, 15, 16, 20). Fit y_hat = a + bx + cg.

The fitted coefficients are a = 121/12, b = 9/4, and c = 14/3. Thus the fitted group difference at a common x is about 4.667 units, and the shared slope is 2.25 units per x unit. For x = 1 and g = 1, the prediction is 17.

The six residuals are (−1/12, 2/3, −7/12, 1/4, −1, 3/4). Squaring and summing gives 29/12, approximately 2.417. There are six observations and three fitted coefficients, leaving three residual degrees of freedom. The classical residual variance estimate is (29/12)/3 = 29/36, approximately 0.806. Independent least-squares calculation verifies these values. This arithmetic does not establish that group membership causes the estimated difference.

Illustrative case study

Fictional case: Harbor Workshop models job duration using order size and machine type. Its initial report compares raw machine averages, but larger jobs disproportionately use one machine.

The analyst fits a general linear model with size and machine indicators, then checks residuals and whether machine-specific slopes are needed. The report explains the reference machine and the size range supported by data. Managers use adjusted predictions for planning while scheduling a separate controlled comparison before claiming that replacing equipment will reduce processing time.

Common misconceptions and mistakes

  • Assuming “linear” requires every relationship with an original predictor to be a straight line.
  • Confusing a general linear model with every generalized linear model.
  • Coding nominal categories as arbitrary numbers and interpreting the resulting numerical slope as meaningful.
  • Treating a coefficient as a causal effect simply because other variables were included.
  • Using ordinary independent-error uncertainty for repeated observations from the same customer or site.
  • Interpreting an intercept at predictor values that are impossible or far outside the observed range.

Business use

General linear models are useful when a business needs interpretable numerical predictions, adjusted comparisons, or a transparent statistical baseline. Their value depends on a clear outcome, appropriate measurement, defensible design columns, and a realistic evaluation setting.

Document the reference categories, transformations, interactions, excluded records, and supported prediction range. Inspect residuals and influential observations, and distinguish uncertainty about an average response from uncertainty about a new individual outcome. A strong fit on historical records is only one part of deciding whether the model will support tomorrow’s decisions.

People also ask

Can a quadratic relationship be a general linear model?

Yes. A model such as β0 + β1x + β2x² is linear in its coefficients.

Must all predictors be numerical measurements?

No. Categories can be represented with suitable indicator coding.

Is logistic regression the same model?

No. It is ordinarily treated as a generalized linear model with a binomial response and logit link.

Check your understanding

Answer: 1. A model has an intercept and four independent predictor columns.

How many coefficients are estimated?

Answer: Five. 2.

Why might an interaction be useful?

Answer: It can allow one predictor’s relationship with the outcome to vary with another predictor. 3.

Does a small residual sum of squares establish causation?

Answer: No; research design and assumptions remain necessary.

Related terms

  • Linear regression
  • Ordinary Least Squares
  • Analysis of variance
  • Analysis of covariance
  • Residual
  • Generalized linear model
  • design matrix
  • interaction

Learn next

Practice constructing a design matrix for one categorical and one numerical predictor. Compare predictions with and without an interaction, inspect residual plots, and distinguish confidence intervals for mean responses from prediction intervals for individual outcomes.

  • Residual

More in Statistics and probability

  • Gaussian Process Regression - Gaussian process regression is a probabilistic regression method that places a Gaussian process model over an unknown function and updates that model using...
  • Gaussian random variable - A Gaussian random variable is a random variable whose probability distribution is Gaussian, also called normal.
  • Gelbach decomposition - Gelbach decomposition is a regression method for dividing the change in a selected coefficient, between a base model and a fuller model, into additive...
  • General regression neural network - A general regression neural network, or GRNN, is a memory-based method for predicting numerical outcomes by combining the outcomes of stored training...
  • Generalized estimating equation - A generalized estimating equation, usually discussed in the plural as generalized estimating equations or GEE, estimates relationships between predictors...
  • Generalized likelihood uncertainty estimation - Generalized likelihood uncertainty estimation, or GLUE, is a framework for exploring uncertainty in model predictions by retaining multiple acceptable model...

Sources

Howell, Statistical Methods for Psychology glossary: https://www.uvm.edu/~statdhtx/methods8/Glossary/Glossary.html — terminology connecting regression and analysis of variance.

NIST/SEMATECH, Linear Least Squares Regression: https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm — coefficient linearity, fitting, and limitations. Both primary educational sources were read; worked data and case are original.

Previous: General data protection regulation Next: General-purpose computing on graphics processing units

  • 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