PromleeBlog

posting thumbnail
Independence of Random Variables

📅

Independence of Random Variables 🔗

When the random variables XX and YY are independent,
pX,Y(x,y)=pX(x)⋅pY(y)      ∀x,yp_{X,Y}(x, y) = p_X(x) \cdot p_Y(y)\;\;\; \forall x, y
Independence is equivalent to the following condition.
pX,Y(x∣y)=pX(x)      ∀y with pY(y)>0 and ∀xp_{X, Y}(x|y) = p_X(x)\;\;\; \forall y \text{ with } p_Y(y) > 0 \text{ and } \forall x
conditional PMF = marginal PMF (when XX and YY are independent)

Example: Independence of Random Variables 🔗

Problem 🔗

Roll 12 fair six-sided dice.
Let XX be the number of ones and YY the number of sixes.
Are XX and YY independent?

Solution 🔗

P(X=12,Y=12)=0≠P(X=12)⋅P(Y=12)P(X=12, Y=12) = 0 \neq P(X=12) \cdot P(Y=12) must be shown.
X,YX, Y: binomial random variable (n = 12, p = 1/6)
P(X=k)=(12k)(16)k(56)12−kP(X = k) = \binom{12}{k} \left(\frac{1}{6}\right)^k \left(\frac{5}{6}\right)^{12-k}
P(X=12)=(16)12P(X = 12) = \left(\frac{1}{6}\right)^{12}
P(Y=12)=(16)12P(Y = 12) = \left(\frac{1}{6}\right)^{12}
Answer: XX and YY are dependent.

Expectation of Independent Random Variables 🔗

If XX and YY are independent, E[XY]=E[X]⋅E[Y]E[XY] = E[X] \cdot E[Y].

Proof 🔗

E[XY]=∑x∑yxy⋅pX,Y(x,y)=∑x∑yxy⋅pX(x)⋅pY(y)=∑xxpX(x)∑yypY(y)=E[X]⋅E[Y]E[XY] = \sum_{x}\sum_{y}xy\cdot p_{X,Y}(x, y) \\ = \sum_{x}\sum_{y}xy\cdot p_X(x)\cdot p_Y(y) \\ = \sum_{x}xp_X(x)\sum_{y}yp_Y(y) \\ = E[X] \cdot E[Y]

Example: Expectation of Independent Random Variables 🔗

Problem 🔗

Suppose XX and YY have the following joint probability mass function (PMF):
XX \ YY-101
0012\frac{1}{2}0
114\frac{1}{4}014\frac{1}{4}
E[X]E[X], E[Y]E[Y], E[XY]E[XY] are the quantities to find.

Solution 🔗

Find the marginal distributions and check for independence.
E[X]=∑xPX(x)=0⋅12+1⋅12=12E[X] = \sum xP_X(x) = 0 \cdot \frac{1}{2} + 1 \cdot \frac{1}{2} = \frac{1}{2}
E[Y]=∑yPY(y)=−1⋅14+0⋅12+1⋅14=0E[Y] = \sum yP_Y(y) = -1 \cdot \frac{1}{4} + 0 \cdot \frac{1}{2} + 1 \cdot \frac{1}{4} = 0
E[XY]=E[X]⋅E[Y]=12⋅0=0E[XY] = E[X] \cdot E[Y] = \frac{1}{2} \cdot 0 = 0
Answer
: E[X]=12E[X] = \frac{1}{2}, E[Y]=0E[Y] = 0, E[XY]=0E[XY] = 0
The original concludes that X,YX, Y are independent. The table actually shows dependence: when X is zero, Y is always zero, whereas the marginal probability of Y being zero is one half. The stated expectation of the product is still zero, as the contributions from the two nonzero products cancel.

Variance of Independent Random Variables 🔗

For independent variables X,YX, Y, let Z=X+YZ = X + Y. Then Var(Z)=Var(X)+Var(Y)Var(Z) = Var(X) + Var(Y).

Proof 🔗

Var(Z)=E[(X+Y−E[X+Y])2]=E[(X+Y−E[X]−E[Y])2]=E[((X−E[X])+(Y−E[Y]))2]=E[(X−E[X])2]+2E[(X−E[X])(Y−E[Y])]+E[(Y−E[Y])2]=Var(X)+0+Var(Y)Var(Z) = E[(X+Y-E[X+Y])^2]\\ = E[(X+Y-E[X]-E[Y])^2]\\ = E[((X-E[X]) + (Y-E[Y]))^2] \\ = E[(X-E[X])^2] + 2E[(X-E[X])(Y-E[Y])] + E[(Y-E[Y])^2] \\ = Var(X) + 0 + Var(Y)
(2E[(X−E[X])(Y−E[Y])]=E[XY−XE[Y]−YE[X]+E[X]E[Y]]=E[XY]−E[X]E[Y]−E[Y]E[X]+E[X]E[Y]=02E[(X-E[X])(Y-E[Y])] = \\ E[XY - XE[Y] - YE[X] + E[X]E[Y]] = \\ E[XY] - E[X]E[Y] - E[Y]E[X] + E[X]E[Y] = 0)

Example: Variance of Independent Random Variables 🔗

Problem 🔗

Suppose XX and YY are independent, with Var(X)=3\text{Var}(X) = 3 and Var(Y)=5\text{Var}(Y) = 5.
Find the following.
  1. Var(X+Y)\text{Var}(X + Y)
  2. Var(3X+4)\text{Var}(3X + 4)
  3. Var(X+X)\text{Var}(X + X)
  4. Var(X+3Y)\text{Var}(X + 3Y)

Solution 🔗

  1. Var(X+Y)=Var(X)+Var(Y)=3+5=8\text{Var}(X + Y) = \text{Var}(X) + \text{Var}(Y) = 3 + 5 = 8
  2. Var(3X+4)=32Var(X)=9⋅3=27\text{Var}(3X + 4) = 3^2\text{Var}(X) = 9 \cdot 3 = 27
  3. Var(X+X)=22Var(X)=4⋅3=12\text{Var}(X + X) = 2^2\text{Var}(X) = 4 \cdot 3 = 12
  4. Var(X+3Y)=Var(X)+32Var(Y)=3+9⋅5=48\text{Var}(X + 3Y) = \text{Var}(X) + 3^2\text{Var}(Y) = 3 + 9 \cdot 5 = 48

Summary 🔗

If XX and YY are independent, pX,Y(x,y)=pX(x)⋅pY(y)p_{X,Y}(x, y) = p_X(x) \cdot p_Y(y).
If XX and YY are independent, E[XY]=E[X]⋅E[Y]E[XY] = E[X] \cdot E[Y].
If XX and YY are independent, Var(X+Y)=Var(X)+Var(Y)Var(X + Y) = Var(X) + Var(Y).

Additional Exercise 🔗

Problem 🔗

Suppose XX and YY are independent and identically distributed geometric random variables.
Their parameter is pp.
Prove the following.
P(X=i∣X+Y=n)=1n−1,i=1,…,n−1P(X = i \mid X + Y = n) = \frac{1}{n-1}, \quad i = 1, \ldots, n-1

Solution 🔗

P(X=i∣X+Y=n)P(X = i \mid X + Y = n) is the probability that, given the second head occurs on toss nn, the first occurs on toss ii.
Intuitively, if the second head occurs on toss nn, the first head is equally likely on any toss from 11 to n−1n-1.
For a formal proof, start with the following.
P(X=i∣X+Y=n)=P(X=i and X+Y=n)P(X+Y=n)=P(X=i)P(Y=n−i)P(X+Y=n)P(X = i \mid X + Y = n) = \frac{P(X = i \text{ and } X + Y = n)}{P(X + Y = n)} = \frac{P(X = i)P(Y = n - i)}{P(X + Y = n)}
Also, P(X=i)=p(1−p)i−1P(X = i) = p(1-p)^{i-1} (i≥1i \geq 1) and , P(Y=n−i)=p(1−p)n−i−1P(Y = n - i) = p(1-p)^{n-i-1} (n−i≥1n - i \geq 1).
Therefore, P(X=i)P(Y=n−i)=p2(1−p)n−2P(X = i)P(Y = n - i) = p^2(1 - p)^{n-2} (i=1,…,n−1i = 1, \ldots, n-1) and , zero otherwise.
Therefore, P(X=i∣X+Y=n)=P(X=j∣X+Y=n)P(X = i \mid X + Y = n) = P(X = j \mid X + Y = n) holds for any ii and jj from 11 to n−1n-1.
P(X=i∣X+Y=n)=1n−1,i=1,…,n−1P(X = i \mid X + Y = n) = \frac{1}{n-1}, \quad i = 1, \ldots, n-1
    Independence of Random Variables | PromleeBlog