← Citibank Interview Insights

Citibank·Data Scientist·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jul 2026

Summary

Citibank data scientist interview that went pretty deep into probability and expected value territory. The main question was a multi-part die-rolling problem that escalated from a clean derivation into generalization and then a break-even cost analysis. Not what I was expecting from a bank role but here we are.

Questions Asked (3)

Q1

You roll a fair six-sided die repeatedly, collecting the face value each roll. You must keep rolling if you get 4, 5, or 6, and stop on 1, 2, or 3. Derive the expected total payout, showing your work via conditioning on the stopping time or an infinite series.

Algorithms & Data StructuresProduct Analytics & Metrics
Author's notes

This part I actually handled okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Define the expected total payout E as the sum of the first roll plus the expected future payout if the first roll is 4, 5, or 6. Set up a recursive equation E = (1/6)(1+2+3) + (1/6)(4+5+6) + (1/2)E, then solve for E. Alternatively, derive E using an infinite series by conditioning on the number of rolls until stopping.

Pro tip: After solving, briefly verify the result by simulation or by checking that the expected number of rolls is 2, which gives a sanity check on the magnitude of E.

1. Define the random variable and stopping condition

Let X_i be the i-th roll and N be the stopping time (first roll in {1,2,3}). The total payout is S = sum_{i=1}^N X_i. We need E[S].

2. Set up recursion by conditioning on the first roll

Condition on the first roll: if it's 1,2,3, stop and payout is that value; if it's 4,5,6, payout is that value plus a fresh expected total. This gives E = (1/6)(1+2+3) + (1/6)(4+5+6) + (1/2)E.

3. Solve the equation for E

Simplify: E = (6/6) + (15/6) + (1/2)E = 1 + 2.5 + 0.5E = 3.5 + 0.5E. Then 0.5E = 3.5, so E = 7.

4. Alternative: infinite series approach

Express E as sum_{k=0}^∞ P(N > k) * E[roll | continue]? Actually, use E[S] = sum_{i=1}^∞ E[X_i * I(N ≥ i)]. Since N ≥ i iff first i-1 rolls are in {4,5,6}, P(N ≥ i) = (1/2)^{i-1}. Then E[S] = sum_{i=1}^∞ (1/2)^{i-1} * E[X_i | N ≥ i]? But X_i is independent of N ≥ i? Not exactly, but given N ≥ i, the i-th roll is still uniform? Actually, conditioning on N ≥ i means the first i-1 rolls were 4,5,6, but the i-th roll is independent of that event? Yes, because rolls are independent. So E[X_i | N ≥ i] = E[X_i] = 3.5. Thus E[S] = 3.5 * sum_{i=1}^∞ (1/2)^{i-1} = 3.5 * 2 = 7.

5. Verify and interpret

Check that the expected number of rolls is 2, and the average value per roll is 3.5, giving 7. This matches the recursion result.

Key Points to Mention

  • Conditioning on the first roll to set up a recursive equation.
  • Solving the linear equation E = 3.5 + 0.5E to get E = 7.
  • Using the infinite series approach with indicator variables and independence.
  • Recognizing that the expected number of rolls is 2 (geometric with p=1/2).
  • The expected value of a fair die is 3.5.
  • Verifying the answer via simulation or alternative method.

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

Q2

Generalize the die problem: suppose P(forced to roll again) = p and the expected value of a single roll is μ. Express the expected total payout in terms of p and μ.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Same recurrence, just with letters.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Set up a recursive equation for the expected total payout E, where E = μ + pE, since with probability p you are forced to roll again and the process restarts. Solve for E to get E = μ / (1 - p), assuming p < 1. Discuss the condition for convergence and interpret the result.

Pro tip: Mention that this is a geometric series and that p must be less than 1 for the expected value to be finite; otherwise the expected payout diverges. This shows you understand the underlying assumptions and can communicate them clearly.

1. Define the expected value

Let E be the expected total payout. Explain that the first roll always gives μ, and then with probability p you get another expected payout E.

2. Set up the recursive equation

Write E = μ + pE. This captures that the total expected payout is the first roll's expected value plus the expected value of the rest of the game, which occurs with probability p.

3. Solve for E

Rearrange the equation to get E(1 - p) = μ, so E = μ / (1 - p).

4. Discuss convergence and edge cases

State that this holds only if p < 1. If p = 1, the game never ends and the expected payout is infinite (or undefined). If p = 0, E = μ, which makes sense.

Key Points to Mention

  • Recursive equation: E = μ + pE
  • Solution: E = μ / (1 - p)
  • Geometric series interpretation
  • Condition for finite expectation: p < 1
  • Edge cases: p = 0 gives E = μ; p = 1 gives infinite expectation
  • Assumption that rolls are independent and identically distributed

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

Q3

Now suppose every roll after the first costs a fixed fee c. What value of c makes the game fair (expected net payout = 0)?

Algorithms & Data StructuresPricing & MonetizationTechnical Trade-offs
Author's notes

This is where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the game's rules and the stopping strategy (e.g., when the player chooses to stop). Then compute the expected number of rolls under the optimal strategy and set up the equation: expected payout = expected number of rolls × c, solving for c to make net expected value zero.

Pro tip: Demonstrate that you recognize the optimal stopping problem and that the fair fee depends on the player's strategy; mention that if the player can choose when to stop, the expected number of rolls is not simply the maximum possible but derived from dynamic programming.

1. Clarify the game and stopping rule

Ask or state the rules: what constitutes a roll, what the payout is, and whether the player can stop at any time. Confirm that the player acts optimally to maximize expected net payout.

2. Define the optimal stopping strategy

Determine the threshold or condition under which the player stops rolling. For example, if the payout is the value of the last roll, the player might stop when the roll exceeds a certain value.

3. Compute expected number of rolls

Using the optimal strategy, calculate the expected number of rolls (including the first free roll). This may involve solving equations or using dynamic programming.

4. Set up the fair game equation

Let E[N] be the expected number of rolls. The expected net payout is E[payout] - c*(E[N]-1) = 0, since the first roll is free. Solve for c = E[payout] / (E[N]-1).

5. Solve and interpret

Compute the numerical value of c and explain its meaning: it is the fee per additional roll that makes the game fair. Discuss sensitivity to assumptions.

Key Points to Mention

  • Optimal stopping strategy and dynamic programming
  • Expected value calculation and linearity of expectation
  • The first roll is free, so only subsequent rolls incur cost
  • Fair game condition: expected net payout = 0
  • Potential need to solve equations for expected number of rolls
  • Sensitivity of c to the payout distribution and stopping rule

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