Overfitting, bias-variance trade-off and cross-validation

Overfitting, bias-variance trade-off and cross-validation

Published September 28, 2026

Overfitting, bias-variance trade-off and cross-validation

On this page

Learning Outcome Statement

Describe overfitting and identify methods of addressing it.

On the exam: You get a model-selection vignette with training, validation, cross-validation, or test evidence, then choose the diagnosis or remedy in a best-answer comparison.

Your model learns patterns from training observations. If it also learns noise specific to those issuers, it can look excellent on training data and fail on new issuer-quarter observations. Overfitting occurs when training performance improves but out-of-sample performance deteriorates. The training and validation samples contain non-overlapping issuer-quarter observations, the target is quarterly, and an untouched test sample waits for final assessment.

ComplexityBiasVariance and sample sensitivity
SimpleUsually higherUsually lower
ComplexUsually lowerUsually higher

Lower complexity may miss real structure, creating higher bias. A complex model can fit quirks in the sample, which makes its predictions more sensitive to the observations it sees.

Mean squared error, MSE, is a dimensionless loss measured in probability squared. To compare the training MSE, $\mathrm{MSE}{\mathrm{train}}$, with the validation MSE, $\mathrm{MSE}{\mathrm{validation}}$, use the generalization gap, $G$.

$$ G = \mathrm{MSE}{\mathrm{validation}} - \mathrm{MSE}{\mathrm{train}} $$

The validation term records error on held-out observations used for model selection, while the training term records error on observations used to fit the candidate. MSE is a loss, so lower is better. A positive $G$ means validation error is higher. A large or widening $G$ supports an overfitting diagnosis, but a lower validation loss alone does not prove an economic benefit.

Use validation data or cross-validation to select complexity.

Loading diagram…

Cross-validation changes which observations serve as validation data, so your selection decision is less tied to a single split. Each remedy attacks noise chasing or sample sensitivity in a different way. Choose a remedy that matches the source of instability: weak inputs call for feature selection, while excessive flexibility calls for regularization or pruning. The diagram keeps selection on validation evidence and protects the test sample for the final check.

MethodChange
Representative dataMirrors future issuer-quarter observations
Feature selectionRemoves noisy or irrelevant inputs
RegularizationPenalizes excessive model complexity
Early stoppingStops fitting before noise dominates
PruningRemoves weak branches or rules
EnsemblesCombines models to reduce sample sensitivity

Representative data should resemble future issuer-quarter observations. Keep the test sample outside all tuning decisions, then use it for final assessment. The figure traces that boundary: training observations fit candidate models, validation observations guide choices, and test observations stay untouched until the choice is fixed. Reusing test results during tuning would make that sample part of selection and weaken its role as a final assessment.

Worked example

You are handed a research team's quarterly model comparison for next-quarter corporate bond downgrade risk. It contains simple, moderate and complex candidate models, with non-overlapping issuer-quarter observations in the training and validation samples. An untouched test sample is reserved for final assessment. Which candidate should you select, and which candidate shows overfitting?

Each MSE is a dimensionless probability-squared loss, and lower values are preferred. The values are computed separately over the non-overlapping training and validation samples.

Candidate modelTraining MSEValidation MSE
Simple$0.42$$0.45$
Moderate$0.24$$0.27$
Complex$0.08$$0.39$

The bars show training MSE, and the line shows validation MSE. Read each pair together: the bar falls as complexity rises, but the line first falls and then rises. That reversal warns that the complex model fits its training observations much better without matching that gain on validation observations. Compare validation losses to select a candidate, then inspect the gap to diagnose overfitting; reserve the test sample for final assessment.

Loading diagram…
  1. For the simple candidate, subtract training MSE from validation MSE because the gap measures deterioration on held-out observations. The result is $G = 0.45 - 0.42 = 0.03$.
  2. For the moderate candidate, repeat the same comparison. The result is $G = 0.27 - 0.24 = 0.03$.
  3. For the complex candidate, calculate the same gap. The result is $G = 0.39 - 0.08 = 0.31$, a much wider gap.
  4. Choose the lowest validation MSE because it estimates held-out performance. Moderate wins with validation MSE $0.27$, below simple at $0.45$ and complex at $0.39$.

Select the moderate model, and diagnose the complex model as overfit because its strong training fit does not carry to held-out observations.

Changed condition

The same scenario now changes only the complex model's validation MSE. The training MSE and every other input stay unchanged.

MeasureBase conditionChanged condition
Complex validation MSE$0.39$$0.22$
Complex generalization gap$0.31$$0.14$
Validation winnerModerateComplex

Because the complex model's training MSE stays fixed while its validation MSE falls, predict a narrower gap before checking the result. The gap narrows, and complex becomes the validation winner. The changed evidence improves model selection, but it does not remove the need for final test assessment or prove an economic benefit. Before reading on, state why the untouched test sample cannot be used to choose complexity.

Common error

You choose the complex model because its training MSE is lowest. That feels right because the closest fit to observed issuers seems most likely to predict future issuers. What gives it away is a much larger validation MSE and a widening training-validation gap.

Check yourself

Practice

A research team predicts next-quarter corporate bond downgrade risk. The simple model has training MSE 0.42 and validation MSE 0.45. The moderate model has 0.24 and 0.27. The complex model has 0.08 and 0.39. Samples are non-overlapping, and an untouched test sample is reserved.

Question 1

Which candidate most clearly shows overfitting in the base case?

Question 2

Which procedure addresses the selection problem most directly?

Question 3

Which statement best describes the bias-variance trade-off?

Question 4

Which conclusion is justified by a lower validation MSE?

For the complex model in the base case, calculate the generalization gap, G, as validation MSE minus training MSE.

Under the changed condition, complex validation MSE is 0.22 while simple and moderate validation MSE remain 0.45 and 0.27. Which candidate should validation-based selection choose?

Revision snapshot

Overfitting occurs when training performance improves but out-of-sample performance deteriorates. Greater model complexity usually lowers bias but raises variance and sensitivity to the sample. For MSE, use the generalization gap shown below.

$$ G = \mathrm{MSE}{\mathrm{validation}} - \mathrm{MSE}{\mathrm{train}} $$

A positive, widening $G$ is the trap signal. Use validation data or cross-validation to select complexity, then reserve the test set for final assessment. Address overfitting with representative data, feature selection, regularization, early stopping, pruning, or ensembles. On the exam, reject the lowest-training-error choice when held-out error is much worse. A statistically or numerically better validation result is not automatically economically significant.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Overfitting, bias-variance trade-off and cross-validation

  1. 1. An analyst compares one-period simple returns with continuously compounded returns for an asset whose price remains positive. Which conclusion is most accurate?

    • A. Both returns have a lower bound of −100%
    • B. Neither return has a finite lower bound
    • C. Only the continuously compounded return is unbounded below
    Show answer

    Answer: C. Only the continuously compounded return is unbounded below

    > Key point: Simple returns cannot fall below −100%, while continuously compounded returns have no finite lower bound. Why Only the continuously compounded return is unbounded below is correct - A simple return is P₁/P₀ − 1; with positive prices, it stays above −100%. - A continuously compounded return is ln(P₁/P₀); as the ending price approaches zero, this return approaches negative infinity. How they compare | Return measure | Lower bound | |---|---| | Simple | −100% (not reached for positive ending prices) | | Continuously compounded | No finite lower bound | Why the other options are wrong - Both returns have a lower bound of −100%: the continuously compounded return can fall below −100% without limit. - Neither return has a finite lower bound: the simple return remains above −100% when prices are positive.

  2. 2. For 36 independent monthly active returns, the mean is 0.80% and sample standard deviation is 2.40%. At 5%, test H₀: μ ≤ 0 against H₁: μ > 0; the one-tailed critical t-value is 1.69.

    • A. Fail to reject the null because 0.80% is economically small
    • B. Fail to reject the null because the test statistic is below 1.96
    • C. Reject the null in favor of a positive mean return
    Show answer

    Answer: C. Reject the null in favor of a positive mean return

    > Key point: For a one-tailed test, compare the calculated t-statistic with the supplied one-tailed critical value. Why Reject the null in favor of a positive mean return is correct - Standard error = 2.40% / √36 = 0.40%. - t = 0.80% / 0.40% = 2.00; since 2.00 exceeds the 1.69 critical value, reject the null. Working | Step | Working | Result | |---|---|---| | Standard error | 2.40% / √36 | 0.40% | | Test statistic | 0.80% / 0.40% | 2.00 | | Decision | 2.00 > 1.69 | Reject H₀ | Answer: Reject the null in favor of a positive mean return. Why the other options are wrong - Fail to reject the null because 0.80% is economically small: economic magnitude does not determine statistical significance; the test statistic exceeds the threshold. - Fail to reject the null because the test statistic is below 1.96: the statistic is 2.00, not below 1.96; the supplied one-tailed critical value is 1.69.

  3. 3. An analyst obtains a p-value of 0.030 for a two-sided test conducted at the 5% significance level. The analyst should most likely:

    • A. Reject the null hypothesis
    • B. Fail to reject the null hypothesis
    • C. Accept the null hypothesis as true
    Show answer

    Answer: A. Reject the null hypothesis

    > Key point: Reject the null hypothesis when the p-value is below the significance level. Why Reject the null hypothesis is correct - The p-value (0.030) is below the 5% significance level (0.050), so the result is statistically significant and the null hypothesis is rejected. Why the other options are wrong - Fail to reject the null hypothesis: This is the decision when the p-value is greater than the significance level, not when it is lower. - Accept the null hypothesis as true: A hypothesis test does not establish that the null is true; when evidence is insufficient, the decision is to fail to reject it.

  4. 4. An investor deposits USD 1,000 at the beginning of each quarter for two years. At 8% nominal compounded quarterly, the value immediately after the eighth quarter's interest is credited is closest to:

    • A. USD 8,000.00
    • B. USD 8,582.97
    • C. USD 8,754.63
    Show answer

    Answer: C. USD 8,754.63

    > Key point: Beginning-of-quarter deposits form an annuity due, so each deposit earns one extra quarter of interest. Why USD 8,754.63 is correct - The quarterly rate is 8% ÷ 4 = 2%. - The eight deposits accumulate as an ordinary annuity, then receive one additional quarter of growth: USD 1,000 × [(1.02⁸ − 1) ÷ 0.02] × 1.02 = USD 8,754.63. Working | Step | Working | Result | |---|---|---| | Quarterly rate | 8% ÷ 4 | 2% | | Ordinary-annuity value | USD 1,000 × [(1.02⁸ − 1) ÷ 0.02] | USD 8,582.97 | | Adjust for beginning deposits | USD 8,582.97 × 1.02 | USD 8,754.63 | Answer: USD 8,754.63 Why the other options are wrong - USD 8,000.00: This totals the deposits but omits all interest. - USD 8,582.97: This treats deposits as occurring at quarter-end and omits the extra quarter of growth for each beginning-of-quarter deposit.

  5. 5. A portfolio's mean annual return is 8.00% from 36 independent observations, with sample standard deviation 12.00%. Using a 1.96 critical value, the calculated 95% confidence interval is closest to:

    • A. 7.35% to 8.65%
    • B. 4.08% to 11.92%
    • C. 3.30% to 12.70%
    Show answer

    Answer: B. 4.08% to 11.92%

    > Key point: A confidence interval for the mean uses the sample standard deviation divided by the square root of the observation count. Why 4.08% to 11.92% is correct - Standard error = 12.00% ÷ √36 = 2.00%. - Interval = 8.00% ± 1.96 × 2.00% = 8.00% ± 3.92%. Working | Step | Working | Result | |---|---|---| | Standard error | 12.00% ÷ √36 | 2.00% | | Margin of error | 1.96 × 2.00% | 3.92% | | Confidence interval | 8.00% ± 3.92% | 4.08% to 11.92% | Answer: 4.08% to 11.92% Why the other options are wrong - 7.35% to 8.65%: Dividing by 36 instead of √36 gives a 0.33% standard error and a 0.65% margin of error, producing this interval. - 3.30% to 12.70%: Using 25 observations gives a 2.40% standard error and a 4.70% margin of error, producing this interval.

  6. 6. A deposit earns a nominal annual rate of 7.20%, compounded monthly. The calculated value of its effective annual return is closest to:

    • A. 7.20%
    • B. 7.44%
    • C. 7.47%
    Show answer

    Answer: B. 7.44%

    > Key point: For a nominal annual rate compounded monthly, calculate the effective annual return by compounding the monthly rate 12 times. Why 7.44% is correct - Monthly rate = 7.20% ÷ 12 = 0.60%. - Effective annual return = (1 + 0.072/12)¹² − 1 ≈ 7.44%. Working | Step | Working | Result | |---|---|---| | Monthly rate | 7.20% ÷ 12 | 0.60% | | Effective annual return | (1 + 0.072/12)¹² − 1 | 7.44% | Answer: 7.44% Why the other options are wrong - 7.20%: This is the nominal annual rate; it omits interest earned on interest during monthly compounding. - 7.47%: This uses continuous compounding, e⁰·⁰⁷² − 1, rather than monthly compounding.

  7. 7. A portfolio invests 60% in an asset with 12% volatility and 40% in an asset with 20% volatility; correlation is 0.25. The calculated diversification ratio is closest to:

    • A. 0.792
    • B. 1.000
    • C. 1.264
    Show answer

    Answer: C. 1.264

    > Key point: Diversification ratio equals weighted-average asset volatility divided by portfolio volatility. Why 1.264 is correct - Weighted-average asset volatility: 0.60 × 12% + 0.40 × 20% = 15.20%. - Portfolio volatility is about 12.03%, so the ratio is 15.20% ÷ 12.03% ≈ 1.264. Working | Step | Working | Result | |---|---|---| | Portfolio variance | 0.60² × 0.12² + 0.40² × 0.20² + 2 × 0.60 × 0.40 × 0.25 × 0.12 × 0.20 | 0.014464 | | Portfolio volatility | √0.014464 | 12.03% | | Weighted-average volatility | 0.60 × 12% + 0.40 × 20% | 15.20% | | Diversification ratio | 15.20% ÷ 12.03% | 1.264 | Answer: 1.264 Why the other options are wrong - 0.792: This reverses the ratio, dividing portfolio volatility by weighted-average asset volatility. - 1.000: This would require portfolio volatility to equal weighted-average asset volatility; the 0.25 correlation makes portfolio volatility lower.

  8. 8. An investor deposits USD 10,000 for 18 months at a stated annual rate of 6%, compounded monthly. The calculated future value is closest to:

    • A. USD 10,900
    • B. USD 10,913
    • C. USD 10,939
    Show answer

    Answer: C. USD 10,939

    > Key point: For monthly compounding, use the monthly rate and the total number of months as the compounding periods. Why USD 10,939 is correct - Monthly rate: 6% ÷ 12 = 0.5%; periods: 18 months. - Future value = USD 10,000 × (1.005)^18 ≈ USD 10,939. Working | Step | Working | Result | |---|---|---| | Monthly rate | 6% ÷ 12 | 0.5% | | Number of periods | 18 months | 18 | | Future value | USD 10,000 × (1.005)^18 | USD 10,939 | Answer: USD 10,939 Why the other options are wrong - USD 10,900: Simple interest gives USD 10,000 × [1 + (0.06 × 1.5)] = USD 10,900; it omits monthly compounding. - USD 10,913: Annual compounding gives USD 10,000 × (1.06)^1.5 ≈ USD 10,913; the rate is compounded monthly.

Flashcards: Overfitting, bias-variance trade-off and cross-validation

  1. 1. What is variance error?

    Show answer

    the out-of-sample error resulting from overfitted models that do not generalize well

  2. 2. What is out of sample error =

    Show answer

    bias error + variance error + base error

  3. 3. What is accuracy?

    Show answer

    the % of correctly predicted classes out of total predictions

  4. 4. When given the prob. of correct call, IC =

    Show answer

    \= 2(% correct) - 1

  5. 5. When is LASSO useful?

    Show answer

    in building parsimonious models through feature reduction

  6. 6. What are the investment applications of random forest?

    Show answer

    - factor-based asset allocation - prediction models for success of an IPO

  7. 7. What are the investment applications of KNN?

    Show answer

    - predicting bankruptcy - assigning a bond to a ratings class - predicting stock prices - creating customized indices

  8. 8. Do you want more precision or recall if the cost of a Type II error is large?

    Show answer

    recall

  9. 9. What is the x and y axis for ROC?

    Show answer

    x: precision\ y: recall

  10. 10. Do you want more precision or recall if the cost of a Type I error is large?

    Show answer

    precision

Everything you need for CFA prep

Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

GET STARTED FOR FREE
75% OFFLimited time offer
GET 75% OFF