1
$\begingroup$

Let's say you have an 1/8 percent chance of getting shot, per day. The days are independent. Then let X be the number of days up to (and including) the next time you get shot.

How would I go about finding things like $P(X=2), P(X>3), P(X>2|X\geq 4)$ etc...

What does the general rule look like for finding values like these ones?

  • 0
    @DavidMitra thanks for the link – 2012-02-09

2 Answers 2

4

What has to happen in order for $X$ to be $2$? You must survive one day and get shot the next. The first of these independent events occurs with probability $7/8$ and the second with probability $1/8$, so $P(X=2)=\left(\frac78\right)\left(\frac18\right)=\frac7{64}\;.$

By the same reasoning, $P(X=n)=\left(\frac78\right)^{n-1}\left(\frac18\right)=\frac{7^{n-1}}{8^n}\;:$ you must survive $n-1$ days and be shot on the $n$-th day.

Now you can tackle the second kind of question:

$\begin{align*}P(X>3)&=\sum_{n\ge 4}P(X=n)\\ &=\sum_{n\ge 4}\frac{7^{n-1}}{8^n}\\ &=\frac18\sum_{n\ge 4}\left(\frac78\right)^{n-1}\\ &=\frac18\sum_{n\ge 3}\left(\frac78\right)^n\\ &=\frac18\left(\frac{\left(\frac78\right)^3}{1-\frac78}\right)\tag{1}\\ &=\left(\frac78\right)^3 = \frac{343}{512}\;, \end{align*}$

where $(1)$ is simply the result of summing the geometric series.

With this much of a start, you can probably handle just about any common variant. (Note, by the way, that $P(X>2\mid X\ge 4)$ is trivially $1$; why?)

Added: As Dilip Sarwate points out, I did the second problem the hard way: $P(X>3)$ is of course simply the probability of surviving the first three days, so of course it’s $(7/8)^3$.

  • 0
    Perhaps it is worth adding that the event \{X > 3\} happens if and only if the OP manages to escape being shot the first three days, and this has probability $(7/8)^3$ which can be written down directly without summing a geometric series. – 2012-02-09
4

Consider the following

Example:

Suppose a coin has probability $1/3$ of showing heads. Compute the probability that in successive flips of the coin, the first head appears on the forth flip.

Solution:

First note that if the first head appears on the forth flip, then the first three flips were tails. So, we need to find the probability that in four flips, the first three are tails and the forth is a head. Since the flips are independent, the probability of the first head occurring on the forth flip is ${2\over3}\cdot{2\over3}\cdot{2\over3}\cdot{1\over3}= {8\over81}. $


The preceding can be generalized: Suppose that independent repetitions of the same Bernoulli experiment with success factor $p\ne 0$ are made until the first success occurs. Let $X$ be the number of trials to the first success. Then $X$ takes the values $1$, $2$, $3$, $\ldots$. In this case, we call $X$ a Geometric variable with parameter $p$ and we write ${\rm Dist}(X)={\rm G}( p)$.

We now find the probability mass function of $X$. Let $k\in\{\,1, 2, ,3,\ldots\,\}$. Then, using the independence of the trials: \def\px{p_X}\eqalignno{ \px(k)&=P[X=k]\cr &=P({\text{ the first success occuurred on the }k^{\rm th}{\rm\ trial}})\cr &=P\Bigl[ \Bigl( {\text{ The first } k-1\text{ trials}\atop\text{were failures}}\ \Bigr) {\rm \ and\ } \Bigl( { \text{The } k^{\rm th}\text{trial}\atop\text{ was a success}}\ \Bigr) \Bigr]\cr &=P\Bigl(
{ \text{ The first } k-1\text { trials}\atop \text{ were failures}}\ \Bigr) \cdot P\Bigl({ { \text{The $\ k^{\rm th}$ trial}\atop\text{ was a success}}}\ \Bigr)\cr
&= (1-p)^{k-1}p.\cr }

To summarize:

If $X$ is a Geometric variable with parameter $p$, then $ \px(k)= P[X=k]= (1-p)^{k-1}p,\quad k=1,2,\ldots, $

The cumulative distribution function of a Geometric variable is easy to find: $\eqalign{ F_X(k)&=P[X\le k]\cr &=1-P[X>k ]\cr &=1-P({\rm\ the\ first\ }k{\rm\ trials\ are\ failures\ })\cr &=1-(1-p)^k. } $



For your problem if $X$ is the number of days up to the day you get shot for the first time, then $X$ is Geometric with parameter $p=1/8$.

Point probabilities will use the mass function of course.

For example, $P[X=4]=(7/8)^3(1/8)$

Probabilities of the form $P[X>k]$ can be expressed by $P[X>k]=1-F_X(k-1)$.

Or note that $X>k$ if and only if you were not shot on the first $k$ days, so $P[X>k]=(1-p)^{k }$.

For example $P[X>3]=(7/8)^3$.

  • 0
    +1 especially for the simpler way of deducing that P\{X>3\}=(7/8)^3. – 2012-02-09