Probability a Biased Strategy Hits Its Profit Target First

Last updated: November 29, 2026

Quick Overview

A strategy gains or loses one unit per trade, winning with probability p independently. Starting at zero, what is the probability it reaches +a before -b, and what is the expected number of trades when p = 1/2?

D. E. Shaw
Statistics & Math
Quantitative Researcher
D. E. Shaw
November 29, 2026
Quantitative Researcher
Onsite
Statistics & Math
Medium

0

0

0 solved


A strategy gains or loses one unit per trade, winning with probability p independently. Starting at zero, what is the probability it reaches +a before -b, and what is the expected number of trades when p = 1/2?

A classic random-walk question in the style of D. E. Shaw's quantitative onsites, dressed as a stop-loss versus take-profit problem. The interviewer checks that you can set up the boundary value recursion, solve it in closed form, and reason about the fair-coin limit and duration.

What the Interviewer Expects
  • Sets up $P_i = pP_{i+1} + qP_{i-1}$ with correct boundary conditions
  • Solves using the ratio $r = q/p$ and handles $p = 1/2$ separately
  • Gets $b/(a+b)$ for the fair case and $ab$ expected trades
  • Plugs in a concrete case and checks it makes sense
  • Connects the result to sizing stop-loss and take-profit levels
Key Topics to Cover
gambler's ruin
random walks
martingales
difference equations
How to Approach This
  1. Define your hypotheses (H0 and H1) clearly before performing any test.
  2. Calculate required sample size BEFORE running an experiment, using power analysis.
  3. Remember the Central Limit Theorem: sample means become approximately normal with large n.
  4. Watch for Simpson's paradox. Always segment data by key dimensions.
  5. Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
  • How does the answer change if a win pays 2 units and a loss costs 1?
  • What is the expected number of trades for a biased coin?
  • What happens to the probability as a goes to infinity with p > 1/2?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Browse Statistics Questions
Sample Answer
Clarify

Shift so the walk lives on 0..N0..N with N=a+bN = a + b, starting at i=bi = b. Absorbing at 0 (stopped out) and N (target hit). Let q=1−pq = 1 - p and PiP_i the probability of hitting N first from i....

Approach

First-step analysis gives Pi=pPi+1+qPi−1P_i = pP_{i+1} + qP_{i-1} with P0=0P_0 = 0 and PN=1P_N = 1. This linear recurrence has characteristic roots 1 and r=q/pr = q/p....


Submit Your Answer
Markdown supported

Related Questions