How do you estimate probability distributions from data?
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Other
How do you estimate a probability distribution from data? Suppose you have a sample of one variable, such as the times between customer support tickets, and you need a distribution you can use to describe it, simulate from it, or compute probabilities with it.
```hint Two routes
Ask whether you are willing to assume a named family for the data. The answer splits the methods into two groups with different data requirements.
```
```hint After the fit
Once you have a candidate, think about how you would show it describes the data, both with a picture and with a number.
```
### What a Strong Answer Covers
- The parametric and nonparametric routes, and what decides between them.
- How parameters are estimated, with at least one estimator written out.
- How exploratory plots and domain knowledge narrow down the candidate families.
- How a fit is validated and how competing fits are compared.
- Where the methods break down, such as small samples, tails, or very large n.
### Follow-up Questions
- You ran a K-S test against a normal distribution whose mean and standard deviation you estimated from the same sample. What is wrong with the p-value?
- With 10 million observations, every goodness-of-fit test rejects your model. What do you do?
- How do you choose the bandwidth of a kernel density estimate, and what happens when it is too small or too large?
- Your count data has a variance far above its mean. Which family would you try instead of Poisson, and why?
Overview: Asks how to estimate the probability distribution of a variable from a sample, from choosing candidate families to checking the fit. It tests parametric and nonparametric estimation, maximum likelihood and the method of moments, kernel density estimates, and goodness-of-fit diagnostics.