University of Sydney · FACULTY OF STATISTICS

QBUS2820 Chap.5 Prediction Error, Bias and Variance

- one subject, every graph, every model, every mark
8 Chapters3-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 5 of 10 · QBUS2820

Prediction Error, Bias and Variance

Predictive quality is defined on future cases, not on the observations used to fit a model. This chapter separates training, validation and test roles, develops expected test error, and decomposes squared prediction error into bias, variance and irreducible noise.

It explains why flexibility can reduce bias while increasing sample sensitivity, why the test-error curve can be U-shaped, and why data leakage through preprocessing or repeated test inspection produces optimistic evidence. Expected error is tied to a future data-generating setting. A low value under random folds may not transfer to a later period, another store or a new customer if the split does not imitate that setting.

Sampling variation also affects the estimated error itself, so fold-level results and repeated resampling help distinguish a robust advantage from a lucky partition. Hyperparameter searches create selection pressure: the more candidates inspected, the easier it is to overfit validation noise. Nested evaluation or a final untouched test set protects the last performance claim.

Preprocessing must be treated as model fitting, including imputation, scaling, feature screening and threshold choice. Grouped or chronological splits are often required when rows share an entity or time structure. The irreducible-error label should not become an excuse for unexplained residuals; it refers to variation left after using the relevant predictors and model target, and new information can change that boundary.

Monitoring after deployment tests whether the evaluation assumptions continue to hold.

In this chapter

What this chapter covers

  • 01

    Training and test error

  • 02

    Expected prediction error

  • 03

    Bias squared

  • 04

    Prediction variance

  • 05

    Irreducible error

  • 06

    Underfitting and overfitting

  • 07

    Validation boundaries

  • 08

    Leakage and deployment matching

Worked example · free

Compare two error decompositions

Q [5 marks]. Model A has bias 3, variance 4 and irreducible variance 9. Model B has bias 1, variance 15 and the same irreducible variance. Compare expected squared errors.
Bias falls and variance rises as flexibility increases; the purple test-error curve reaches its minimum between the two extremes rather than at maximum complexiBias falls and variance rises as flexibility increases; the purple test-error curve reaches its minimum between the two extremes rather than at maximum complexity.variancebias²test errormodel flexibilityerror
Bias falls and variance rises as flexibility increases; the purple test-error curve reaches its minimum between the two extremes rather than at maximum complexity.
  • +1The marks used here structure this original exercise and are not an official University marking allocation. Square Model A bias: 3² = 9.
  • +1Add Model A components: 9 + 4 + 9 = 22.
  • +1Square Model B bias: 1² = 1.
  • +1Add Model B components: 1 + 15 + 9 = 25.
  • +1Prefer A at this input because its variance saving exceeds B's bias reduction.
Model A has expected squared error 22 and Model B has 25. The more flexible Model B reduces bias but adds too much variance, while irreducible error affects both equally.
Sia tip — Square the bias before adding and keep irreducible error visible even though it does not choose between these models.
Glossary

Key terms

Training Error
Loss measured on cases used to estimate the model.
Test Error
Loss measured on independent cases not used for model choices.
Expected Error
Average future loss over relevant cases and potential fitted samples.
Bias
Systematic difference between the average fitted prediction and the true target.
Variance
Prediction changes caused by using different training samples.
Data Leakage
Evaluation information influencing fitting, preprocessing, selection or tuning.
Validation Noise
Sampling variation in an estimated validation loss caused by the particular cases assigned to each held-out split.
FAQ

Prediction Error, Bias and Variance FAQ

Why can test error rise with flexibility?

A more flexible model can follow noise in its training sample. Bias may fall, but prediction variance can rise enough to increase future loss, creating a U-shaped test-error pattern.

What belongs inside cross-validation?

Every data-dependent step belongs inside each training fold, including imputation, scaling, transformation, feature screening and tuning. Applying those steps globally leaks information from held-out cases.

How should time-dependent data be split?

Use a design that respects the decision clock, often training on earlier periods and validating on later periods. Random mixing can expose future conditions and exaggerate expected deployment performance.

Why should cross-validation be repeated?

Different fold assignments can change an estimated loss, especially in small or heterogeneous datasets. Repetition reveals that variation and shows whether a model advantage persists beyond one convenient partition.

What is nested evaluation for?

An inner resampling loop chooses models or tuning values, while an outer loop estimates performance after that choice. This separates selection from evaluation when a single final test set is unavailable.

Study strategy

Exam move

Memorise the squared-error decomposition by deriving its meaning, not by chanting labels. Draw three curves against flexibility: bias squared falling, variance rising and test error reaching an interior minimum. Use original numeric triples to compute totals and explain why irreducible noise limits every candidate equally. Build a data-role table that states what training, validation and test samples may influence.

Then audit common leakage routes: scaling on all cases, selecting features before cross-validation, tuning a threshold on test outcomes, and repeatedly revising after test inspection. For each source, write the safe alternative. Practise choosing split units that match deployment, including chronological splits and grouped customer splits.

End with a model-comparison paragraph that reports loss, fold variation, stability, interpretability and operational constraints instead of declaring a winner from one lucky validation number.

Working through Prediction Error, Bias and Variance in QBUS2820? Sia is AskSia’s AI Statistics tutor — ask any QBUS2820 Prediction Error, Bias and Variance question and get a clear, step-by-step explanation grounded in how QBUS2820 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 196 of your University of Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your QBUS2820 tutor, unlimited, worked the way the exam marks it
The full 3-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works