ProbabilidadDiscrete Random Variables

Waiting for the rth Success

The number of trials needed for r successes has P(X = k) = C(k − 1, r − 1) pʳ (1 − p)^(k − r) and mean r/p.

Sin empezar Ir a la práctica

Esta lección aún no está traducida. Por ahora se muestra en inglés; la versión en español está en camino.

The geometric distribution counts the trials up to the first success. Waiting for the third success, or the fifth, gives the negative binomial distribution. As in that lesson, $X$ counts all the trials, including the last success. (Some books count only the failures, $X - r$; the ideas are the same.)

Idea clave

In independent trials with success probability $p$, the number of trials $X$ needed for the $r$th success has $$P(X = k) = \binom{k - 1}{r - 1}p^{r}(1 - p)^{k - r}, \quad k = r, r + 1, \ldots,$$ with $E[X] = \frac{r}{p}$ and $\operatorname{Var}(X) = \frac{r(1 - p)}{p^{2}}$.

Por qué funciona

$X = k$ means trial $k$ is a success and the first $k - 1$ trials contain exactly $r - 1$ successes, in any of $\binom{k - 1}{r - 1}$ arrangements. Each arrangement has $r$ successes and $k - r$ failures, probability $p^{r}(1 - p)^{k - r}$. For the mean, split the wait into $r$ stages: trials to the first success, then from there to the second, and so on. Each stage is geometric with mean $\frac{1}{p}$, so by linearity $E[X] = \frac{r}{p}$. The stages are independent, so their variances $\frac{1 - p}{p^{2}}$ add too.

Worked examples

Ejemplo resuelto: Coins

Flip a fair coin until the 3rd head. Find the probability that exactly 5 flips are needed.
  1. The 5th flip is the 3rd head, and the first 4 flips hold exactly 2 heads: $\binom{4}{2} = 6$ arrangements.
  2. $P(X = 5) = 6 \cdot \left(\frac{1}{2}\right)^{5} = \frac{3}{16}$.

Respuesta: $\frac{3}{16}$

Ejemplo resuelto: Sixes

Roll a die until the 2nd six. Find $P(X = 4)$ and $E[X]$.
  1. $$P(X = 4) = \binom{3}{1}\left(\frac{1}{6}\right)^{2}\left(\frac{5}{6}\right)^{2} = 3 \cdot \frac{25}{1296} = \frac{25}{432} \approx 0.058$$
  2. $E[X] = \frac{2}{1/6} = 12$ rolls.

Respuesta: $\frac{25}{432}$ and 12

Ejemplo resuelto: A best-of-seven series

Team A wins each game with probability $0.6$, independently. In a best-of-seven series (first to 4 wins), find the probability that A wins in exactly 6 games.
  1. Game 6 must be A's 4th win, and games 1 to 5 hold exactly 3 A-wins: $\binom{5}{3} = 10$ arrangements.
  2. $$P = 10(0.6)^{4}(0.4)^{2} = 10(0.1296)(0.16) \approx 0.207$$

Respuesta: about $0.207$

"The $r$th success comes on or before trial $m$" is the same event as "at least $r$ successes in the first $m$ trials". So you can add the negative binomial probabilities for $k = r, \ldots, m$, or add binomial probabilities for $r$ or more successes in $m$ trials. Both give the same number, a useful check.

Error común

Using $\binom{k}{r}$ instead of $\binom{k - 1}{r - 1}$. The last trial is not free: it must be the $r$th success, so only the earlier $k - 1$ trials can be arranged. Check with $r = 1$: the formula must give the geometric $p(1 - p)^{k - 1}$, and $\binom{k - 1}{0} = 1$ does.

Práctica

Apruebas con 3 respuestas correctas, las 2 últimas seguidas. Cada respuesta correcta da 3 XP.

Cargando la práctica…

Se apoya en

Lleva a

Fuentes y lecturas

  • Grinstead and Snell, Introduction to Probability (2nd revised edition, American Mathematical Society; free from Dartmouth College), chapter 5 (Distributions and Densities), section 5.1, the negative binomial distribution
  • MIT OpenCourseWare 18.05, Introduction to Probability and Statistics (Spring 2014), readings on the geometric and negative binomial distributions