Math in AI Interviews
What level of math is actually expected at Google, Meta, and Amazon — and how to communicate mathematical reasoning so that interviewers walk away impressed.
Why Math Matters in AI Interviews
Every major tech company tests statistics and probability in AI/ML interviews. This is not because they want you to prove theorems on a whiteboard — it is because mathematical reasoning underpins every decision an ML engineer or data scientist makes. When you choose a loss function, evaluate an A/B test, or debug a model, you are applying statistical thinking whether you realize it or not.
What Each Company Expects
The depth of math varies by role and company, but here is a practical breakdown:
| Company / Role | Math Depth Expected | Common Topics |
|---|---|---|
| Google — ML Engineer | Moderate to Deep | Probability, Bayes, distributions, A/B testing, information theory |
| Meta — Data Scientist | Deep (statistics-heavy) | Hypothesis testing, experimental design, causal inference, p-values |
| Amazon — Applied Scientist | Moderate | Probability puzzles, Bayes, basic hypothesis testing, distributions |
| Any — ML Research | Very Deep | Measure theory, optimization, convergence proofs, statistical learning theory |
| Any — Data Analyst | Moderate | Descriptive statistics, hypothesis testing, A/B testing, confidence intervals |
The Three Levels of Mathematical Communication
Strong candidates can operate at all three levels and switch between them based on the interviewer's signals:
-
Level 1: Intuition (Always Start Here)
Explain the concept as if talking to a smart colleague who is not a statistician. Use analogies and real-world examples. Example: "Bayes' theorem lets us update our beliefs when we get new evidence. If a medical test is positive, Bayes' theorem tells us the actual probability of being sick by accounting for how common the disease is and how accurate the test is."
-
Level 2: Formal Definition
State the mathematical formula and define each term. Example: "P(A|B) = P(B|A) * P(A) / P(B), where P(A|B) is the posterior, P(B|A) is the likelihood, P(A) is the prior, and P(B) is the evidence or normalizing constant."
-
Level 3: Worked Example with Numbers
Solve a concrete problem step by step. Example: "If 1% of people have a disease and the test has 99% sensitivity and 95% specificity, what is the probability someone who tests positive actually has the disease? Let me work through this..."
How to Structure a Math Answer
When faced with a probability or statistics question in an interview, follow this framework:
-
Restate the Problem
Paraphrase the question to confirm you understand it. Identify what is given and what is being asked. This also buys you thinking time. "So we are asked to find the probability that at least two people in a group of 30 share a birthday..."
-
Identify the Approach
Name the concept or technique you will use. "This is a classic complement counting problem — it is easier to compute the probability that no two people share a birthday and subtract from 1."
-
State Key Assumptions
Make your assumptions explicit. "I will assume 365 equally likely birthdays, ignoring leap years. In practice, birthdays are not uniformly distributed, which would actually make collisions more likely."
-
Solve Step by Step
Work through the math clearly, narrating each step. Write intermediate results. Do not skip steps even if they seem obvious to you.
-
Sanity Check
Verify your answer makes sense. Check boundary cases. "For n=1, the probability should be 0. For n=366, it should be 1. Our formula gives the right values at both extremes."
Common Mistakes to Avoid
Mistake 2: Confusing independence and mutual exclusivity. Two events can be independent but not mutually exclusive (e.g., flipping two separate coins). Two events can be mutually exclusive but not independent (e.g., getting heads and tails on the same flip).
Mistake 3: Ignoring base rates. The most common Bayes' theorem mistake. A test with 99% accuracy does not mean a positive result has a 99% chance of being correct — it depends on the prevalence of the condition.
Mistake 4: p-value misinterpretation. A p-value of 0.03 does NOT mean there is a 3% chance the null hypothesis is true. It means: if the null hypothesis were true, there would be a 3% chance of seeing data this extreme or more extreme.
What This Course Covers
This course contains 69+ real interview questions organized into 8 lessons. Each question includes a detailed model answer with step-by-step solutions. The questions are drawn from actual interviews at Google, Meta, Amazon, and other top tech companies.
Lesson 3 — Common Distributions: 10 questions on normal, binomial, Poisson, exponential, and uniform distributions.
Lesson 4 — Hypothesis Testing: 12 questions on p-values, t-tests, chi-squared, ANOVA, and multiple testing correction.
Lesson 5 — Bayesian Statistics: 10 questions on priors, posteriors, MAP estimation, and Bayesian vs frequentist approaches.
Lesson 6 — Probability Puzzles: 15 classic puzzles including Monty Hall, Birthday Problem, and Coupon Collector.
Lesson 7 — A/B Testing Math: 10 questions on sample sizes, power analysis, sequential testing, and multi-armed bandits.
Lesson 8 — Quick Reference: Formula cheat sheet, distributions table, and FAQ accordion.
Lilly Tech Systems