← JP Morgan Interview Insights

JP Morgan·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Quant Engineer screen at JP Morgan, pretty much a probability and expected value focused session. The dice problem sounds trivial but they push you into extensions fast, so knowing just the basics isn't enough.

Questions Asked (3)

Q1

You roll a fair six-sided die and win the dollar amount shown. What is the expected value of one play, and what is the most you should rationally pay to play?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Pretty clean calculation once you remember expected value is just the probability-weighted average.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clearly defining the random variable and its distribution, then compute the expected value using the formula for a discrete uniform distribution. Finally, interpret the result to determine the maximum rational price to play, emphasizing that paying exactly the expected value yields zero profit in the long run.

Pro tip: Mention that while the expected value is $3.50, risk aversion or utility theory might make a rational person pay less, and in a real-world scenario, the house would charge more than $3.50 to profit—this shows you understand both the math and its practical implications.

1. Define the random variable and distribution

Let X be the winnings from one roll. X is uniformly distributed over {1,2,3,4,5,6} with each outcome having probability 1/6.

2. Compute the expected value

Calculate E[X] = (1+2+3+4+5+6)/6 = 21/6 = 3.5. This represents the average winnings per play over many repetitions.

3. Determine the maximum rational price to play

The most you should pay is the expected value, $3.50, because paying more would result in a negative expected net gain. Paying exactly $3.50 yields a fair game with zero expected profit.

4. Discuss practical considerations

Acknowledge that in reality, factors like risk aversion, utility of money, and the counterparty's need for profit might influence the decision, but from a purely expected-value standpoint, $3.50 is the threshold.

Key Points to Mention

  • Expected value formula for a discrete uniform distribution: sum of outcomes divided by number of outcomes.
  • Calculation: (1+2+3+4+5+6)/6 = 3.5.
  • Interpretation: The fair price to play is $3.50; paying more leads to negative expected value.
  • Risk neutrality assumption: The decision assumes the player is risk-neutral and only cares about expected monetary value.
  • Real-world context: Casinos or games typically charge more than expected value to ensure profit.
  • Utility theory: Risk-averse individuals might pay less than $3.50, while risk-seeking individuals might pay more.

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

Q2

How does the expected value change if you can pay a fee to reroll after seeing your first result? What is the optimal strategy and the value of that option?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

This is where I started sweating a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, clarify the base game (e.g., rolling a fair die) and compute its expected value. Then, model the reroll option as a real option: after seeing the first result, you can either keep it or pay a fee to reroll and accept the new outcome. Determine the optimal threshold by comparing the first roll to the expected value of rerolling minus the fee, and compute the overall expected value with the option.

Pro tip: Frame the problem in financial terms: the fee is like an option premium, and the decision rule is a threshold policy. This shows you can connect algorithms to business value, which is highly valued at JP Morgan.

1. Clarify the base game

Confirm the rules: what is the random variable (e.g., fair six-sided die), and what is the initial expected value without any reroll option?

2. Define the decision rule

After the first roll, you observe a value x. You can keep x or pay a fee f to reroll and accept the new outcome. The optimal decision is to reroll if x < E[reroll] - f, where E[reroll] is the expected value of a fresh roll.

3. Compute the threshold

Set the threshold T = E[reroll] - f. Since a reroll gives the original expected value μ, T = μ - f. Reroll if x < T, otherwise keep x.

4. Calculate the overall expected value

The expected value with the option is the average over all possible first rolls of the maximum between keeping x and the net value of rerolling (μ - f). This can be computed as (1/n) * sum over x of max(x, μ - f).

5. Analyze the value of the option

The value of the option is the difference between the expected value with the option and the base expected value μ. Discuss how this changes with the fee f and the distribution.

Key Points to Mention

  • Expected value of the base game (e.g., 3.5 for a fair die).
  • Threshold strategy: reroll if first roll is below a certain value.
  • The threshold is the expected value of rerolling minus the fee.
  • The overall expected value is the average of the maximum of keeping and rerolling.
  • The value of the option is the increase in expected value over the base game.
  • The optimal strategy depends on the fee: if fee is too high, never reroll; if fee is zero, reroll if below the mean.

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

Q3

If you roll two dice and win the sum, what is the expected value? Then what if you win the maximum of the two rolls instead of the sum?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Sum case is easy, linearity of expectation means it's just 3.5 + 3.5 = 7.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: two fair six-sided dice, and we need the expected value of the sum and then the expected value of the maximum. For the sum, use linearity of expectation. For the maximum, either enumerate all 36 outcomes or use the distribution of the maximum (P(max ≤ k) = (k/6)^2) to compute the expected value.

Pro tip: Mention that linearity of expectation works even if the dice are not independent, but for the maximum, independence is crucial for the distribution calculation. Also, note that the expected maximum is higher than the expected sum divided by 2, which might be counterintuitive.

1. Clarify the problem

Confirm that the dice are fair and six-sided, and that we are calculating expected values for two separate scenarios: sum and maximum.

2. Expected value of sum

Use linearity of expectation: E[X+Y] = E[X] + E[Y]. Since each die has expected value 3.5, the sum is 7.

3. Expected value of maximum

Compute the distribution of the maximum: P(max ≤ k) = (k/6)^2 for k=1..6. Then use E[max] = Σ P(max ≥ k) or E[max] = Σ k * P(max = k).

4. Calculate and verify

Compute the expected maximum: E[max] = Σ_{k=1}^6 P(max ≥ k) = Σ_{k=1}^6 (1 - ((k-1)/6)^2) = 161/36 ≈ 4.472. Alternatively, enumerate all 36 outcomes to verify.

5. Discuss implications

Note that the expected maximum (≈4.47) is greater than half the expected sum (3.5), which makes sense because the maximum is biased toward higher values.

Key Points to Mention

  • Linearity of expectation for the sum: E[X+Y] = E[X] + E[Y] = 3.5 + 3.5 = 7.
  • For the maximum, use the cumulative distribution: P(max ≤ k) = (k/6)^2.
  • Expected value of maximum can be computed as Σ_{k=1}^6 P(max ≥ k) = 161/36 ≈ 4.472.
  • Alternatively, enumerate all 36 outcomes to find the distribution of the maximum.
  • The expected maximum is higher than the expected value of a single die (3.5) and higher than half the expected sum.
  • Independence of dice is assumed for the distribution of the maximum.

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