Compute probabilities and expectations in random processes
Company: Optiver
Role: Data Scientist
Category: Statistics & Math
Difficulty: easy
Interview Round: Take-home Project
You are asked to solve the following probability/expectation questions. Unless stated otherwise, assume all random choices are **uniform** and **independent**.
1. **Distinct digits**: Choose an integer uniformly at random from **1 to 10,000** (inclusive). What is the probability that **all digits in its decimal representation are distinct** (no repeated digit)?
2. **Stop when > 4**: Roll a fair six-sided die repeatedly until you roll a value **greater than 4** (i.e., 5 or 6). What is the **expected sum** of all rolls?
3. **3-card rank product**: From a standard 52-card deck, draw 3 cards uniformly without replacement. Map ranks as **A=1, 2–10 as themselves, J=11, Q=12, K=13**. What is the **expected value of the product** of the three ranks?
4. **Cancel H/T pairs**: Toss **100 fair coins**. Pairwise remove one Head and one Tail repeatedly (i.e., cancel H against T one-for-one). Let the number of coins left be the number of unmatched flips. What is the **expected remaining number of coins**?
5. **Stop on two identical in a row (sum)**: Roll a fair die until you first see **two consecutive rolls equal** (e.g., 2 then 2). What is the **expected sum** of all rolls?
6. **Run of 3 identical in 8 flips**: Toss a fair coin **8 times** (sequence order matters). What is the probability that the sequence contains **at least one run of 3 consecutive identical outcomes** (HHH or TTT anywhere)?
7. **1D random walk with die-based steps**: Start at position 0. Each step, roll a die:
- If the roll is 1,2,3: move **right** by that many units.
- If the roll is 4,5,6: move **left** by (roll − 3) units (so steps are −1,−2,−3).
What is the **expected number of steps** until your distance from the origin is at least 10 (i.e., |position| ≥ 10)?
8. **Two 3-digit numbers difference is two-digit**: Pick two integers independently and uniformly from **100 to 999**. What is the probability that their **absolute difference** is a **two-digit number** (i.e., between 10 and 99 inclusive)?
9. **Two particles on an octagon**: On a cycle graph with 8 vertices (an octagon), place two particles at opposite vertices (distance 4 along the cycle). Each second, independently for each particle, flip a fair coin to decide whether it moves one step **clockwise** or **counterclockwise**. What is the **expected number of seconds** until they occupy the same vertex?
10. **Per-face running sums to 100**: Roll a fair die repeatedly. Maintain, for each face i∈{1,…,6}, a running sum S_i equal to the sum of all i’s rolled (equivalently S_i = i × count_i). Stop as soon as **any** S_i reaches **at least 100**. At that stopping time, what is the **expected number of even rolls** (2,4,6) observed?
11. **13 cards with no aces**: Draw 13 cards uniformly without replacement from a standard 52-card deck. What is the probability that the hand contains **no aces**?
12. **2D walk to boundary of 10×10 grid**: A particle starts at the center of a **10×10 grid** (assume the natural discrete model where interior states form a 10×10 set and boundary states are the outer ring). Each second, flip two fair coins:
- HH: move North 1
- TT: move South 1
- HT: move West 1
- TH: move East 1
What is the **expected time** to hit the boundary?
13. **Expectation of 2^(sum of 3 dice)**: Roll 3 fair dice. Compute \(\mathbb{E}[2^{X_1+X_2+X_3}]\).
14. **Stop on two identical in a row (product)**: Roll a fair die until you first see two consecutive equal results. What is the **expected product** of all rolls?
15. **Bankruptcy probability in 10 rolls**: Start with $10. Roll a fair die exactly 10 times. If the roll is even, **add** the face value to your money; if odd, **subtract** the face value. What is the probability you go **bankrupt at any time** during the 10 rolls (money ≤ 0 at some step)?
16. **No overlap in two length-3 samples (1..10)**: You and a friend each independently draw 3 numbers from {1,…,10} **with replacement**. What is the probability that **none** of your numbers appears in your friend’s three draws?
17. **Last die is 2 when exceeding 100**: Roll a fair die repeatedly until the running total sum first **exceeds 100**. What is the probability that the **last roll** is exactly 2?
Quick Answer: This set of probability and expectation questions evaluates probabilistic reasoning, combinatorial counting, stochastic process intuition, and quantitative expectation calculation skills relevant to Data Scientist roles and the Statistics & Math domain.