For
a situation in which independent binomial events are randomly sampled in sequence, this page will calculate

 (a)
 the probability that you will end up with exactly k instances of the outcome in question, with the final (k^{th}) instance occurring on trial N; and


 (b)
 the probability that you will have to sample at least N events before finding the k^{th} instance of the outcome.


For example:
_{Q}
(a)

Assuming the probability of a Heads outcome on any particular toss of a coin to be .50: In a series of coin tosses, how likely is it that the 4th instance of a Heads outcome will occur on the 4th toss, the 5th toss, the 6th toss, etc?
k=4; N=4, 5, 6, etc.

Assuming the incidence of a certain genetic characteristic within a population to be 8.2% (.082): If a number of randomly selected subjects are tested in sequence, how likely is it that the 3rd instance of the characteristic will be found with the 3rd subject, the 4th, the 5th, etc?
k=3; N=3, 4, 5, etc.

(b)

If the probability of a Heads outcome on any particular toss of a coin truly is .50: In a series of coin tosses, how likely is it that you would have to toss the coin at least N times (N=4, 5, 6, etc.) before ending up with k=4 heads?

If the incidence of the genetic characteristic within the population truly is .082: How likely is it that you would have to sample at least N subjects (N=3, 4, 5, etc.) before finding k=3 subjects that display the characteristic?

The probabilities for (a) are calculated for N=k through N=k+25, according to the Pascal rule, also known as the negative binomial:


P_{(a)} =

(N1)! (k1)! (Nk)!

p^{k} (1p)^{Nk}_{k}


where p is the known or hypothetical probability that the outcome in question will occur on any particular trial. The probabilities for (b) are then constructed as


P_{(b)} = 1P_{(a)*}


with
P
_{(a)*} equal to the sum of all values of P
_{(a)} for N=k through N1.
Note that with k=1, P_{(a)} and P_{(b)} are equivalent to the probabilities of the geometric distribution defined by p^{k} (1p)^{Nk}. In this case, P_{(a)} is the probability that the first instance of the outcome will occur on the N^{th} trial and P_{(b)} is the probability that you will have to sample at least N events before finding the first instance of the outcome.

To proceed, enter the values of k and p into the designated cells, then click the «Calculate» button. k must be an integer between 1 and 150, inclusive. The value entered for p can be either a decimal fraction such as .25 or a common fraction such as 1/4.
N
 P_{(a)}
 P_{(b)}

  

Results are rounded
to a maximum of 10
decimal places.

Home
 Click this link only if you did not arrive here via the VassarStats main page.

©Richard Lowry 2001
All rights reserved.