(

probability theory):

Given a

sequence of

random variables

*X*_{1},

*X*_{2}, ... (the

generalisation to a sequence of

sigma fields is

obvious if you care about that sort of thing, and

irrelevant if you

don't know or care), a

*stopping time* is a random variable

*T* for which the

events {

*T*=

*t*} (for any fixed

*t*) depend only on the values of

*X*_{1}, ...,

*X*_{t-1}.

A stopping time is just that: think that you participate in a sequence of trials, the result of trial #*i* being *X*_{i}. You may stop the sequence at any time. Then obviously your decision to stop at time *t* depends only on the first *t* values.

- Stop a sequence of coin tosses at the second head.
- Play a slot machine until either you lose all $100 you started off with, or you win $1000000.
- Stop a sequence of die rolls as soon as more than half the rolls came up 6.
- Employ a monkey to bang on a typewriter until it produces the complete text of
__Hamlet 2: The Prince is BACK__.

- Repeatedly bet double or quits on a fair coin toss stopping
*just before* you lose.
- Employ a monkey to bang on a typewriter until 30 minutes before it produces the complete text of
__Hamlet__, then invite all your neighbours to see your educated monkey (bet on it producing __Hamlet__ within 30 minutes).

As you can see, a stopping time is feasible, whereas other rules might not be. And, in fact, various theorems about betting are true for a fixed number of trials or for a stopping time (a fixed number *is* a stopping time!), but not for just any rule. Wald's theorem is probably the most important elementary result for stopping times.