Post · 3 min read· pp. 160–161

3.1.4 Independent Random Variables


Video Available Video Available

In real life, we usually need to deal with more than one random variable. For example, if you study physical characteristics of people in a certain area, you might pick a person at random and then look at his/her weight, height, etc. The weight of the randomly chosen person is one random variable, while his/her height is another one. Not only do we need to study each random variable separately, but also we need to consider if there is dependence (i.e., correlation) between them. Is it true that a taller person is more likely to be heavier or not? The issues of dependence between several random variables will be studied in detail later on, but here we would like to talk about a special scenario where two random variables are independent.

The concept of independent random variables is very similar to independent events. Remember, two events AA and BB are independent if we have P(A,B)=P(A)P(B)P(A,B)=P(A)P(B) (remember comma means and, i.e., P(A,B)=P(A and B)=P(A∩B)P(A,B)=P(A \textrm{ and } B)=P(A \cap B)). Similarly, we have the following definition for independent discrete random variables.

Definition Consider two discrete random variables XX and YY. We say that XX and YY are independent if

P(X=x,Y=y)=P(X=x)P(Y=y), for all x,y.P\bigg(X=x,Y=y\bigg)=P(X=x) P(Y=y), \hspace{20pt} \textrm{ for all } x,y.
In general, if two random variables are independent, then you can write
P(X∈A,Y∈B)=P(X∈A)P(Y∈B), for all sets A and B.P\bigg(X \in A,Y \in B\bigg)=P(X \in A) P(Y \in B), \hspace{20pt} \textrm{ for all sets } A \textrm{ and } B.

Intuitively, two random variables XX and YY are independent if knowing the value of one of them does not change the probabilities for the other one. In other words, if XX and YY are independent, we can write

P(Y=y∣X=x)=P(Y=y), for all x,y.P(Y=y|X=x)=P(Y=y), \textrm{ for all } x,y.
Similar to independent events, it is sometimes easy to argue that two random variables are independent simply because they do not have any physical interactions with each other. Here is a simple example: I toss a coin 2N2N times. Let XX be the number of heads that I observe in the first NN coin tosses and let YY be the number of heads that I observe in the second NN coin tosses. Since XX and YY are the result of independent coin tosses, the two random variables XX and YY are independent. On the other hand, in other scenarios, it might be more complicated to show whether two random variables are independent.


Example

I toss a coin twice and define XX to be the number of heads I observe. Then, I toss the coin two more times and define YY to be the number of heads that I observe this time. Find P((X<2) and (Y>1))P\bigg((X < 2) \textrm{ and } (Y>1)\bigg).

  • Solution
    • Since XX and YY are the result of different independent coin tosses, the two random variables XX and YY are independent. Also, note that both random variables have the distribution we found in Example 3.3. We can write

      P((X<2) and (Y>1))P\bigg((X < 2) \textrm{ and } (Y > 1)\bigg)$=P(X < 2)P(Y > 1) \hspace{20pt} \textrm{(because XX and YY are independent)}$
      =(PX(0)+PX(1))PY(2)=\big(P_X(0)+P_X(1)\big)P_Y(2)
      =(14+12)14=\left(\frac{1}{4}+\frac{1}{2}\right)\frac{1}{4}
      =316=\frac{3}{16}.

We can extend the definition of independence to nn random variables.

Definition Consider nn discrete random variables X1,X2,X3,...,XnX_1, X_2, X_3, ...,X_n. We say that X1,X2,X3,...,XnX_1, X_2, X_3, ...,X_n are independent if

P(X1=x1,X2=x2,...,Xn=xn)P\bigg(X_1=x_1, X_2=x_2, ... ,X_n=x_n\bigg)
=P(X1=x1)P(X2=x2)...P(Xn=xn), for all x1,x2,...,xn.=P(X_1=x_1) P(X_2=x_2) ... P(X_n=x_n), \hspace{20pt} \textrm{ for all } x_1, x_2,..., x_n.