← JP Morgan Interview Insights

JP Morgan·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Quant Engineer interview at JP Morgan with a pretty heavy statistics focus. One question in particular on goodness-of-fit testing caught me more off guard than it should have given how foundational it is.

Questions Asked (1)

Q1

How would you test whether a sample follows a binomial distribution? Walk through which goodness-of-fit tests apply here and what their assumptions and limitations are.

A/B Testing & ExperimentationTechnical Trade-offs
Author's notes

I went straight to chi-square and it was fine but I fumbled when they pushed on the Kolmogorov-Smirnov side of things.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data structure and what 'follows a binomial distribution' means in context, then outline a two-part strategy: first check the binomial assumptions (fixed n, independent trials, constant p), then apply goodness-of-fit tests such as the chi-square or likelihood ratio test. Discuss the assumptions and limitations of each test, and mention alternatives like the exact binomial test or dispersion checks when assumptions are violated.

Pro tip: Emphasize that in practice, overdispersion is common and can invalidate the standard chi-square test; suggesting a check for overdispersion (e.g., comparing variance to mean) shows deeper statistical maturity and practical awareness.

1. Clarify the data and hypothesis

Ask whether the data are counts of successes in a fixed number of trials per observation, and confirm the null hypothesis that the counts follow Binomial(n, p) for some p. This ensures you understand the structure before choosing a test.

2. Verify binomial assumptions

Check that the number of trials n is fixed and known, trials are independent, and the probability of success p is constant across trials. Violations (e.g., varying n or p) mean the binomial model may not be appropriate.

3. Choose and apply goodness-of-fit tests

Use a chi-square goodness-of-fit test comparing observed frequencies of each possible count (0 to n) to expected binomial probabilities, or a likelihood ratio test (G-test). For small samples, consider exact tests or Monte Carlo methods.

4. Assess assumptions and limitations of the tests

Note that the chi-square test requires expected frequencies of at least 5 in each bin, which may require pooling categories. It also assumes independent observations and may be sensitive to overdispersion. The likelihood ratio test has similar assumptions but can be more powerful.

5. Consider alternatives and robustness checks

If assumptions are violated, consider using a beta-binomial model to account for overdispersion, or a dispersion test. Also, discuss the impact of parameter estimation (p estimated from data) on degrees of freedom.

Key Points to Mention

  • Chi-square goodness-of-fit test: compare observed vs expected frequencies, with expected counts ≥5 per bin.
  • Likelihood ratio test (G-test) as an alternative to chi-square, especially for small samples.
  • Assumptions: fixed n, independent trials, constant p; violations require different models.
  • Limitations: sensitivity to binning, low power with small samples, overdispersion leading to inflated Type I error.
  • Overdispersion check: compare variance to mean; if variance > mean, consider beta-binomial or negative binomial.
  • Parameter estimation: if p is estimated from data, adjust degrees of freedom (df = k - 1 - number of estimated parameters).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.