← Google Interview Insights

Google·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
May 2026Remote

Summary

A stats-heavy Google data scientist interview that was basically a probability theory exam. Four parts covering normal distributions, MLE derivations, bivariate conditionals, and bias correction. No behavioral fluff, just math.

Questions Asked (4)

Q1

Write the pdf and cdf of a Normal distribution with mean μ and variance σ², then express P(μ − σ ≤ X₁ ≤ μ + σ) in terms of the standard Normal cdf Φ.

Product Analytics & MetricsTechnical Trade-offs
Author's notes

This felt like a warmup but I fumbled the cdf notation at first, wrote it without the standardization step and had to backtrack.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by writing the PDF and CDF of the Normal distribution with mean μ and variance σ², then standardize the random variable X₁ to Z = (X₁ - μ)/σ. Use the properties of the standard Normal distribution to express the probability in terms of Φ, recognizing that P(μ - σ ≤ X₁ ≤ μ + σ) = P(-1 ≤ Z ≤ 1) = Φ(1) - Φ(-1) = 2Φ(1) - 1.

Pro tip: Emphasize that the result is a constant (approximately 0.6826) independent of μ and σ, which is the well-known 68-95-99.7 rule. This shows you understand the practical significance of the standard deviation in a Normal distribution.

1. Write the PDF

State the probability density function of the Normal distribution: f(x) = (1/(σ√(2π))) * exp(-(x-μ)²/(2σ²)) for x ∈ ℝ.

2. Write the CDF

State the cumulative distribution function: F(x) = P(X ≤ x) = ∫_{-∞}^{x} f(t) dt, which has no closed form in elementary functions.

3. Standardize the variable

Define Z = (X₁ - μ)/σ, which follows a standard Normal distribution with mean 0 and variance 1. Then rewrite the probability: P(μ - σ ≤ X₁ ≤ μ + σ) = P(-1 ≤ Z ≤ 1).

4. Express in terms of Φ

Use the standard Normal CDF Φ(z) = P(Z ≤ z) to write P(-1 ≤ Z ≤ 1) = Φ(1) - Φ(-1).

5. Simplify using symmetry

Apply the symmetry property Φ(-z) = 1 - Φ(z) to get Φ(1) - (1 - Φ(1)) = 2Φ(1) - 1.

Key Points to Mention

  • The PDF integrates to 1 over the real line.
  • The CDF is the integral of the PDF and gives the probability that X is less than or equal to a value.
  • Standardization transforms any Normal variable to a standard Normal variable.
  • The symmetry of the standard Normal distribution: Φ(-z) = 1 - Φ(z).
  • The numerical value 2Φ(1) - 1 ≈ 0.6826, illustrating the 68-95-99.7 rule.
  • The result is independent of μ and σ, depending only on the number of standard deviations from the mean.

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

Q2

Derive the MLEs of μ and σ² under three scenarios: σ² known, both unknown, and μ constrained to be non-negative. For the constrained case, explain what the MLE is when the unconstrained estimate is negative.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

The first two cases are textbook and I got through them fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by writing the likelihood function for a normal sample, then derive the MLEs for each scenario by maximizing the log-likelihood. For the constrained case, use the fact that the parameter space is restricted, so the MLE is the projection of the unconstrained MLE onto the constraint set. Explain the boundary solution when the unconstrained estimate is negative.

Pro tip: Emphasize that the constrained MLE is not simply setting the negative estimate to zero; it's the projection onto the feasible region, which for a single constraint is indeed zero, but you should justify it via the Karush-Kuhn-Tucker conditions or by checking the likelihood at the boundary.

1. Set up the likelihood

Write the joint probability density function for i.i.d. normal observations, then take the natural logarithm to obtain the log-likelihood function.

2. Derive MLEs for known σ²

Maximize the log-likelihood with respect to μ only, treating σ² as fixed. The MLE is the sample mean.

3. Derive MLEs for both unknown

Maximize the log-likelihood jointly over μ and σ². The MLEs are the sample mean for μ and the biased sample variance (dividing by n) for σ².

4. Derive MLE for constrained μ ≥ 0

Maximize the log-likelihood subject to μ ≥ 0. The unconstrained MLE is the sample mean; if it is non-negative, it remains the MLE. If it is negative, the constrained MLE is 0, and σ² MLE is adjusted accordingly.

5. Explain the boundary case

When the unconstrained estimate is negative, the likelihood is decreasing in μ over the feasible region, so the maximum occurs at the boundary μ = 0. The MLE for σ² becomes the second moment about zero (i.e., the mean of squared observations).

Key Points to Mention

  • The log-likelihood function for a normal sample: ℓ(μ, σ²) = -n/2 log(2π) - n/2 log(σ²) - 1/(2σ²) Σ(x_i - μ)².
  • For known σ², the MLE of μ is the sample mean, which is unbiased and efficient.
  • For both unknown, the MLE of σ² is the biased sample variance (dividing by n), not the unbiased version (dividing by n-1).
  • In the constrained case, the parameter space is restricted to μ ≥ 0, so the MLE is the projection of the unconstrained MLE onto [0, ∞).
  • If the unconstrained MLE (sample mean) is negative, the constrained MLE is μ̂ = 0, and σ̂² = (1/n) Σ x_i².
  • This illustrates a general principle: constrained MLEs can lie on the boundary of the parameter space, and the likelihood must be checked at the boundary.

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

Q3

For a bivariate Normal (X, Y), derive the conditional distribution of X given Y = y. Give the conditional mean, variance, pdf, and cdf, then compute P(X > t | Y = y) using Φ.

Data ModelingTechnical Trade-offs
Author's notes

Probably the hardest part.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by stating the bivariate normal setup and the known result that the conditional distribution of X given Y=y is normal. Then derive the conditional mean and variance using the joint parameters, write the pdf and cdf, and finally compute the tail probability using the standard normal CDF Φ. Emphasize the linearity and homoscedasticity of the conditional distribution.

Pro tip: Mention that the conditional variance does not depend on y, which is a unique property of the normal distribution and important for modeling. Also, connect this to practical applications like Gaussian processes or linear regression.

1. Set up the bivariate normal distribution

Define the joint distribution with means μ_X, μ_Y, variances σ_X^2, σ_Y^2, and correlation ρ. Write the joint pdf or simply state the parameters.

2. Derive the conditional mean and variance

Use the known formulas: E[X|Y=y] = μ_X + ρ (σ_X/σ_Y)(y - μ_Y) and Var(X|Y=y) = σ_X^2 (1 - ρ^2). Explain that these come from the properties of the multivariate normal.

3. Write the conditional pdf and cdf

State that X|Y=y ~ N(μ_{X|Y}, σ_{X|Y}^2). Write the pdf explicitly and express the cdf in terms of Φ: F_{X|Y}(x|y) = Φ((x - μ_{X|Y})/σ_{X|Y}).

4. Compute the tail probability

For P(X > t | Y=y), standardize: P(X > t | Y=y) = 1 - Φ((t - μ_{X|Y})/σ_{X|Y}) = Φ((μ_{X|Y} - t)/σ_{X|Y}) due to symmetry.

Key Points to Mention

  • The conditional distribution is normal (Gaussian).
  • Conditional mean is linear in y: μ_X + ρ (σ_X/σ_Y)(y - μ_Y).
  • Conditional variance is constant: σ_X^2 (1 - ρ^2), independent of y.
  • The pdf and cdf are those of a normal distribution with the derived mean and variance.
  • Tail probability uses the standard normal CDF Φ, with proper standardization.
  • Connection to linear regression: the conditional mean is the regression line.

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

Q4

Is the standard MLE of σ² unbiased? If not, what is an unbiased estimator, and how does it relate to the MLE?

Product Analytics & MetricsTechnical Trade-offs
Author's notes

No, the MLE divides by n and has expected value (n−1)/n times σ², so it's biased downward.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by stating the standard MLE of σ² is biased, then derive the bias and present the unbiased estimator. Explain the relationship between the two estimators and discuss practical implications.

Pro tip: Mention that while the unbiased estimator is often preferred, the MLE's bias decreases with sample size, and in some contexts (e.g., predictive modeling) the biased version might be used for its lower MSE.

1. Define the MLE

State that the MLE of σ² is the average of squared residuals: σ̂²_MLE = (1/n) Σ (X_i - X̄)².

2. Show bias

Compute the expectation: E[σ̂²_MLE] = ((n-1)/n) σ², which is less than σ², hence biased.

3. Provide unbiased estimator

Introduce the unbiased estimator: s² = (1/(n-1)) Σ (X_i - X̄)², which corrects the bias.

4. Relate the two

Show that s² = (n/(n-1)) σ̂²_MLE, and discuss how the bias diminishes as n grows.

5. Discuss practical implications

Mention that the choice depends on context: unbiasedness for inference, MLE for large samples or when minimizing MSE is desired.

Key Points to Mention

  • MLE of σ² is biased downward.
  • Bias factor is (n-1)/n.
  • Unbiased estimator uses n-1 in denominator.
  • Relationship: s² = (n/(n-1)) σ̂²_MLE.
  • Bias decreases as sample size increases.
  • Trade-off between bias and variance (MSE).

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