← Upstart Interview Insights

Upstart·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jul 2026Remote

Summary

Stats-heavy technical screen for a DS role at Upstart. Two problems, both probability/estimation flavored. Felt more like a grad school exam than a typical DS interview, which I was not fully prepared for.

Questions Asked (4)

Q1

You have n i.i.d. measurements from a single unbiased thermometer with known variance. Propose an estimator for the true temperature and derive its variance.

Product Analytics & MetricsAlgorithms & Data Structures
Author's notes

The sample mean is the obvious answer and I got there fine.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by recognizing that with i.i.d. unbiased measurements and known variance, the sample mean is the natural estimator. Derive its variance as σ²/n, and briefly justify why it's optimal (e.g., by the Gauss-Markov theorem or Cramér-Rao lower bound).

Pro tip: Mention that the sample mean is the maximum likelihood estimator under normality and is also the best linear unbiased estimator (BLUE) even without normality. This shows depth and connects to broader statistical principles.

1. Define the model

State that measurements X₁, X₂, ..., Xₙ are i.i.d. with mean μ (true temperature) and known variance σ². Assume unbiasedness: E[Xᵢ] = μ.

2. Propose the estimator

Propose the sample mean X̄ = (1/n) Σ Xᵢ as the estimator for μ. Explain that it's intuitive and leverages all data equally.

3. Derive the variance

Compute Var(X̄) = Var((1/n) Σ Xᵢ) = (1/n²) Σ Var(Xᵢ) = (1/n²)(nσ²) = σ²/n. Show the steps clearly.

4. Discuss optimality

Mention that X̄ is the minimum variance unbiased estimator (MVUE) for μ under normality, and by the Gauss-Markov theorem it's BLUE. Also note it achieves the Cramér-Rao lower bound.

5. Conclude and interpret

Summarize that the estimator is unbiased with variance decreasing as 1/n, so more measurements increase precision. Optionally, mention confidence intervals.

Key Points to Mention

  • i.i.d. assumption and unbiasedness
  • Sample mean as the estimator
  • Variance derivation: Var(X̄) = σ²/n
  • Law of Large Numbers (consistency)
  • Gauss-Markov theorem / BLUE
  • Cramér-Rao lower bound / efficiency

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

Q2

Now you have two sets of measurements from two independent thermometers, each unbiased but with different variances. Construct a linear unbiased combined estimator that minimizes variance. What are the optimal weights and the resulting variance?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This is the weighted least squares / inverse-variance weighting setup.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by setting up the problem: you have two unbiased estimators with variances σ₁² and σ₂². The goal is to find weights w and 1-w that minimize the variance of the combined estimator while maintaining unbiasedness. Use the method of Lagrange multipliers or simply minimize the variance function with respect to w, then derive the optimal weights and the resulting variance.

Pro tip: Emphasize that the optimal weights are inversely proportional to the variances, which is a fundamental result in estimation theory. Also, mention that this is a special case of the Gauss-Markov theorem for combining independent unbiased estimators.

1. Define the combined estimator

Let the combined estimator be θ̂ = w θ̂₁ + (1-w) θ̂₂, where θ̂₁ and θ̂₂ are the two unbiased estimators. Since both are unbiased, any convex combination is also unbiased.

2. Express the variance

Since the measurements are independent, the variance of the combined estimator is Var(θ̂) = w² σ₁² + (1-w)² σ₂².

3. Minimize the variance

Take the derivative of Var(θ̂) with respect to w, set it to zero, and solve for w. This yields w* = σ₂² / (σ₁² + σ₂²).

4. Find the optimal weights

The optimal weight for the first estimator is w* = σ₂² / (σ₁² + σ₂²), and for the second estimator is 1 - w* = σ₁² / (σ₁² + σ₂²). These are inversely proportional to their variances.

5. Compute the resulting variance

Substitute w* back into the variance expression to get Var(θ̂*) = (σ₁² σ₂²) / (σ₁² + σ₂²). This is the minimum achievable variance.

Key Points to Mention

  • Unbiasedness is preserved under linear combination if individual estimators are unbiased.
  • Independence of the two measurements is crucial for the variance of the sum to be the sum of variances.
  • The optimal weights are inversely proportional to the variances: w₁ ∝ 1/σ₁², w₂ ∝ 1/σ₂².
  • The resulting variance is the harmonic mean of the individual variances divided by 2? Actually, it's (σ₁² σ₂²)/(σ₁²+σ₂²), which is less than the minimum of the two variances.
  • This is a special case of the Gauss-Markov theorem or best linear unbiased estimator (BLUE).
  • In practice, if variances are unknown, you might need to estimate them, which introduces additional uncertainty.

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

Q3

For a 2D simple random walk where each step moves one unit in one of four directions with equal probability, compute the correlation between the x-coordinate and y-coordinate after n steps.

Algorithms & Data Structures
Author's notes

Zero.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, define the random walk mathematically: let X_n and Y_n be the net horizontal and vertical displacements after n steps. Then compute Cov(X_n, Y_n) and Var(X_n) to find the correlation. Use symmetry and independence of step directions to simplify the calculation.

Pro tip: Emphasize that the correlation is zero because the x and y coordinates are uncorrelated due to the independence of horizontal and vertical movements in each step. This demonstrates a deep understanding of the underlying stochastic process.

1. Define the random variables

Let X_n and Y_n represent the net displacement in the x and y directions after n steps. Each step is a random vector (ΔX, ΔY) taking values (1,0), (-1,0), (0,1), (0,-1) with equal probability 1/4.

2. Compute means and variances

Calculate E[X_n] = 0, E[Y_n] = 0 by symmetry. Compute Var(X_n) = E[X_n^2] = n/2 and similarly Var(Y_n) = n/2, since each step contributes 1 to either x or y with probability 1/2.

3. Compute covariance

Find Cov(X_n, Y_n) = E[X_n Y_n] - E[X_n]E[Y_n]. Since E[X_n]=E[Y_n]=0, Cov = E[X_n Y_n]. Show E[X_n Y_n] = 0 by noting that at each step, ΔX and ΔY cannot both be nonzero, and their product is always 0.

4. Calculate correlation

Use the formula Corr(X_n, Y_n) = Cov(X_n, Y_n) / sqrt(Var(X_n) Var(Y_n)). Since Cov = 0, the correlation is 0.

5. Interpret the result

Explain that the x and y coordinates are uncorrelated, meaning knowledge of one coordinate provides no linear information about the other. This is intuitive because horizontal and vertical movements are independent in each step.

Key Points to Mention

  • Definition of the 2D simple random walk and step distribution.
  • Symmetry arguments to establish zero means.
  • Variance calculation: each coordinate has variance n/2.
  • Covariance calculation: E[X_n Y_n] = 0 due to mutually exclusive movements.
  • Correlation formula and conclusion that correlation is zero.
  • Interpretation: uncorrelated does not imply independent, but here they are independent as well.

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

Q4

For the same 2D random walk, what is the correlation between the absolute values of the x and y coordinates after n steps? If a clean closed form is hard, give the sign and describe the asymptotic behavior.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This one genuinely stumped me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the model: a 2D simple symmetric random walk where each step is ±1 in x or y with equal probability. Then compute the correlation between |X_n| and |Y_n| by analyzing their joint distribution or using properties of simple random walks, and if a closed form is elusive, determine the sign and asymptotic behavior via simulation or known results.

Pro tip: Emphasize that while X_n and Y_n are independent, their absolute values are not; the correlation is positive due to the shared constraint that the total number of steps is fixed. This subtlety often trips up candidates.

1. Clarify the random walk model

State the assumptions: each step is either ±1 in x or y with equal probability, and steps are independent. Confirm that X_n and Y_n are independent random variables.

2. Express the correlation in terms of expectations

Write the correlation formula: Corr(|X_n|, |Y_n|) = (E[|X_n||Y_n|] - E[|X_n|]E[|Y_n|]) / (SD(|X_n|) SD(|Y_n|)). Note that E[|X_n||Y_n|] = E[|X_n|]E[|Y_n|] if |X_n| and |Y_n| were independent, but they are not.

3. Analyze the dependence between |X_n| and |Y_n|

Recognize that |X_n| and |Y_n| are negatively correlated in terms of the number of steps in each direction? Actually, they are positively correlated because if |X_n| is large, it likely means many steps were in the x-direction, leaving fewer steps for the y-direction, which tends to make |Y_n| smaller. So the correlation is negative? Wait, need to check: If many steps in x, then |X_n| large, but then fewer steps in y, so |Y_n| tends to be smaller. So negative correlation. But simulation shows positive? Let's think: For n=2, possible outcomes: (2,0), (0,2), (1,1), (1,-1), (-1,1), (-1,-1), (0,0)? Actually, steps: each step chooses x or y with prob 1/2, and sign ±1. So after n steps, the number of x-steps K ~ Binomial(n, 1/2). Given K, X_n is sum of K ±1's, so |X_n| has distribution related to K. Similarly, Y_n has n-K steps. So |X_n| and |Y_n| are dependent through K. If K is large, |X_n| tends to be larger, and n-K small, so |Y_n| tends to be smaller. So negative correlation. But wait, is that true? Let's test n=1: possible outcomes: (1,0), (-1,0), (0,1), (0,-1). |X| and |Y|: (1,0), (1,0), (0,1), (0,1). So pairs: (1,0) twice, (0,1) twice. E[|X|]=0.5, E[|Y|]=0.5. E[|X||Y|]=0. Cov = -0.25. Correlation = -0.25 / (0.5*0.5) = -1. So negative correlation. For n=2: possible outcomes: (2,0): |X|=2, |Y|=0; (0,2): 0,2; (1,1): 1,1; (1,-1): 1,1; (-1,1): 1,1; (-1,-1): 1,1; (0,0): 0,0? Actually, (0,0) can occur if one step x and one step y with opposite signs? No, (0,0) means X=0 and Y=0, which requires equal number of + and - in both, but total steps 2, so impossible unless one step x and one step y with signs? If one step x=+1 and one step y=-1, then X=1, Y=-1, not (0,0). So (0,0) not possible. So outcomes: (2,0) prob 1/8? Let's compute: each step: choose axis (1/2) and sign (1/2). So probability of (2,0): both steps x and both +: (1/2 * 1/2)^2? Actually, each step: P(x,+)=1/4, x,-=1/4, y,+ =1/4, y,-=1/4. For (2,0): need two x,+ steps: prob (1/4)^2 = 1/16. Similarly (2,0) can also be two x,- steps? That gives (-2,0), so |X|=2, |Y|=0. So (2,0) and (-2,0) each prob 1/16, total 1/8 for |X|=2, |Y|=0. Similarly (0,2) and (0,-2) total 1/8. Now (1,1): need one x step and one y step, with signs such that X=1, Y=1. Possibilities: x+ then y+ (prob 1/16), y+ then x+ (1/16) total 1/8. Similarly (1,-1): x+ then y- (1/16), y- then x+ (1/16) total 1/8. (-1,1): x- then y+ (1/16), y+ then x- (1/16) total 1/8. (-1,-1): x- then y- (1/16), y- then x- (1/16) total 1/8. So all four combinations of |X|=1, |Y|=1 have total probability 1/2. Also (0,0) not possible. So distribution: P(|X|=2, |Y|=0)=1/8, P(|X|=0, |Y|=2)=1/8, P(|X|=1, |Y|=1)=1/2. Check sum: 1/8+1/8+1/2=1. Now compute E[|X|] = 2*(1/8) + 0*(1/8) + 1*(1/2) = 1/4 + 1/2 = 3/4. Similarly E[|Y|]=3/4. E[|X||Y|] = (2*0)*(1/8) + (0*2)*(1/8) + (1*1)*(1/2) = 1/2. Cov = 1/2 - (3/4)^2 = 1/2 - 9/16 = -1/16. Var(|X|) = E[|X|^2] - (E[|X|])^2. E[|X|^2] = 4*(1/8) + 0*(1/8) + 1*(1/2) = 1/2 + 1/2 = 1. So Var = 1 - 9/16 = 7/16. SD = sqrt(7/16) ≈ 0.6614. Correlation = (-1/16) / (7/16) = -1/7 ≈ -0.1429. So negative correlation. So indeed negative. So the correlation is negative. Asymptotically, what happens? For large n, X_n and Y_n are approximately independent? But |X_n| and |Y_n| are dependent through the number of steps. Actually, as n grows, the number of x-steps K ~ Binomial(n, 1/2) has mean n/2 and variance n/4. The fluctuations in K are O(sqrt(n)). Given K, X_n is sum of K ±1's, so |X_n| ~ sqrt(K) * something? Actually, X_n is approximately normal with variance K, so |X_n| has expectation ~ sqrt(2K/π). Similarly |Y_n| ~ sqrt(2(n-K)/π). So the correlation between |X_n| and |Y_n| arises from the negative correlation between K and n-K. Since K and n-K are perfectly negatively correlated (K + (n-K) = n), the correlation between sqrt(K) and sqrt(n-K) is negative. As n grows, the relative fluctuations in K become smaller, so the correlation might vanish? Let's compute asymptotic correlation. We can use delta method. Let K = n/2 + sqrt(n)/2 * Z, where Z ~ N(0,1). Then |X_n| ≈ sqrt(2K/π) = sqrt(2(n/2 + sqrt(n)/2 Z)/π) = sqrt(n/π) * sqrt(1 + Z/sqrt(n)) ≈ sqrt(n/π) (1 + Z/(2 sqrt(n))). Similarly |Y_n| ≈

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