Note that here we cannot argue that $X$ and $Z$ are independent. Indeed, $Z$ seems to
completely depend on $X$, $Z=X+Y$. To find the conditional probability $P(X=4|Z=8)$,
we use the formula for conditional probability
$P(X=4|Z=8)$
$=\frac{P(X=4,Z=8)}{P(Z=8)}$
$=\frac{P(X=4,Y=4)}{P(Z=8)}$
$=\frac{P(X=4)P(Y=4)}{P(Z=8)} \textrm{ (since $X$ and $Y$ are independent)}$
I roll a fair die repeatedly until a number larger than $4$ is observed. If $N$ is the total number
of times that I roll the die, find $P(N=k)$, for $k=1,2,3, ...$.
In each trial, I may observe a number larger than $4$ with probability $\frac{2}{6}=\frac{1}{3}$.
Thus, you can think of this experiment as repeating a Bernoulli experiment with success
probability $p=\frac{1}{3}$ until you observe the first success. Thus, $N$ is a
geometric random variable with parameter $p=\frac{1}{3}$, $N \sim Geometric(\frac{1}{3})$.
Hence, we have
\begin{equation}
\nonumber P_N(k) = \left\{
\begin{array}{l l}
\frac{1}{3}(\frac{2}{3})^{k-1}& \quad \text{for } k=1,2,3,...\\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Problem
You take an exam that contains $20$ multiple-choice questions. Each question has $4$ possible options.
You know the answer to $10$ questions, but you have no idea about the other $10$ questions so you
choose answers randomly. Your score $X$ on the exam is the total number of correct answers.
Find the PMF of $X$. What is $P(X>15)$?
Let's define the random variable $Y$ as the number of your correct answers to the $10$ questions
you answer randomly. Then your total score will be $X=Y+10$. First, let's find the PMF of
$Y$. For each question your success probability is $\frac{1}{4}$. Hence, you perform $10$
independent $Bernoulli(\frac{1}{4})$ trials and $Y$ is the number of successes. Thus,
we conclude $Y \sim Binomial(10,\frac{1}{4})$, so
\begin{equation}
\nonumber P_Y(y) = \left\{
\begin{array}{l l}
{10 \choose y}(\frac{1}{4})^y(\frac{3}{4})^{10-y}& \quad \text{for } y=0,1,2,3,...,10\\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Now we need to find the PMF of $X=Y+10$. First note that $R_X=\{10,11,12,...,20\}$. We can write
This problem is very similar to
Example 3.7,
and we can solve it using the same
methods. We will show that $Z \sim Pascal(m+l,p)$. To see this, consider a sequence of
$H$s and $T$s that is the result of independent coin tosses with $P(H)=p$, (Figure 3.2).
If we define the random variable $X$ as the number of coin tosses until the $m$th heads is
observed, then $X \sim Pascal(m,p)$. Now, if we look at the rest of the sequence and count
the number of heads until we observe $l$ more heads, then the number of coin tosses in this
part of the sequence is $Y \sim Pascal(l,p)$. Looking from the beginning, we have repeatedly
tossed the coin until we have observed $m+l$ heads. Thus, we conclude the random variable $Z$
defined as $Z=X+Y$ has a $Pascal(m+l,p)$ distribution.
Fig.3.2 - Sum of two Pascal random variables.
In particular, remember that $Pascal(1,p)=Geometric(p)$. Thus, we have shown that if $X$ and $Y$
are two independent $Geometric(p)$ random variables, then $X+Y$ is a $Pascal(2,p)$
random variable. More generally, we can say that if $X_1, X_2, X_3,...,X_m$ are $m$
independent $Geometric(p)$ random variables, then the random variable $X$ defined by
$X=X_1+X_2+...+X_m$ has a $Pascal(m,p)$ distribution.
Problem
The number of customers arriving at a grocery store is a Poisson random variable. On average $10$ customers
arrive per hour. Let $X$ be the number of customers arriving from $10am$ to $11:30am$. What is
$P(10 < X \leq 15)$?
Let $X \sim Poisson(\alpha)$ and $Y \sim Poisson(\beta)$ be two independent random variables.
Define a new random variable as $Z=X+Y$. Find the PMF of $Z$.
Thus, we conclude that $Z \sim Poisson(\alpha+\beta)$.
Problem
Let $X$ be a discrete random variable with the following PMF
\begin{equation}
\nonumber P_X(k) = \left\{
\begin{array}{l l}
\frac{1}{4} & \quad \text{for } k=-2\\
\frac{1}{8} & \quad \text{for } k=-1\\
\frac{1}{8} & \quad \text{for } k=0\\
\frac{1}{4} & \quad \text{for } k=1\\
\frac{1}{4} & \quad \text{for } k=2\\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
I define a new random variable $Y$ as $Y=(X+1)^2$.
Here, the random variable $Y$ is a function of the random variable $X$. This means that
we perform the random experiment and obtain $X=x$, and then the value of $Y$ is
determined as $Y=(x+1)^2$. Since $X$ is a random variable, $Y$ is also a random
variable.
To find $R_Y$, we note that $R_X=\{-2,-1,0,1,2\}$, and
$R_Y$
$=\{y=(x+1)^2 | x \in R_X \}$
$=\{0,1,4,9\}$.
Now that we have found $R_Y=\{0,1,4,9\}$, to find the PMF of $Y$ we need to find
$P_Y(0), P_Y(1), P_Y(4)$, and $P_Y(9)$:
Again, it is always a good idea to check that $\sum_{y \in R_Y} P_Y(y)=1$. We have
$$\sum_{y \in R_Y} P_Y(y)=\frac{1}{8}+\frac{3}{8}+\frac{1}{4}+\frac{1}{4}=1.$$