Post · 7 min read· pp. 199–204
Problem
Let X be a discrete random variable with the following PMF
\begin{equation}
\nonumber P_X(x) = \left{
\begin{array}{l l}
0.3 & \quad \text{for } x=3\
0.2 & \quad \text{for } x=5\
0.3 & \quad \text{for } x=8\
0.2 & \quad \text{for } x=10\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Find and plot the CDF of X.
- Solution
- The CDF is defined by FX(x)=P(X≤x). We have
\begin{equation}
\nonumber F_X(x) = \left{
\begin{array}{l l}
0 & \quad \text{for } x<3\
P_X(3)= 0.3 & \quad \text{for } 3 \leq x<5\
P_X(3)+P_X(5)=0.5 & \quad \text{for } 5 \leq x<8 \
P_X(3)+P_X(5)+P_X(8)=0.8 & \quad \text{for } 8 \leq x<10 \
1 & \quad \text{for } x \geq 10\
\end{array} \right.
\end{equation}
Problem
Let X be a discrete random variable with the following PMF
\begin{equation}
\nonumber P_X(k) = \left{
\begin{array}{l l}
0.1 & \quad \text{for } k=0\
0.4 & \quad \text{for } k=1\
0.3 & \quad \text{for } k=2\
0.2 & \quad \text{for } k=3\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
- Find EX.
- Find Var(X).
- If Y=(X−2)2, find EY.
- Solution
| |
|---|
| EX | =∑xk∈RXxkPX(xk) |
| =0(0.1)+1(0.4)+2(0.3)+3(0.2) |
| =1.6 |
- We can use Var(X)=EX2−(EX)2=EX2−(1.6)2. Thus we need to find EX2. Using LOTUS, we have
EX2=02(0.1)+12(0.4)+22(0.3)+32(0.2)=3.4
Thus, we have
Var(X)=(3.4)−(1.6)2=0.84
- Again, using LOTUS, we have
E(X−2)2=(0−2)2(0.1)+(1−2)2(0.4)+(2−2)2(0.3)+(3−2)2(0.2)=1.
Problem
Let X be a discrete random variable with PMF
\begin{equation}
\nonumber P_X(k) = \left{
\begin{array}{l l}
0.2 & \quad \text{for } k=0\
0.2 & \quad \text{for } k=1\
0.3 & \quad \text{for } k=2\
0.3 & \quad \text{for } k=3\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Define Y=X(X−1)(X−2). Find the PMF of Y.
- Solution
First, note that RY={x(x−1)(x−2)∣x∈{0,1,2,3}}={0,6}. Thus,
| |
|---|
| PY(0) | =P(Y=0)=P((X=0) or (X=1) or (X=2)) |
| =PX(0)+PX(1)+PX(2) |
| =0.7; |
| PY(6) | =P(X=3)=0.3 |
Thus,
\begin{equation}
\nonumber P_Y(k) = \left{
\begin{array}{l l}
0.7 & \quad \text{for } k=0\
0.3 & \quad \text{for } k=6\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Problem
Let X∼Geometric(p). Find E[2X1].
- Solution
The PMF of X is given by
\begin{equation}
\nonumber P_X(k) = \left{
\begin{array}{l l}
pq^{k-1}& \quad \text{for } k=1,2,3,...\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
where q=1−p. Thus,
| |
|---|
| E[2X1] | =∑k=1∞2k1PX(k) |
| =∑k=1∞2k1qk−1p |
| =2p∑k=1∞(2q)k−1 |
| =2p1−2q1 |
| =1+pp. |
Problem
If X∼Hypergeometric(b,r,k), find EX.
- Solution
The PMF of X is given by
\begin{equation}
\nonumber P_X(x) = \left{
\begin{array}{l l}
\frac{{b \choose x} {r \choose k-x}}{{b+r \choose k}}& \quad \text{for } x \in R_X\
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
where RX={max(0,k−r),max(0,k−r)+1,max(0,k−r)+2,...,min(k,b)}. Finding EX directly
seems to be very complicated. So let's try to see if we can find an easier way to find EX.
In particular, a powerful tool that we have is linearity of expectation. Can we write X
as the sum of simpler random variables Xi? To do so, let's remember the random experiment
behind the hypergeometric distribution. You have a bag that contains b blue marbles and r
red marbles. You choose k≤b+r marbles at random (without replacement) and let X be the
number of blue marbles in your sample. In particular, let's define the indicator random variables
Xi as follows:
\begin{equation}
\nonumber X_i = \left{
\begin{array}{l l}
1 & \quad \text{if the ith chosen marble is blue} \
0 & \quad \text{otherwise}
\end{array} \right.
\end{equation}
Then, we can write
X=X1+X2+⋯+Xk.
Thus,
EX=EX1+EX2+⋯+EXk.
To find P(Xi=1), we note that for any particular Xi all marbles are equally likely to
be chosen. This is because of symmetry: no marble is more likely to be chosen than the ith
marble as any other marbles. Therefore,
P(Xi=1)=b+rb for all i∈{1,2,⋯,k}.
We conclude
| |
|---|
| EXi | =0⋅p(Xi=0)+1⋅P(Xi=1) |
| =b+rb. |
Thus, we have
EX=b+rkb.
Problem
In Example 3.14 we showed that if
X∼Binomial(n,p), then EX=np. We found this by writing X as the sum of n Bernoulli(p)
random variables. Now, find EX directly using EX=∑xk∈RXxkPX(xk). Hint: Use
k(kn)=n(k−1n−1).
- Solution
First note that we can prove k(kn)=n(k−1n−1) by the following
combinatorial interpretation: Suppose that from a group of n students we would
like to choose a committee of k students, one of whom is chosen to be the committee
chair. We can do this
- by choosing k people first (in (kn) ways), and then choosing one of them
to be the chair (k ways), or
- by choosing the chair first (n possibilities and then choosing k−1 students
from the remaining n−1 students (in (k−1n−1) ways)).Thus, we conclude
k(kn)=n(k−1n−1).
Now, let's find EX for X∼Binomial(n,p).
| |
|---|
| EX | =∑k=0nk(kn)pkqn−k |
| =∑k=1nk(kn)pkqn−k |
| =∑k=1nn(k−1n−1)pkqn−k |
| =np∑k=1n(k−1n−1)pk−1qn−k |
| =np∑l=0n−1(ln−1)plq(n−1)−l |
| =np. |
Note that the last line is true because the ∑l=0n−1(ln−1)plq(n−1)−l
is equal to ∑l=0n−1PY(l) for a random variable Y that has Binomial(n−1,p)
distribution, hence it is equal to $1$.
Problem
Let X be a discrete random variable with RX⊂{0,1,2,...}. Prove
EX=k=0∑∞P(X>k).
- Solution
Note that
| |
|---|
| P(X>0) | =PX(1)+PX(2)+PX(3)+PX(4)+⋯, |
| P(X>1) | =PX(2)+PX(3)+PX(4)+⋯, |
| P(X>2) | =PX(3)+PX(4)+PX(5)+⋯. |
Thus
| |
|---|
| ∑k=0∞P(X>k) | =P(X>0)+P(X>1)+P(X>2)+... |
| =PX(1)+2PX(2)+3PX(3)+4PX(4)+... |
| =EX. |
Problem
If X∼Poisson(λ), find Var(X).
- Solution
We already know EX=λ, thus Var(X)=EX2−λ2. You can find EX2 directly
using LOTUS; however, it is a little easier to find E[X(X−1)] first. In particular,
using LOTUS we have
| |
|---|
| E[X(X−1)] | =∑k=0∞k(k−1)PX(k) |
| =∑k=0∞k(k−1)e−λk!λk |
| =e−λ∑k=2∞(k−2)!λk |
| =e−λλ2∑k=2∞(k−2)!λk−2 |
| =e−λλ2eλ |
| =λ2. |
So, we have λ2=E[X(X−1)]=EX2−EX=EX2−λ. Thus, EX2=λ2+λ
and we conclude
| |
|---|
| Var(X) | =EX2−(EX)2 |
| =λ2+λ−λ2 |
| =λ. |
Problem
Let X and Y be two independent random variables. Suppose that we know Var(2X−Y)=6 and Var(X+2Y)=9.
Find Var(X) and Var(Y).
- Solution
- Let's first make sure we understand what Var(2X−Y) and Var(X+2Y) mean. They are Var(Z)
and Var(W), where the random variables Z and W are defined as Z=2X−Y and W=X+2Y.
Since X and Y are independent random variables, then 2X and −Y are independent
random variables. Also, X and 2Y are independent random variables. Thus, by using
Equation 3.7,
we can write
Var(2X−Y)=Var(2X)+Var(-Y)=4Var(X)+Var(Y)=6,
Var(X+2Y)=Var(X)+Var(2Y)=Var(X)+4Var(Y)=9.
By solving for Var(X) and Var(Y), we obtain Var(X)=1 and Var(Y)=2.