Sampling and distributions interview questions
26 questions interviewers ask on distributions and dependence, from first principles to the follow-ups. The first 3 model answers are free to read; Pro opens the rest.
Sampling
- What is a sampling frame, and why does the unit matter when you build one?●
The frame is the list of eligible units a sample is drawn from. For an invoice review the unit is one invoice ID, so the 541,909 item lines are grouped into 25,900 IDs first; sampling lines would inspect parts of invoices and give large invoices more chances.
- What is the difference between sampling with and without replacement?●
Without replacement, a selected unit leaves the frame, so each appears at most once; with replacement, every draw uses the full frame again, so repeats are possible. In 4.1, 200 draws with replacement gave 199 distinct invoices. Reviews use the first; bootstrap resampling uses the second.
- When would you use a stratified sample instead of a simple random sample?●●
When small groups must be represented. A simple sample of 200 invoices held 3 German and 4 French ones, and in 2,000 repeated simple samples none reached 20 German invoices; 50 per stratum guarantees 50 of each. The price is unequal inclusion probabilities, which have to be undone with weights before describing the whole frame.
- How do you get a frame-level estimate from a disproportionate stratified sample?●●
- What is source population bias, and can a sampling design fix it?●
Count models
- What is a Bernoulli trial, and what are its mean and variance?●
- What does the binomial model assume?●
- Why does the SD of a binomial count grow more slowly than its mean?●●
- How would you check the common-p assumption before forecasting a cohort's churn?●●
The normal model
- What does "68–95–99.7" mean, and what does it not mean?●
- Why is the height of a normal PDF not a probability?●
- How do you check whether a normal approximation is good enough?●●
- What is a z score used for in ML?●●
Residuals
- What is a residual?●
- What does a linear model's normal-error assumption concern: the features or the residuals?●●
- How do you read a Q-Q plot?●●
- What is heteroscedasticity, and why does it matter?●●
Transforms
- Why take the log of a long-tailed target?●
- Why use
log1pandexpm1, and why clip the back-transformed prediction?●● - A log-target model has a lower MAE and a higher RMSE than the raw model. Which is better?●●
Joint shape
- What do a mean vector and a covariance matrix describe?●
- What is the Mahalanobis distance, and how is it used?●●
- A fitted 95% ellipse contains fewer than 95% of the rows. What does that tell you?●●
Time
- Why is a random train–test split wrong for a forecast?●
- What is autocorrelation, and what does a strong lag-7 value suggest?●●
- What is temporal leakage, and how does it hide in feature pipelines?●●