AI

Bias Variance Tradeoff: A Plain Explanation

The bias variance tradeoff explains why simple models underfit and complex ones overfit. Bias vs variance, the error formula, a worked example and fixes.

By OmniAI Editorial · Nov 22, 2026 · 13 min read

The bias variance tradeoff is the balance every machine learning model has to strike between being too simple and being too sensitive. A model with high bias makes strong, wrong assumptions and misses real patterns (underfitting). A model with high variance learns the noise in its training data and falls apart on new data (overfitting). Making a model more flexible usually lowers bias but raises variance, so the goal is the level of complexity where the total error on new data is lowest.

This guide explains bias vs variance in plain language, the bias variance decomposition formula, how to diagnose high bias and high variance from your training and validation errors, a worked example from scikit-learn, the fixes for each problem, and how modern deep learning complicates the classic picture.

Bias vs Variance in Plain Language

Imagine throwing darts at a target, where the bullseye is the true answer:

  • High bias, low variance: your darts land close together, but consistently off to one side. You're precise but wrong. This is a model that's too simple.
  • Low bias, high variance: your darts are centered on the bullseye on average, but scattered all over. Each throw is unreliable. This is a model that's too sensitive to its training data.
  • High bias, high variance: scattered and off-center. The worst case.
  • Low bias, low variance: tightly grouped on the bullseye. The goal.

In machine learning terms, the difference between bias and variance looks like this:

BiasVariance
What it isError from wrong or overly simple assumptionsError from sensitivity to the particular training data
Plain meaningThe model can't capture the real patternThe model changes a lot if you train it on different data
Typical causeModel too simple, too few features, too much regularizationModel too complex, too little data, too little regularization
Leads toUnderfittingOverfitting
Training errorHighLow
Validation errorHigh, close to training errorHigh, much higher than training error

The scikit-learn documentation puts it compactly: an estimator's bias is its average error for different training sets, and its variance indicates how sensitive it is to varying training sets.

The Bias Variance Tradeoff Formula

For a model trained to predict a number, its expected error on new data (measured as mean squared error) can be split into three parts:

Expected error = Bias² + Variance + Irreducible error

  • Bias²: how far the model's average prediction (over many possible training sets) is from the truth, squared.
  • Variance: how much the model's predictions jump around when trained on different samples of data.
  • Irreducible error: noise in the data itself, such as measurement errors or factors you don't observe. No model can remove it.

This bias variance decomposition is why the tradeoff exists. As model complexity rises, bias usually falls (the model can fit more shapes) while variance rises (it can also fit noise). Total error forms a U-shape: too far left you underfit, too far right you overfit, and the sweet spot is at the bottom.

The framing goes back to a well-known 1992 paper by Geman, Bienenstock and Doursat, which summed it up as the price of achieving low bias being high variance. Strictly, the clean decomposition applies to squared error; for classification and other losses there are analogous but messier versions, and the same intuition holds.

Ink axes with two dotted curves, one falling and one rising, and a thick ink U-shaped curve above them with an orange dot at its lowest point.
Total error is lowest where falling bias and rising variance balance.

Worked Example: Fitting a Curve With Polynomials

Scikit-learn's documentation includes a classic demonstration. It takes noisy samples from a smooth curve (part of a cosine function) and fits linear regression with polynomial features of degree 1, 4 and 15:

ModelWhat happensDiagnosis
Degree 1 (a straight line)Can't follow the curve at all; poor fit on both training and new dataHigh bias (underfitting)
Degree 4Approximates the true curve almost perfectlyGood balance
Degree 15Passes through nearly every training point, wiggling wildly between them; fits the true curve badlyHigh variance (overfitting)

The degree-15 model has the lowest training error of the three but the worst performance on new data, because it learned the noise. That's the tradeoff in one picture.

You can reproduce the pattern on your own data with scikit-learn's validation_curve, which trains a model across a range of settings and reports training and validation scores for each:

import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import validation_curve
from sklearn.pipeline import make_pipeline
from sklearn.preprocessing import PolynomialFeatures

model = make_pipeline(PolynomialFeatures(), LinearRegression())
degrees = np.arange(1, 16)
train_scores, valid_scores = validation_curve(
    model, X, y,
    param_name="polynomialfeatures__degree",
    param_range=degrees,
    cv=5,
    scoring="neg_mean_squared_error",
)

Plot the mean training and validation errors against the degree. Where the validation error is lowest is your best complexity; where the two curves split apart, variance is taking over.

Three light panels with black dots in an arch: the first with a straight ink line, the second with a smooth orange curve following the arch, the third with a wild ink zigzag.
Too simple, about right, and too complex for the same data.

A Second Example: k-Nearest Neighbors

The k-nearest neighbors (k-NN) algorithm makes the tradeoff easy to see with a single setting. To predict a new point, k-NN looks at the k most similar training examples and takes a vote (for classification) or an average (for regression).

Value of kBehaviorBiasVariance
k = 1Copies the label of the single closest example; reproduces every quirk of the training dataVery lowVery high
Small k (for example 5)Smooths a little, still follows local detailLowModerate to high
Medium k (for example 15–50)Smooths over noise, keeps the main shapeModerateModerate
Very large k (close to the dataset size)Predicts nearly the same answer everywhereVery highVery low

With k = 1, training accuracy is perfect, since each training point is its own nearest neighbor, but predictions on new data are noisy. With a huge k, predictions barely change between training sets, but the model ignores real local patterns. The best k sits in between, and you find it the same way as before: with cross-validation and a validation curve.

Regularization, Explained Simply

Regularization is the most widely used tool for controlling variance. It adds a penalty to the training process that discourages overly complex solutions:

  • L2 regularization (ridge, weight decay) penalizes large weights, pushing the model toward smaller, smoother coefficients. It keeps all features but reduces their influence.
  • L1 regularization (lasso) penalizes the absolute size of weights, which tends to set some of them to exactly zero, effectively selecting features.
  • Dropout randomly switches off parts of a neural network during training, so it can't rely on any single path through the network.
  • Early stopping halts training when validation error stops improving, before the model starts memorizing.

Each method has a strength setting. Turn it up and you move toward higher bias and lower variance; turn it down and you move the other way. Tuning that setting is one of the most direct ways to work the bias variance tradeoff in practice.

How to Diagnose High Bias and High Variance

You rarely know bias and variance directly, but you can see their fingerprints by comparing training error with validation error (error on data the model didn't train on):

Training errorValidation errorGapDiagnosis
HighHighSmallHigh bias: the model is too simple
LowHighLargeHigh variance: the model is overfitting
HighEven higherLargeBoth: too simple for the signal and unstable
LowLowSmallGood fit

Learning curves add another view: plot both errors as the training set grows. If both curves flatten out at a high error close together, more data won't help much (high bias). If there's a large gap that shrinks as data grows, more data will help (high variance). Scikit-learn's documentation notes that collecting more training data is one way to reduce variance, but only worthwhile when the true pattern is too complex to learn well from the data you already have.

Always measure with a held-out validation set or cross-validation, never with training error alone.

How to Fix High Bias

When the model underfits:

  • Use a more flexible model: add polynomial features, switch from a linear model to a tree ensemble or neural network, or add layers and units.
  • Add better features: domain knowledge often beats raw model power.
  • Reduce regularization: a penalty that's too strong forces the model to be too simple.
  • Train longer: neural networks stopped too early can underfit.
  • Use boosting: methods like gradient boosting build models that correct each other's mistakes, which mainly reduces bias.

More data alone rarely fixes high bias: a straight line stays a straight line no matter how many points you give it.

How to Fix High Variance

When the model overfits:

  • Get more training data, or create more with data augmentation; our guide to synthetic data covers when generated data helps.
  • Simplify the model: fewer features, shallower trees, lower polynomial degree, fewer parameters.
  • Add regularization: L1 or L2 penalties, dropout in neural networks, weight decay.
  • Use bagging and ensembles: averaging many models trained on different samples, as random forests do, mainly reduces variance.
  • Stop training early: halt when validation error stops improving.
  • Use cross-validation to choose settings that generalize, not ones that win on one lucky split.

Examples Across Common Algorithms

AlgorithmSetting that lowers bias (raises variance)Setting that lowers variance (raises bias)
k-nearest neighborsSmall k (k = 1 memorizes the training data)Large k (smoother, more averaged predictions)
Decision treeDeeper trees, fewer samples per leafShallower trees, pruning, more samples per leaf
Linear or polynomial regressionHigher degree, more featuresFewer features, stronger regularization
Neural networkMore layers and units, longer trainingDropout, weight decay, early stopping, smaller network
EnsemblesBoosting (sequential correction)Bagging and random forests (averaging)

These knobs are the hyperparameters you tune when you train a model. The bias variance tradeoff is the reason tuning matters at all.

Does the Tradeoff Still Hold for Deep Learning?

The classic U-shaped curve says that past a certain size, bigger models should overfit more. Modern deep learning seems to break this: huge neural networks with far more parameters than training examples can fit their training data perfectly and still generalize well.

Researchers described a pattern called "double descent": as model size grows, test error first falls, then rises near the point where the model can just barely memorize the training data, and then falls again as the model keeps growing. Explanations involve the training algorithm itself (gradient descent tends to find simpler solutions among the many that fit), the structure of real data, and implicit regularization. Some researchers have argued that textbooks should update the simple "bigger means more variance" story.

For practitioners, the core lesson still holds: measure error on data the model hasn't seen. What has changed is that "more parameters" no longer automatically means "more overfitting", especially with large datasets, good regularization and modern architectures. Large language models are evaluated with the same principle; our guide to AI vs machine learning explains how these fields connect.

Bias and Variance When Fine-Tuning Models

The tradeoff shows up clearly when you fine-tune a large pre-trained model on a small dataset. The pre-trained model brings low bias: it already knows a lot about language or images. But with only a few hundred examples, it can quickly overfit them, reproducing the training answers word for word and losing general ability. That's high variance in a new form.

Common counters are familiar ones: train for fewer epochs, use a lower learning rate, train only a small set of added parameters instead of the whole model (as parameter-efficient methods do), hold out a validation set, and stop when validation results stop improving. The underlying logic is the same as for a polynomial curve.

The Bias Variance Tradeoff in Practice: A Checklist

  1. Split your data into training, validation and test sets (or use cross-validation).
  2. Start with a simple baseline model and record training and validation error.
  3. Read the gap: high and close means bias; low training and high validation means variance.
  4. Apply the matching fixes, one change at a time.
  5. Plot validation curves for key hyperparameters to find the bottom of the U.
  6. Check learning curves to decide whether more data is worth collecting.
  7. Touch the test set only once, at the end, to report final performance.

Common Mistakes

  • Judging a model by training accuracy. Low training error says nothing about new data.
  • Tuning on the test set. It turns the test set into another training signal and hides overfitting.
  • Adding data to fix high bias. It won't help a model that's too simple.
  • Assuming complex models must overfit. With enough data and regularization, they often don't.
  • Data leakage: information from the validation or test data sneaking into training makes variance look lower than it is.

Bias also has a second meaning in AI: unfair outcomes for groups of people. That's a different problem from statistical bias, and our guide to AI bias covers it.

FAQ

What is the bias variance tradeoff in simple terms?

It's the balance between a model that's too simple to capture real patterns (high bias) and one that's so flexible it memorizes noise (high variance). Increasing complexity lowers bias but raises variance, so the best model sits where the total error on new data is lowest.

What is the difference between bias and variance?

Bias is error from wrong or overly simple assumptions, which makes a model consistently miss the true pattern. Variance is error from sensitivity to the specific training data, which makes predictions change a lot between training sets. High bias causes underfitting; high variance causes overfitting.

How do you know if a model has high bias or high variance?

Compare training and validation error. If both are high and close together, the model has high bias. If training error is low but validation error is much higher, it has high variance. Learning and validation curves make the pattern easier to see.

How do you reduce variance in a model?

Add more training data, simplify the model, add regularization such as L2 penalties or dropout, use ensembles like random forests, and stop training early. Cross-validation helps you choose settings that generalize rather than fit one data split.

Is overfitting the same as high variance?

Mostly, yes. Overfitting is the visible symptom: the model does well on training data and poorly on new data. High variance is the underlying cause in the bias variance framework, meaning the model's fit depends too much on the particular training sample.

All articles

Read next

Language

EnglishEnglish · en TürkçeTurkish · tr DeutschGerman · de العربيةArabic · ar

Account

Enter your email. We’ll send you a sign-in link and a 6-digit code. No password needed.

Sign in

Theme

Language

Show our email address

To keep spam out of our inbox, please confirm your own email first. We will send you a 6-digit code.

We send codes only to these providers: gmail.com, googlemail.com, outlook.com, hotmail.com, live.com, msn.com, proton.me, protonmail.com, pm.me, icloud.com, me.com, mac.com, yahoo.com, aol.com, gmx.de, gmx.net, web.de, t-online.de, yandex.com, omniai.blog