Familiar Faces

← Back to G-Research Interview Questions

Question

A hospital is testing a model that predicts the number of visits a patient will make next month. Its dataset contains three records per patient, and it randomly sends each row to training with probability 1/2 or validation otherwise. The model is allowed to recognise a patient's identifier. A row under evaluation is known to be in validation, but the patient's other two rows are split independently.

For patient i, the recorded target in row j is \(Y_{ij}=\mu+U_i+\varepsilon_{ij}\). Here \(\mu\) is known, the patient-specific effect \(U_i\) has mean 0 and variance 9, and the independent row noises \(\varepsilon_{ij}\) have mean 0 and variance 4. Patient effects and noises are mutually independent. When the training set contains \(k\ge1\) rows for the same patient, the model predicts a held-out row using the average training target for that patient; if \(k=0\), it predicts \(\mu\). Evaluate errors against the unobserved true held-out Y, not against its noise-free expectation.

Find the expected squared prediction error of a random validation row. Compare it with the squared-error risk when predicting a completely new patient, who has no training rows. Explain how the validation result would change if there were many records per patient, still using a 50/50 row split.

Hint 1

Condition on K, the number of the other two records from the same patient that entered training. Given the evaluated row is held out, \(K\sim\operatorname{Binomial}(2,1/2)\).

If \(K=0\), the error includes \(U_i\) and one ε. If \(K\ge1\), averaging the training records cancels Uᵢ but adds independent average noise with variance \(4/K\).

Check your answer

Join our Newsletter and Receive the Latest Updates!

Main Links

Trade Courses Assessments Interview Prep Contact Us

Social Media

Facebook Instagram YouTube

Legal

Terms and Conditions Privacy Policy Privacy settings

Talent Acquisition

Looking to hire exceptional quant talent?
See how we can help.

© 2026 EverythingQuant. All Rights Reserved.