Skip to content

From an answer to a practice plan.

A sample ML mock interview report, with the reasoning left in. Follow one answer through the examiner’s follow-up, the gap it reveals, and a useful next exercise.

Illustrative example. This exchange was written to explain how to read feedback. It is not an actual learner transcript or a generated product report. Actual reports vary.

The exchange

The topic is bagging: why averaging trees can reduce variance, and where that explanation stops.

Interviewer
Why can averaging many decision trees reduce variance? Does adding more trees make the variance go to zero?
Candidate
If each tree has variance σ², averaging n trees gives variance σ²/n. So yes, enough trees should remove the variance.
Follow-up
That expression assumes uncorrelated predictions. The trees were trained on bootstrap samples of the same dataset. What changes if their errors are correlated?
Candidate
The rows in each sample are different, so I would still treat the errors as independent. I would add trees until the variance is close to zero.

Make the assumption explicit.

For n predictions with equal variance σ² and equal pairwise correlation ρ, the variance of their average is:

σ² × [ρ + (1 − ρ) / n]

For a fixed positive ρ, adding trees reduces the second term but leaves a correlation floor of ρσ². The uncorrelated case is ρ = 0. In a real ensemble, variances and correlations need not be equal; this simplified model explains why independence is the assumption to examine.

A stronger answer would say that random forests also randomize which features are considered at a split, which can reduce correlation between trees. More trees alone do not remove shared error, bias or problems in the data.

Background: scikit-learn’s random forest explanation.

The next practice step

  1. Derive the two-tree case. Write the variance of (X₁ + X₂)/2, including the covariance term. Explain which term the original answer omitted.
  2. Check a numerical example. With σ² = 1, n = 100 and ρ = 0.2, the variance is 0.208, not 0.01. Explain why adding another hundred trees makes a smaller difference.
  3. Explain the tradeoff aloud or in writing. What might reducing the number of candidate features at each split do to tree correlation and individual tree strength? Explain why validation is still needed.

You can work through this exercise independently. In Zvsquared, your free mock includes its feedback and repair plan; opening individual practice drills requires a paid plan.

Check the reasoning again.

After practising, try explaining a fresh case where predictions have unequal variances or strongly shared errors. The useful signal is whether you state and defend the assumptions, not whether you remember this formula.

Further Zvsquared mocks require a paid plan. A fresh problem for a particular topic depends on the eligible reviewed pool. One improved answer is evidence about that attempt, not a guarantee of an interview outcome.

Find your next practice step.

Take a timed, text-based mock for your ML role. Get feedback tied to your written answers and a plan for what to practise next.

Start a free mock

One completed mock, its feedback and repair plan are free. No card required. Further mocks and individual drills require a paid plan.