Logo

Question preview

Waiting for a Prime

What this preview is

About this preview

Waiting for a Prime is a medium quant interview question on probability.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

What this expected-value interview question tests

This is a medium-difficulty probability question that asks you to compute an expected value in a finite, ordered sequence. It combines discrete probability with careful enumeration, rewarding candidates who can set up the problem cleanly and work through the logic without getting lost in notation.

To solve problems like this, you need to identify which numbers fall into each category (prime vs. non-prime), then reason about the position of the first occurrence of a target element. The key insight is often to condition on where the first prime appears and weight each outcome by its probability. Firms use these questions to see whether you can structure your thinking, handle conditional probabilities, and arrive at a precise numerical answer.

  • Identifying primes in a bounded range
  • Position distributions and order statistics
  • Conditioning on the location of a specific event
  • Translating word problems into probability formulas