Descriptive statistics interview questions
27 questions interviewers ask on describing data and reading statistical plots, from first principles to the follow-ups. The first 3 model answers are free to read; Pro opens the rest.
Distributions: histograms, density and the ECDF
- What does a histogram's bar height show, and what does changing the bin width change?●
On a count histogram, a bar's height is the number of observations in its bin. Changing the width changes how the same observations are grouped, not the observations: the
3,818Midtown trips still add up to3,818in five minute and in two minute bins, but the tallest bar moves from[5, 10)with981trips to[8, 10)with440. So every description of a histogram feature should state its bin width. - How is a density histogram different from a count histogram?●●
Each bar's height is
count / (n × bin width), so the bar's area is the fraction of observations in the bin and all the areas add to one. The height has a unit of "per unit of x", per minute here, and is not a percentage. The two minute[8, 10)bar is taller (0.0576per minute) than the five minute[5, 10)bar (0.0514), yet it holds11.5%of the trips against25.7%. - What is a kernel density estimate, and what does its bandwidth control?●●
A KDE places a small smooth curve, a kernel, at each observation and adds them into one curve. The bandwidth sets how far each kernel spreads: a smaller bandwidth follows local changes, a larger one smooths them together. The curve is an estimate, so a bump should be checked against a rug of the recorded values, and its height is not the fraction of observations below a threshold.
- Why can a histogram not answer "what fraction took 20 minutes or less" when 20 is a bin edge?●
- How do you read the 90th percentile from an empirical CDF, and how do you find it by rank?●●
- A target says 90% of trips within a whole number of minutes. The 90th percentile is
27.1833. What limit do you report?●●
Center and spread
- When would you report the median rather than the mean?●
- Removing the largest invoice lowers the mean by
£8.41. Does that invoice explain why the mean is above the median?●● - Why do you have to decide the unit of analysis before computing a mean?●
- What is the mode, and why is it weak for continuous amounts?●
- Why does the sample variance divide by
n - 1, and what is its unit?●● - Two groups have almost equal means. The first has the larger standard deviation and the second the larger IQR. How can both be true?●●
- One record changes a standard deviation a lot. Should you delete it?●●
Comparing groups
- How are box plot whiskers and flagged points defined?●
- A point is beyond the whisker. Is it an error? A value is inside the fences. Is it valid?●●
- What does a violin plot add to a box plot, and what can it mislead about?●●
Association
- What does a Pearson correlation measure, and what are its limits?●
- An overall correlation is
0.069. Could the relationship be stronger, or reversed, inside subgroups?●● - What is a confounder, and how would you spot a potential one in exploratory data?●●
- Why is an association in observational data not evidence of a causal effect?●
- A distance–fare correlation is
0.939. Is fare a function of distance?●● - How do you plot and summarize three million paired points?●●
Categories and who is in the data
- University clients have the most defaults. Do they have the highest default rate?●
- A dataset has category codes the documentation does not define. What do you do?●●
- A survey's raw rows are
39.82%aged0-19. Can you report that as the national share?●● - Does a random train/test split make a test set representative of the target population?●●
- Why compute a correlation heatmap on training rows only, and leave the weight and label out?●●