Quiz 2

Week 1.4: Multiple Random Variables (n > 2)

363 words
2 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Week 1.4: Multiple Random Variables (n > 2) > **Prerequisites:** Joint PMF ([Week 1.1: Joint Probability Mass Function (Joint PMF)](/notes/01-foundation-bsma1004-stats-2-week01-01-joint-pmf)), Conditional ([Week 1.3: Conditional Distributions](/notes/01-foundation-bsma1004-stats-2-week01-03-conditional-distributio...

Week 1.4: Multiple Random Variables (n > 2)

Prerequisites: Joint PMF (Week 1.1: Joint Probability Mass Function (Joint PMF)), Conditional (Week 1.3: Conditional Distributions) Core question: How do we handle joint distributions of three or more random variables?

1. Extension to n Dimensions

Everything from two RVs extends naturally. For X1,,XnX_1, \dots, X_n with joint PMF fX1Xnf_{X_1\dots X_n}: Joint PMF: fX1Xn(t1,,tn)=P(X1=t1,,Xn=tn)f_{X_1\dots X_n}(t_1,\dots,t_n) = \mathbb{P}(X_1=t_1,\dots,X_n=t_n). Marginalisation: Sum over everything you don't want.
fX1(t)=t2tnfX1Xn(t,t2,,tn).f_{X_1}(t) = \sum_{t_2}\cdots\sum_{t_n} f_{X_1\dots X_n}(t,t_2,\dots,t_n).
Joint marginal: fX1X2(t1,t2)=t3tnfX1Xn(t1,t2,t3,,tn)f_{X_1X_2}(t_1,t_2) = \sum_{t_3}\cdots\sum_{t_n} f_{X_1\dots X_n}(t_1,t_2,t_3,\dots,t_n). Chain rule factorisation:
fX1Xn=fX1X2,,XnfX2X3,,XnfXn.f_{X_1\dots X_n} = f_{X_1 \mid X_2,\dots,X_n} \cdot f_{X_2 \mid X_3,\dots,X_n} \cdots f_{X_n}.

2. Example: Triple Coin Toss

X1X_1X2X_2X3X_3fX1X2X3f_{X_1X_2X_3}
0001/8
0011/8
0101/8
0111/8
1001/8
1011/8
1101/8
1111/8
Marginal of X1X_1: Sum over X2,X3X_2, X_3: fX1(0)=4×1/8=1/2f_{X_1}(0) = 4 \times 1/8 = 1/2, fX1(1)=1/2f_{X_1}(1) = 1/2. Joint marginal of (X1,X3)(X_1,X_3): Sum over X2X_2:
  • fX1X3(0,0)=f(0,0,0)+f(0,1,0)=1/8+1/8=1/4f_{X_1X_3}(0,0) = f(0,0,0) + f(0,1,0) = 1/8+1/8 = 1/4
  • fX1X3(0,1)=f(0,0,1)+f(0,1,1)=1/4f_{X_1X_3}(0,1) = f(0,0,1) + f(0,1,1) = 1/4
  • fX1X3(1,0)=f(1,0,0)+f(1,1,0)=1/4f_{X_1X_3}(1,0) = f(1,0,0) + f(1,1,0) = 1/4
  • fX1X3(1,1)=f(1,0,1)+f(1,1,1)=1/4f_{X_1X_3}(1,1) = f(1,0,1) + f(1,1,1) = 1/4

3. Even Parity Example (Pairwise but not Mutual Independence)

X1,X2,X3X_1, X_2, X_3 each Uniform{0,1}\{0,1\}, sum is even.
X1X_1X2X_2X3X_3Prob
0001/4
0111/4
1011/4
1101/4
Any pair is independent, but the triple is dependent (not all 8 combinations possible).

4. Practice Questions

Q1 (Easy)

For the triple coin toss, find fX2X1=1,X3=0(t)f_{X_2 \mid X_1=1, X_3=0}(t).
Full Solution
fX1X3(1,0)=1/4f_{X_1X_3}(1,0) = 1/4. fX1X2X3(1,0,0)=1/8f_{X_1X_2X_3}(1,0,0) = 1/8, fX1X2X3(1,1,0)=1/8f_{X_1X_2X_3}(1,1,0) = 1/8.
fX2X1=1,X3=0(0)=1/81/4=1/2f_{X_2 \mid X_1=1, X_3=0}(0) = \frac{1/8}{1/4} = 1/2, fX2X1=1,X3=0(1)=1/81/4=1/2f_{X_2 \mid X_1=1, X_3=0}(1) = \frac{1/8}{1/4} = 1/2.

Document outline

Keep your place and jump directly to a heading.

Table of Contents
System Normal // Awaiting Context

Intelligence Hub

Navigate the knowledge graph to generate context. The Hub adapts dynamically to surface backlinks, related notes, and metadata insights.