# What's the probability of a an outcome after N trials, if you stop trying once you're “successful”?

This follows on from this question about being hit by a bus.

In this question, there is a 1/1000 chance of being hit and the question was about the probability of being hit if you cross the road 1000 time.

I wondered what would happen to this probability if I stopped trying to cross the road as soon as I get hit. Does the probability change?

As far as I can figure it, the probability then just becomes the sum of the geometric series

$$P(\text{hit by bus within 1000 crossings}) = \sum_{n=0}^{999} 1/1000 * (999/1000)^n$$

thus

$$P(\text{hit by bus within 1000 crossings}) = 1/1000 * \frac{1-(999/1000)^{1000}}{1-999/1000}$$

However, this is identical to

$$P(\text{hit by bus within 1000 crossings}) = 1-P(\text{not hit by bus within 1000 crossing}) = 1-(999/1000)^{1000}$$

which is the answer to the previous question. I’m curious as to why they are not different, since the first approach is specifically ignoring all instances where (for instance) I get hit by a bus on the first try and then keep trying and get hit by subsequent buses.

#### Solutions Collecting From Web of "What's the probability of a an outcome after N trials, if you stop trying once you're “successful”?"

Suppose that I begin a repeated series of attempts to cross a street where
I have a $1/1000$ chance of being hit by a bus during any single attempt.

Now suppose I cross the street $49$ times without being hit, but on the fiftieth
attempt I am hit by a bus.

At that point, what difference does it make whether I attempt another $950$ crossings or
never try to cross that street again?
An obvious difference is that if I continue crossing, I could be hit by a bus again.
I could be hit several times before the $1000$th attempt to cross.
This will make a difference to the expected number of times I am hit, which is
less than one if I intend to give up after being hit once (maximum outcome is $1$
but there is a positive probability of outcome $0$).

But $P(\text{hit by bus within 1000 crossings})$ is not expected value.
It is simple probability.
After crossing number $50,$ during which I was hit by a bus, there is nothing I
can do to change the fact of whether I have been hit by a bus.
I certainly cannot be unhit, and likewise there is no way to make the predicate
“hit by bus within $1000$ crossings” any more likely than it already is.

It would therefore be quite remarkable (suspicious, in fact) if I were to find that
the calculation of $P(\text{hit by bus within 1000 crossings})$ depends on whether
the procedure is that I stop crossing if I am hit or continue crossing until I have
done it $1000$ times.

Let $q_n$ be the probability of not being struck on the $n$-th crossing. Then your first calculation for the probability of first collision within $N$ attempts may be rewritten as \begin{align}
\sum_{n=0}^{N-1} (1-q_n)\prod_{k=0}^{n-1}q_k
&=1-q_0q_1+(q_0q_1)(1-q_2)+\cdots+(q_1 q_2\cdots q_{N-1})(1-q_N)\\
&=1-q_0q_1q_2+\cdots+(q_1 q_2\cdots q_{N-1})(1-q_N)\\
&\cdots\\
&=1-q_0 q_1\cdots q_{N-1}.
\end{align}
(If you are properly sketpical of algebra here, you may verify this with induction.) But this is the complementary probability to no collsions being seen at all. Hence the two probabilities considered in the OP coincide regardless of the probability of collision per trial.

They are explicitly the same situation: the probability of being hit at least once before finishing 1000 crossings. Whether or not you stop searching after the event occurs should make no difference to the probability of the event occurring. There’s no foreknowledge of future trials in the scenario.

On the other hand, the conditional probability that you get hit at least once within the first hundred crossings when you (somehow) know that you will get hit on the one hundred and first crossing is quite dependent on whether you stop crossing after getting hit once or not.

This is the cumulative probability of the geometric distribution – http://en.wikipedia.org/wiki/Geometric_distribution

The probability distribution of the number X of Bernoulli trials needed to get one success, supported on the set { 1, 2, 3, …}

The CDF is $1 – (1-p)^k$l.

This is the same as Semiclassical’s answer (if the probabilities are equal), but it’s useful to know this has a name, as you can more easily research other properties and communicate with others about it.