This preview shows page 1. Sign up to view the full content.
Unformatted text preview: Example class 8
STAT1301 Probability and Statistics I Chan Chi Ho, Chan Tsz Hin & Shi Yun November 9, 2011 Review: Joint and Marginal Distributions I
1 Let X1 , . . . , Xn be random variables deﬁned on the same sample space
Ω. The joint distribution function of (X1 , . . . , Xn ) is deﬁned by
F (x1 , . . . , xn ) = P (X1 ≤ x1 , X2 ≤ x2 , . . . , Xn ≤ xn , )
The distribution function FXi of each Xi is called the marginal
distribution function of Xi . 2 For discrete random variables X1 , . . . , Xn , the joint probability mass
function of (X1 , . . . , Xn ) is
f (x1 , . . . , xn ) = P (X1 = x1 , X2 = x2 , . . . , Xn = xn , )
The mass function fXi = P (Xi = x ) of each Xi is called the marginal
probability mass function of Xi .
fXi (x ) = ∑ . . . ∑
u1 ∑ . . . ∑f (u1 , . . . , ui −1 , x , ui +1 , . . . , un ) ui −1 ui +1 un Review: Joint and Marginal Distributions II
3 Random variables X1 , . . . , Xn are (jointly) continuous if their joint
distribution function F satisﬁes
x1 F (x1 , . . . , xn ) = xn ...
−∞ −∞ f (u1 , . . . , un )dun . . . du1 , for some nonnegative function f : (−∞, ∞)n → [0, ∞). The function f
is called the joint probability density function of (X1 , . . . , Xn ). The pdf
of Xi is called the marginal pdf of Xi .
∞ fXi (x ) =
4 ∞ ...
−∞ −∞ f (u1 , . . . , ui −1 , x , ui +1 , . . . , un )dun . . . dui +1 dui −1 . . . du1 If a joint distribution function F possesses all partial derivatives at
(X1 , . . . , Xn ), then the joint pdf is
f (x1 , . . . , xn ) = ∂n
F (x1 , . . . , xn ).
∂ x1 . . . ∂ xn Review: Independence of random variables Random variables X1 , . . . , Xn are independent if and only if their joint
pmf(pdf) or cdf is equal to the product of their marginal pmfs(pdfs) or
cdfs, i.e.
f (x1 , . . . , xn ) = fX1 (x1 ) . . . fXn (xn ) or F (x1 , . . . , xn ) = FX1 (x1 ) . . . FXn (xn ) Proposition Random variables X and Y are independent if and only if
1 the supports of X and Y do not depend on each other 2 f (x , y ) can be factorized as g (x )h(y ) This proposition applies to both discrete and continuous random variables
and can be generalized to multivariate cases. Review: Expectation of function of random variables
Deﬁnition For random variables X1 , . . . , Xn with joint pmf or pdf
f (x1 , . . . , xn ), if u (X1 , . . . , Xn ) is a function of these random variables, then
the expectation of this function is deﬁned as
E (u (X1 , . . . , Xn )) = ∑ . . . ∑u (x1 , . . . , xn )f (x1 , . . . , xn )
x1 ∞ E (u (X1 , . . . , Xn )) = ∞ ...
−∞ discrete xn −∞ u (x1 , . . . , xn )f (x1 , . . . , xn ) Key Properties
If X and Y are independent, then E (XY ) = E (X )E (Y ) and
MX +Y (t ) = MX (t )MY (t ) continuous Problem 1 Multinomial distribution In a threeway election, candidate A, B and C
has probability of p1 , p2 and p3 to receive one vote(p1 + p2 + p3 = 1). If
there are n votes in total, ﬁnd the joint and marginal distribution of A, B
and C’s votes. Solution to Problem 1 I
Let X1 , X2 and X3 denote the votes of A, B and C respectively.
(X1 , X2 , X3 ) follows a multinomial distribution. The joint pmf is:
f (n1 , n2 , n3 ) = P (X1 = n1 , X2 = n2 , X3 = n3 ) = n
p n1 p n2 p n3
n1 , n2 , n3 1 2 3 Note that n1 + n2 + n3 = n. Therefore, there are only two random variables
here since n3 = n − n1 − n2 . The marginal pmf for X1 can be computed:
n−n1 fX1 (n1 ) = ∑ f (n1 , n2 , n − n1 − n2 ) n2 =1
n−n1 = ∑ n2 =1
n−n1 = ∑ n2 =1 n
p n1 p n2 (1 − p1 − p2 )n−n1 −n2
n1 , n2 , n − n1 − n2 1 2
n!
p n1 p n2 (1 − p1 − p2 )n−n1 −n2
n1 !n2 !(n − n1 − n2 )! 1 2 = n−n1
n!
(n − n1 )!
p n1
p n2 (1 − p1 − p2 )n−n1 −n2
(n − n1 )!n1 ! 1 n∑1 n2 !(n − n1 − n2 )! 2
2= = n!
p n1 (1 − p1 )n−n1
n1 !(n − n1 )! 1 ∼ Binomial (n, p1 ) Solution to Problem 1 II Conclusion: Marginal distribution of a multinomial distribution is
binomial. And E (Xi ) = npi , Var (Xi ) = npi (1 − pi ). Problem 2
Let X , Y be two discrete random variables with their joint pmf f (x , y )
tabulated below:
x,y
1
2
3 1
0.05
0.15
0.10 2
0.01
0.20
0.05 3
0.10
0.05
0.10 4
0.04
0.10
0.05 1 Tabulate the joint cdf F (x , y ) of (X , Y ) for x = 1, 2, 3 and
y = 1, 2, 3, 4. 2 Calculate the marginal pmfs of X and Y respectively. Are X and Y
independent? 3 Calculate the marginal cdfs of X and Y respectively. Solution to Problem 2 I
1 Joint cdf F (x , y )
x,y
1
2
3 2 1
0.05
0.20
0.30 2
0.06
0.41
0.56 3
0.16
0.56
0.81 4
0.20
0.70
1.00 Marginal pmf of X and Y :
x,y
1
2
3
pY ( y ) 1
0.05
0.15
0.10
0.30 2
0.01
0.20
0.05
0.26 3
0.10
0.05
0.10
0.25 4
0.04
0.10
0.05
0.19 pX ( x )
0.20
0.50
0.30
1.00 Since
P (X = 1, Y = 1) = 0.05 = pX (X = 1)pY (Y = 1) = 0.20 × 0.30 = 0.06,
X and Y are not independent. Solution to Problem 2 II
3 Marginal cdf of X : 0
for x < 1 0.2 for 1 ≤ x < 2
FX (x ) = P (X ≤ x ) =
0.7 for 2 ≤ x < 3 1
for x ≥ 3
Marginal cdf of Y : 0 0.3 FY (y ) = P (Y ≤ y ) = 0.56 0.81 1 for
for
for
for
for y <1
1≤y <2
2≤y <3
3≤y <4
x ≥4 Problem 3 Suppose that the joint pdf of X and Y is speciﬁed as follows:
f (x , y ) = cx 2 y
0 for x 2 ≤ y ≤ 1,
otherwise. Determine the value of the constant c and then the value of P (X ≥ Y ). Solution to problem 3 I
The set S of points (x , y ) for which f (x , y ) > 0 is sketched in Fig.1. Solution to problem 3 II Since f (x , y ) = 0 outside S , it follows that:
∞ 1 ∞ 1 f (x , y )dxdy =
−∞ −∞ cx 2 ydydx = −1 x 2 Thus, c = 21 .
4
The subset S0 of S where x ≥ y is sketched in Fig.2. 4
c =1
21 Solution to problem 3 III Hence,
1 x P (X ≥ Y ) =
0 x2 21 2
3
x ydydx = .
4
20 Problem 4 A man and a woman agree to meet at a certain location about 12:30.
Suppose that the man arrives at a time uniformly distributed between
12:15 and 12:45 and if the woman independently arrives at a time
uniformly distributed between 12:00 and 13:00.
1 Determine the probability that the ﬁrst to arrive waits no longer than
5 minutes. 2 How likely is that the man arrives ﬁrst? Solution to Problem 4
1 Let X and Y respectively be the numbers of minutes past twelve at
which the man and the woman arrive. Then X and Y are
independently distributed with X ∼ U (15, 45), Y ∼ U (0, 60) , i.e. the
joint pdf of X and Y is given by f (x , y ) = 1
1
1
×
=
,
45 − 15 60 − 0 1800 15 < x < 45, 0 < y < 60. The probability that the ﬁrst to arrive waits no longer than 5 minut
P (X − Y  ≤ 5) = P (X − 5 ≤ Y ≤ X + 5)
45 x +5 1
=
dydx =
15 x −5 1800
2 45
15 1
30
1
dx =
=.
180
180 6 The probability that the man arrives ﬁrst is
45 60 P (X < Y ) =
15 x 1
dydx =
1800 45
15 60 − x
1
x2
dx =
60x −
1800
1800
2 45 1
=.
2
15 Problem 5 Prove the following proposition: The continuous(discrete) random
variables X and Y are independent if and only if their joint pdf(pmf) can
be expressed as fX ,Y (x , y ) = g (x )h(y ), where −∞ < x , y < ∞. Solution to Problem 5 I
Proof : ⇒ (necessity) Independence implies that the density is the product
of the marginal densities of X and Y . So fX ,Y (x , y ) can be factorized as
fX (x )fY (y ) which is one form of g (x )h(y ).
⇐ (suﬃciency) If fX ,Y (x , y ) = g (x )h(y ), then
∞ ∞ 1=
−∞ −∞
∞ = fX ,Y (x , y )dxdy
∞ g (x )dx
−∞ h(y )dy
−∞ = C1 C2
where C1 = ∞
−∞ g (x )dx and C2 = ∞
−∞ h(y )dy . ∞ fX (x ) = −∞ ∞ fX ,Y (x , y )dy = ∞ fY ( y ) = −∞ Also, −∞ g (x )h(y )dy = C2 g (x ) ∞ fX ,Y (x , y )dx = −∞ g (x )h(y )dx = C1 h(y ) Solution to Problem 5 II Since C1 C2 = 1, we know that
fX ,Y (x , y ) = g (x )h(y ) = fX (x )fY (y )
= f X ( x ) fY ( y )
C1 C2 which implies the independence. Thus the proof is complete. Problem 6 Determine whether the random variables X and Y are independent for
following joint pdfs:
1 f (x , y ) = xe −(x +y )
0 x > 0, y > 0
;
otherwise 2 f (x , y ) = 2
0 0 < x < y, 0 < y < 1
.
otherwise Solution to Problem 6 1 2 Since f (x , y ) = xe −(x +y ) = (xe −x )(e −y ), and the ranges of x and y
does not depend on each other, X and Y are independent.
Since the range of x depends on y , X and Y are not independent. Problem 7 Buﬀon’s needle problem A table is ruled with equidistant parallel lines a
distance D apart. A needle of length L, where L ≤ D , is randomly thrown
on the table. What is the probability that the needle will intersect one of
the lines(the other probability being that the needle will be completely
contained in the strip between two lines)? Solution to Problem 7 I Let us determine the position of the needle by specifying the distance X
from the middle point of the needle to the nearest parallel line, and the
angle θ between the needle and the projected line of length X . Solution to Problem 7 II
The needle will intersect a line if the hypotenuse of the right triangle is
X
less than L/2, that is, if cosθ < L/2 or X < L cos θ . As X varies between 0
2
2
2
and D /2 and θ between 0 and π /2, fX (x ) = D , fθ (y ) = π . It is reasonable
to assume that they are independent, uniformly distributed random
variables over these respective ranges. Hence,
L
P (X < cosθ ) =
2 fX (x )fθ (y )dxdy
x <L/2cosy 4
πD
4
=
πD
2L
=
πD π /2 L/2cosy = dxdy
0 0
π /2 0 L
cosydy
2 Problem 8 Consider the following two cases.
1 If U and V are jointly continuous, show that P (U = V ) = 0. 2 Let X be uniformly distributed on (0, 1), and let Y = X . Then X and
Y are continuous, and P (X = Y ) = 1. Is there a contradiction here? Solution to Problem 8 I 1 We have that
u P (U = V ) = fU ,V (u , v )dudv = u fU ,V (u , v )dudv = 0. (u ,v ):u =v
2 There is no contradiction. The reason is that although X and Y are
separately continuous, they are not jointly continuous. By deﬁnition
this means there exists no integrable function f : [0, 1]2 → R such that
x y P (X ≤ x , Y ≤ y ) = f (u , v )dudv ,
0 0 ≤ x , y ≤ 1. 0 The strict proof for jointly noncontinuousness may need advanced
knowledge in measure theory. An easier way: Assume the integrable Solution to Problem 8 II
function exists, we try to ﬁnd some contradiction(in fact, this
question serves as one contradiction).
F (x , y ) = P (X ≤ x , Y ≤ y ) = P (X ≤ x , X ≤ y ) = P (X ≤ min(x , y ))
= x
y for x < y
for y ≤ x
2 (
x,
We try to ﬁnd the f (x , y ) = ∂ ∂Fx(∂ yy ) . since ∂ F∂ x ,y ) exists almost
x
everywhere (except at x = y ) and equals to 1 if x < y and 0 if x > y .
Thus, we have f (x , y ) = 0 almost everywhere. It can’t be a valid pdf
since it is 0 almost everywhere. This is the contradiction. ...
View
Full
Document
This note was uploaded on 01/16/2012 for the course STAT 1301 taught by Professor Smslee during the Fall '08 term at HKU.
 Fall '08
 SMSLee
 Statistics, Probability

Click to edit the document details