Skip to main content

Explain the bias-variance trade-off.

Machine learning basics · Intermediate 1

Short answer

Bias is error from a model that is too simple to capture the pattern, so it underfits. Variance is error from a model so flexible that it fits noise, so it overfits. Making a model more complex usually lowers bias and raises variance; you look for the complexity that gives the lowest error on validation data.

Deeper answer

A straight line fitted to curved data has high bias: it is wrong in the same way on every dataset. A very deep decision tree has high variance: train it on a slightly different sample and you get a very different tree. Total error on new data is roughly bias squared plus variance plus noise you cannot remove.

In practice you see it in learning curves. High bias shows as poor scores on both training and validation data; high variance shows as a big gap between them. Remedies differ: for bias, add features or use a more flexible model; for variance, get more data, regularise, simplify, or average many models, which is what random forests do.

What a strong answer covers

Answer it out loud in the mock interview about 1.5 min

Follow-ups to expect

Common mistakes

Learn it

Regression

Today's AI turns are used

Lessons, roadmaps, videos, practice cards and the code playground stay free with your account, with no limit.