← Bnp Interview Insights

Bnp·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

BNP data scientist interview that leaned heavy on probability and statistics. The die-rolling problem showed up and it was more involved than I expected going in.

Questions Asked (2)

Q1

You roll a fair six-sided die n times independently. Derive a formula for the expected value of the maximum roll as a function of n.

Algorithms & Data StructuresProduct Analytics & Metrics
Author's notes

I knew the general approach using the CDF trick: E[max] = sum over k of P(max >= k), which you can rewrite using complements.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Use the tail-sum formula for expectation: E[M] = sum_{k=1}^6 P(M >= k). Compute P(M >= k) as 1 - P(all rolls < k) = 1 - ((k-1)/6)^n, then sum over k. This yields a closed-form expression that is easy to compute and interpret.

Pro tip: After deriving the formula, sanity-check it for n=1 (should give 3.5) and as n→∞ (should approach 6). Also mention that for large n, the maximum grows like 6 - 6/(n+1) approximately, which is a useful approximation in practice.

1. Define the random variable and goal

Let M = max(X_1, ..., X_n) where X_i are i.i.d. uniform on {1,...,6}. We want E[M] as a function of n.

2. Use the tail-sum formula for expectation

For a positive integer-valued random variable, E[M] = sum_{k=1}^6 P(M >= k). This avoids computing the full distribution of M.

3. Compute P(M >= k) using complement

P(M >= k) = 1 - P(M < k) = 1 - P(all X_i <= k-1) = 1 - ((k-1)/6)^n, for k=1,...,6. Note P(M >= 1)=1.

4. Sum to get the final formula

E[M] = sum_{k=1}^6 [1 - ((k-1)/6)^n] = 6 - sum_{j=0}^5 (j/6)^n. Simplify to E[M] = 6 - (1/6^n) * sum_{j=0}^5 j^n.

5. Validate and interpret

Check n=1 gives 3.5, n=2 gives about 4.472, and as n→∞, E[M]→6. Discuss the rate of convergence and practical implications.

Key Points to Mention

  • Independence of die rolls allows multiplication of probabilities.
  • Tail-sum formula for expectation (also known as the layer-cake representation).
  • Complement rule to compute P(M >= k) efficiently.
  • Closed-form expression: E[M] = 6 - (1/6^n) * sum_{j=0}^5 j^n.
  • Sanity checks for small n (n=1, n=2) and asymptotic behavior as n→∞.
  • Connection to order statistics and extreme value theory.

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

Q2

Using the same setup, derive a formula for the expected value of the minimum roll across n independent rolls of a fair six-sided die.

Algorithms & Data StructuresProduct Analytics & Metrics
Author's notes

Once you have the max derivation, the min is basically the mirror image using 1 minus the CDF.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Use the tail-sum formula for expectation: E[min] = sum_{k=1}^6 P(min >= k). Compute P(min >= k) as the probability that all n rolls are at least k, which is ((7-k)/6)^n. Then sum these probabilities to get the closed-form expression.

Pro tip: Mention that this approach generalizes to any discrete distribution and that the tail-sum formula is often more efficient than computing the full distribution of the minimum. Also, sanity-check with n=1 (expected value 3.5) and as n→∞ (expected value 1).

1. Define the random variable

Let X_i be the outcome of the i-th roll, and M = min(X_1, ..., X_n). We want E[M].

2. Apply the tail-sum formula

For a positive integer-valued random variable, E[M] = sum_{k=1}^6 P(M >= k). This avoids computing the PMF of M directly.

3. Compute P(M >= k)

M >= k if and only if every roll is at least k. Since rolls are independent, P(M >= k) = (P(X_1 >= k))^n = ((7-k)/6)^n for k=1,...,6.

4. Sum to get the expected value

E[M] = sum_{k=1}^6 ((7-k)/6)^n = sum_{j=1}^6 (j/6)^n, where j = 7-k. This is the final formula.

5. Verify with edge cases

Check n=1: sum_{j=1}^6 j/6 = 3.5, correct. As n→∞, the sum approaches 1, which makes sense since the minimum will almost surely be 1.

Key Points to Mention

  • Tail-sum formula for expectation: E[X] = sum_{k>=1} P(X >= k) for non-negative integer variables.
  • Independence of rolls allows P(min >= k) = (P(X >= k))^n.
  • For a fair six-sided die, P(X >= k) = (7-k)/6.
  • The final formula: E[min] = sum_{j=1}^6 (j/6)^n.
  • Sanity checks: n=1 gives 3.5, n→∞ gives 1.
  • The method generalizes to any discrete distribution and any order statistic.

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