Assess a Distribution and Derive Coin-Toss Expectations
Company: Cargurus
Role: Data Scientist
Category: Statistics & Math
Difficulty: medium
Interview Round: Technical Screen
### Prompt
The report preserved two topics: assessing a data distribution and finding a coin toss's expectation and distribution. Part 1 structures the first topic into a practice workflow; the variance derivations and the `n`-toss extension in Part 2 are explicit preparation extensions rather than additional reported interview details.
Answer both parts of this statistics question.
1. You receive an unlabeled one-dimensional numeric sample. Explain how you would assess what probability distribution could plausibly have generated it. State what can and cannot be concluded from finite data.
2. Let one coin toss be heads with probability `p`, independently across tosses. Define `X = 1` for heads and `X = 0` for tails. Identify the distribution, expectation, and variance of `X`. Then define `S_n` as the number of heads in `n` tosses and identify its distribution, expectation, and variance.
### Constraints & Assumptions
- In Part 1, do not assume observations are independent or identically distributed until you have examined how they were collected.
- The sample may be rounded, censored, truncated, mixed across populations, or contaminated by outliers.
- A good visual fit is not proof that the named distribution is the data-generating truth.
- In Part 2, `0 <= p <= 1`, `n` is a nonnegative integer, and tosses are independent with the same `p`.
### Clarifying Questions to Ask
- What does each observation measure, and what values are theoretically possible?
- How were observations sampled, ordered, filtered, rounded, or censored?
- Is the goal description, simulation, tail-risk estimation, or a formal modeling assumption?
- Are there known subpopulations or time effects?
- For the coin, is `p` known, and are independence and identical probability justified?
### Part 1: Distribution Assessment
Give a disciplined workflow from data provenance and empirical summaries through candidate fitting, diagnostics, validation, and communication of uncertainty.
#### Hints
Support and collection mechanism can rule out models before a formal goodness-of-fit statistic is computed. Compare consequences in the part of the distribution that matters for the decision.
#### What This Part Should Cover
```premium-lock What This Part Should Cover
```
### Part 2: Coin-Toss Derivation
Derive the requested distributions and moments rather than quoting only the final formulas. Explain which assumptions make the derivation valid.
#### Hints
Use indicator variables and linearity of expectation. Independence is not needed for linearity, but it matters for the stated binomial distribution and the simple variance sum.
#### What This Part Should Cover
```premium-lock What This Part Should Cover
```
### What a Strong Answer Covers
```premium-lock What a Strong Answer Covers
```
### Follow-up Questions
1. Why can a standard goodness-of-fit p-value be invalid after estimating parameters on the same data?
2. How would time dependence change your diagnostics and uncertainty estimates?
3. If the tosses have different head probabilities, what is the distribution of their sum?
4. What changes if coin tosses are correlated?
5. How would you estimate `p` and quantify uncertainty from observed tosses?
Quick Answer: Strengthen statistics fundamentals by assessing which distributions plausibly fit a finite sample and deriving coin-toss moments. Practice checking data provenance, support, dependence, diagnostics, uncertainty, and the assumptions behind Bernoulli and binomial models.