Joint Distribution

Conditional Probability & Joint Distribution
The joint distribution table of X and Y can be represented using a table:
(X=x1)(X=x2)(X=x3)⋮ (Y=y1) (Y=y2) ...
The sum of all the probabilities is 1.
The random variables X and Y are independent if P(X∩Y)=P(X)×P(Y).
For joint distributions, the random variablesX and Y are independent if P(xi∩yi)=P(xi)×P(yi) where i=1,2,3..
Example: Conditional Probability Formula
You can solve for conditional probabilities when dealing with joint distributions.
P(A∣B)=P(B)P(A∩B)
Example:

Given that the opponent plays "water", what is the probability that your Pokey Mon plays "fire"?
P(Fire∣Water)=P(Water)P(Fire∩Water)
=0.15+0.10+0.100.15=0.350.15=0.4286
Are the two random variables independent?
The random variables X and Y are independent if P(X∩Y)=P(X)×P(Y).
P(Fire∩Water)=0.15
P(Fire)×P(Water)=(0.45)(0.35)=0.1575
0.15=0.1575
Therefore, they are not independent.

Example: Conditional Probability & Joint Distribution
X and Y are random variables and you are working in a busy office on a given day.
X= number of times your phone rings
Y= number of times someone walks into your office

(i) What is the probability your phone rings 2 times and 1 person walks into your office?
P(X=2∩Y=1)=0.09
(ii) Find P(X=0∩Y≥1)
P(X=0∩Y≥1)=Px,y(0,1)+Px,y(0,2)=0.15+0.06=0.21
(iii) Find P(Y=1∣X=0)
Conditional probability formula:
P(A∣B)=P(B)P(A∩B)
P(Y=1∣X=0)=P(X=0)P(X=0∩Y=1)
=0.08+0.15+0.060.06=0.290.15=0.5172
(iv) Are X and Y independent?
The random variables X and Y are independent if P(xi∩yi)=P(xi)×P(yi) where i=1,2,3... (This must be true for all cells.)
Let's test it for X=0,Y=2:
P(X=0∩Y=2)=0.06
P(X=0)=0.08+0.15+0.06=0.29
P(Y=2)=0.06+0.03+0.13+0.04=0.26
Therefore, X and Y are not independent.

Random Variables & Joint Distribution
It is a very good idea to review the following formulas as they are useful when dealing with joint probability distributions.
Review: Expected Value, Variance, and Standard Deviation of a Random Variable X
Let X be a discrete random variable.
The expected value or mean of X is denoted by E(X) or μ, and is calculated by
The variance of X is denoted by Var(X) or σ2, and is calculated by
or
or
where
E(X2)=∑(xi)2P(xi)
The standard deviation of X is denoted by SD(X) or σ, and is calculated by
Example with one random variable X:
Mean:
E(X)=μ=∑[xiP(xi)]
E(X)=(1)(0.5)+(2)(0.5)=1.5
Variance (Method 1):
Var(X)=σ2=∑(xi−μ)2P(xi)
(1−1.5)2(0.5)+(2−1.5)2(0.5)=0.125+0.125=0.25
Variance (Method 2):
Var(X)=σ2=[∑xi 2P(xi)]−μ2
[(1)2(0.5)+(2)2(0.5)]−(1.5)2=[0.5+2]−2.25=2.5−2.25=0.25
Variance (Method 3):
Var(X)=E(X2)−E(X)2
E(X)=(1)(0.5)+(2)(0.5)=1.5 (solved above)
E(X2)=[(1)2(0.5)+(2)2(0.5)]=0.5+2=2.5 (solved above)
So, Var(X)=E(W2)−E(W)2=2.5−(1.5)2=2.5+2.25=0.25
Method 3 is really just the same as Method 2 but broken down into more steps.
Standard deviation:
SD(X)=σ=Var(X)
SD(X)=0.25=0.5
Example with 2 random variables X and Y:
x24y68P(X∩Y)0.20.8

Example: Random Variables & Joint Distribution
x24y68P(X∩Y)0.20.8
E(XY)=
Let W=XY
E(XY)→E(W)=(2×6)(0.2)+(4×8)(0.8)=2.4+25.6=28
Var(XY)=
Let W=XY
E(W)=28
E(W2)=(2×6)2(0.2)+(4×8)2(0.8)=28.8+819.2=848
∴Var(XY)→ Var(W)=E(W2)−E(W)2=848−(28)2=64
SD(XY)=
=Var(XY)=64=8
Mark Yourself Question
- Grab a piece of paper and try this problem yourself.
- When you're done, check the "I have answered this question" box below.
- View the solution and report whether you got it right or wrong.
Practice: Random Variables & Joint Distribution
Let X and Y be two discrete random variables with the following joint probability distribution function:
x12y01P(X∩Y)1/32/3
(a) Find E(X)
(b) Find E(Y)
(c) Find E(XY)
(d) Find Var(XY)
Example: Random Variables & Joint Distribution
Let X and Y be two discrete random variables with the following joint probability distribution function:
x12y01P(X∩Y)1/32/3
Find SD(2X−Y)
Let W=2X−Y. Then we get the following pdf:
w2(1)−0=22(2)−1=3P(W=w)1/32/3
E(W)=(2)(31)+(3)(32)=38
E(W2)=(2)2(31)+(3)2(32)=322
So, Var(W)=E(W2)−E(W)2=322−(38)2=322−964=92
Therefore, SD(2X−Y)→SD(W)=92=32
Practice: Random Variables & Joint Distribution
Let X and Y be two discrete random variables with the following joint probability distribution function:
x23y47P(X∩Y)0.60.4
Assume independence.
(a) Find E(X+Y)
(b) Find SD(4X−Y−1)