Professional Documents
Culture Documents
Week2 Annotated Final
Week2 Annotated Final
t2 \ t1 0 1 fY
0 1/4 1/4
1 1/4 1/4
fX
t2 \ t1 0 1 fY t2 \ t1 0 1 fY
0 1/4 1/4 0 1/2 1/4
1 1/4 1/4 1 1/8 1/8
fX fX
t2 \ t1 0 1 fY t2 \ t1 0 1 fY
0 1/4 1/4 0 1/2 1/4
1 1/4 1/4 1 1/8 1/8
fX fX
t2 \ t1 0 1 fY
0 x 1/2 − x
1 1/2 − x x
fX
t2 \ t1 0 1 2 fY
0 1/9 1/9 1/9
1 1/9 1/9 1/9
2 1/9 1/9 1/9
fX
t2 \ t1 0 1 2 fY t2 \ t1 0 1 2 fY
0 1/9 1/9 1/9 0 1/6 1/12 1/12
1 1/9 1/9 1/9 1 1/4 1/8 1/8
2 1/9 1/9 1/9 2 1/12 1/24 1/24
fX fX
t2 \ t1 0 1 2 fY t2 \ t1 0 1 2 fY
0 1/9 1/9 1/9 0 1/6 1/12 1/12
1 1/9 1/9 1/9 1 1/4 1/8 1/8
2 1/9 1/9 1/9 2 1/12 1/24 1/24
fX fX
t2 \ t1 0 1 2 fY
0 0 1/8 1/8
1 1/8 1/8 1/8
2 1/8 1/8 1/8
fX
t2 \ t1 0 1 2 fY t2 \ t1 0 1 2 fY
0 1/9 1/9 1/9 0 1/6 1/12 1/12
1 1/9 1/9 1/9 1 1/4 1/8 1/8
2 1/9 1/9 1/9 2 1/12 1/24 1/24
fX fX
t2 \ t1 0 1 2 fY t2 \ t1 0 1 2 fY
0 0 1/8 1/8 0 1/6 1/12 1/8
1 1/8 1/8 1/8 1 1/4 1/8 1/8
2 1/8 1/8 1/8 2 1/24 1/24 1/24
fX fX
for all t1 ∈ TX , t2 ∈ TY .
To show X and Y are dependent, verify
t1 t2 t3 fX1 X2 X3 (t1 , t2 , t3 )
0 0 0 1/4
0 1 1 1/4
1 0 1 1/4
1 1 1 1/4
t1 t2 t3 fX1 X2 X3 (t1 , t2 , t3 )
0 0 0 1/4
0 1 1 1/4
1 0 1 1/4
1 1 1 1/4
t1 t2 t3 fX1 X2 X3 (t1 , t2 , t3 )
0 0 0 1/4
0 1 1 1/4
1 0 1 1/4
1 1 1 1/4
Definition (i.i.d.)
Random variables X1 , . . . , Xn are said to be independent and identically
distributed (i.i.d.), if
1 they are independent,
Definition (i.i.d.)
Random variables X1 , . . . , Xn are said to be independent and identically
distributed (i.i.d.), if
1 they are independent,
Definition (i.i.d.)
Random variables X1 , . . . , Xn are said to be independent and identically
distributed (i.i.d.), if
1 they are independent,
Andrew Thangaraj
IIT Madras
0.05
0.00
0 2 4 6 8 10
Binomial(10,0.5)
0.2
0.1
0.0
0 2 4 6 8 10
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 3 / 28
PMF of Y = X − 5 (table method)
Uniform{0, 1, . . . , 10} Binomial(10,0.5)
x P(X = x ) y =x −5 x P(X = x ) y =x −5
0 1/11 -5 0 0.00097656 -5
1 1/11 -4 1 0.00976563 -4
2 1/11 -3 2 0.04394531 -3
3 1/11 -2 3 0.1171875 -2
4 1/11 -1 4 0.20507813 -1
5 1/11 0 5 0.24609375 0
6 1/11 1 6 0.20507813 1
7 1/11 2 7 0.1171875 2
8 1/11 3 8 0.04394531 3
9 1/11 4 9 0.00976563 4
10 1/11 5 10 0.00097656 5
0.05
0.00
0 2 4 6 8 10
Y=X 5
0.05
0.00
6 4 2 0 2 4 6
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 5 / 28
PMF plots of X ∼ Binomial(10,0.5) and Y = X − 5
X Binomial(10,0.5)
0.2
0.1
0.0
0 2 4 6 8 10
Y=X 5
0.2
0.1
0.0
6 4 2 0 2 4 6
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 6 / 28
PMF of Y = 2X (table method)
Uniform{0, 1, . . . , 10} Binomial(10,0.5)
x P(X = x ) y = 2x x P(X = x ) y = 2x
0 1/11 1 0 0.00097656 1
1 1/11 2 1 0.00976563 2
2 1/11 4 2 0.04394531 4
3 1/11 8 3 0.1171875 8
4 1/11 16 4 0.20507813 16
5 1/11 32 5 0.24609375 32
6 1/11 64 6 0.20507813 64
7 1/11 128 7 0.1171875 128
8 1/11 256 8 0.04394531 256
9 1/11 512 9 0.00976563 512
10 1/11 1024 10 0.00097656 1024
0.05
0.00
0 2 4 6 8 10
Y = 2X
0.05
0.00
0 200 400 600 800 1000
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 8 / 28
PMF plots of X ∼ Binomial(10,0.5) and Y = 2X
X Binomial(10,0.5)
0.2
0.1
0.0
0 2 4 6 8 10
Y = 2X
0.2
0.1
0.0
0 200 400 600 800 1000
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 9 / 28
One-to-one functions
If f is one-to-one
I Easy to find PMF of f (X ) using the table method
I Easy to visualize the plot of the PMF
P(Y = f (x )) = P(X = x )
x P(X = x ) y = (x − 5)2
0 1/11 25
1 1/11 16
2 1/11 9
3 1/11 4
4 1/11 1
5 1/11 0
6 1/11 1
7 1/11 4
8 1/11 9
9 1/11 16
10 1/11 25
0.0
0 2 4 6 8 10
Y = (X 5)2
0.1
0.0
0 5 10 15 20 25
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 13 / 28
PMF plots: X ∼ Binomial(10,0.5), Y = (X − 5)2
X Binomial(10,0.5)
0.4
0.2
0.0
0 2 4 6 8 10
Y = 2X
0.4
0.2
0.0
0 5 10 15 20 25
Andrew Thangaraj (IIT Madras) Visualizing functions of random variables 14 / 28
Many-to-one functions
Many-to-one: For two or more different input, the function should
result in the same output
I In the plot of y = f (x ) versus x , some horizontal line intersects the
curve at more than one point.
I Non-monotonic functions are many-to-one
I Example: y = x 2 , y = x (1 − x ), y = xe −x
If f is many-to-one
I The table method will generally work. . . .
I Let y0 be a value taken by f at the points x1 , x2 , . . . , xm and nowhere
else. That is, y0 = f (x1 ) = · · · = f (xm ).
x y fXY (x , y ) z
0 0 1/4 0
0 1 1/4 1
1 0 1/4 1
1 1 1/4 2
x y fXY (x , y ) z
0 0 1/4 0
0 1 1/4 1
1 0 1/4 1
1 1 1/4 2
Z ∈ {0, 1, 2}
x y fXY (x , y ) z
0 0 1/4 0
0 1 1/4 1
1 0 1/4 1
1 1 1/4 2
Z ∈ {0, 1, 2}
Z = max(X , Y )
x y fXY (x , y ) z
0 0 1/2 0
0 1 1/4 1
0 2 1/8 2
1 0 1/16 1
1 1 1/32 1
1 2 1/32 2
Z = max(X , Y )
x y fXY (x , y ) z
0 0 1/2 0
0 1 1/4 1
0 2 1/8 2
1 0 1/16 1
1 1 1/32 1
1 2 1/32 2
Pair of fair dice are thrown. What is the distribution of the sum or max
or min?
Pair of fair dice are thrown. What is the distribution of the sum or max
or min?
Table method
I 36 possible values
I Prone to errors
Pair of fair dice are thrown. What is the distribution of the sum or max
or min?
Table method
I 36 possible values
I Prone to errors
g(x , y ): function
I 3D plot is one option, but often not very useful
2 x+
y=
2
0 x
4 2 0 +y= 2 4
0
2 x+
y=
2
4
X , Y ∼ fXY , X ∈ X , Y ∈ Y
X , Y ∼ fXY , X ∈ X , Y ∈ Y
X , Y ∼ fXY , X ∈ X , Y ∈ Y
X
P(Z = z) = fXY (x , y )
(x ,y ):g(x ,y )=z
z 2 3 4 5 6 7
P(Z = z) 1/36 2/36 3/36 4/36 5/36 6/36
z 8 9 10 11 12
P(Z = z) 5/36 4/36 3/36 2/36 1/36
z 1 2 3 4 5 6
P(Z = z) 1/36 3/36 5/36 7/36 9/36 11/36
W ∈ {2, . . . , 2n}
w −1
(
n2
, 2 ≤ w ≤ n + 1,
P(W = w ) = 2n−w +1
n2
, n + 2 ≤ w ≤ 2n.
W ∈ {2, . . . , 2n}
w −1
(
n2
, 2 ≤ w ≤ n + 1,
P(W = w ) = 2n−w +1
n2
, n + 2 ≤ w ≤ 2n.
Figure 1: P(W = w ) vs w , n = 10
Z ∈ {1, . . . , n}
2z − 1
P(Z = z) =
n2
Z ∈ {1, . . . , n}
2z − 1
P(Z = z) =
n2
P(X = x) P(Y = y) P(Z = z)
0.15
0.10
0.05
0.00
0 5 10 0 5 10 0 5 10
Figure 2: P(Z = z) vs z, n = 10
If X and Y are independent, g(X ) and h(Y ) are independent for any
two functions g and h
If X and Y are independent, g(X ) and h(Y ) are independent for any
two functions g and h
If X1 , X2 , X3 , X4 are mutually independent,
If X and Y are independent, g(X ) and h(Y ) are independent for any
two functions g and h
If X1 , X2 , X3 , X4 are mutually independent,
I g(X1 , X2 ) is independent of h(X3 , X4 )
If X and Y are independent, g(X ) and h(Y ) are independent for any
two functions g and h
If X1 , X2 , X3 , X4 are mutually independent,
I g(X1 , X2 ) is independent of h(X3 , X4 )
I g(X1 , X2 , X3 ) is independent of h(X4 )
If X and Y are independent, g(X ) and h(Y ) are independent for any
two functions g and h
If X1 , X2 , X3 , X4 are mutually independent,
I g(X1 , X2 ) is independent of h(X3 , X4 )
I g(X1 , X2 , X3 ) is independent of h(X4 )
X , Y ∼ fXY
Z = min(X , Y ): function of X and Y
Ex: Throw a die twice. Z = minimum of the two numbers seen.
X , Y ∼ fXY
Z = min(X , Y ): function of X and Y
Ex: Throw a die twice. Z = minimum of the two numbers seen.
fZ (z) = P(min(X , Y ) = z)
= P((X = z and Y = z) or (X = z and Y > z)
or (X > z and Y = z))
X X
= fXY (z, z) + fXY (z, t2 ) + fXY (t1 , z)
t2 >z t1 >z
X , Y ∼ fXY
Z = min(X , Y ): function of X and Y
Ex: Throw a die twice. Z = minimum of the two numbers seen.
fZ (z) = P(min(X , Y ) = z)
= P((X = z and Y = z) or (X = z and Y > z)
or (X > z and Y = z))
X X
= fXY (z, z) + fXY (z, t2 ) + fXY (t1 , z)
t2 >z t1 >z
1 2 3 4 5 6
1 1/36 1/36 1/36 1/36 1/36 1/36
2 1/36 1/36 1/36 1/36 1/36 1/36
3 1/36 1/36 1/36 1/36 1/36 1/36
4 1/36 1/36 1/36 1/36 1/36 1/36
5 1/36 1/36 1/36 1/36 1/36 1/36
6 1/36 1/36 1/36 1/36 1/36 1/36
FX (x ) = P(X ≤ x ).
FX (x ) = P(X ≤ x ).
FZ (z) = P(max(X , Y ) ≤ z)
= P((X ≤ z) and (Y ≤ z))
= P(X ≤ z)P(Y ≤ y )
= FX (z)FY (z)
FX (x ) = P(X ≤ x ).
FZ (z) = P(max(X , Y ) ≤ z)
= P((X ≤ z) and (Y ≤ z))
= P(X ≤ z)P(Y ≤ y )
= FX (z)FY (z)