Ch.3 Homework Solution 3-5 (Buffon’s Neddle Problem) A needle of length L is dropped randomly on a plane ruled with parallel lines that are a distance D apart , where D L. Show that the probability that the needle comes to rest crossing a line is 2L/πD.Explain how this gives a mechanical means of estimating the value of π. Sol: Y :針中心點到底線之高 Y ~Uniform(0,D) Θ:針與 X 軸正向之夾角 θ ~Uniform(0,2π) P(針 與 平 行 線 不 相) 交 2 0 ∴P(針與平行線相交)= l D s i n 2 l s i n 2 1 2l d y d 1 2D D 2l D 3-6 x2 y2 A point is chosen randomly in the interior of an ellipse: 2 2 1 .Find the marginal a b densities of the x and y coordinates of the point . Sol: b 2b a 2 a 2 x 2 dx a x 2 dx ab a a a a 2 ∴ a f 1 x2 y2 ( x, y ) , 2 2 1 XY ab a b ( a 2 u 2 dx b u a2 u a2 u2 sin 1 c, a 0), f X ( x) ab 2 2 a a a 2 u 2 a u 2 3-8 Let X and Y have the joint density f ( x, y ) 6 ( x y ) 2 ,0 x 1,0 y 1 7 (a) By integrating over the appropriate regions , find (i)P(X>Y),(ii)P(X+Y 1),(iii)P(X ½). Sol: 2 1 dy ab f ( x, y ) 6 ( x y ) 2 ,0 x 1,0 y 1 7 1 (a)(i) P( X Y ) x 0 0 12 yx 6 1 ( x y ) 2 dydx ( x y ) 3 dx 0 y0 7 7 2 1 (ii) P( X Y 1) 0 1 1 (iii) P( X ) 0 2 1 x 0 1 2 0 6 ( x y ) 2 dydx 7 6 ( x y ) 2 dxdy 7 3-9 Suppose that (X,Y) is uniformly distributed over the region defined by 0 y 1 x 2 and -1 x 1 (a) Find the marginal densities of X and Y . (b) Find the two conditional density Sol: 1 0 y 1 x 2 and -1 x 1 , 1 ( x 2 1)dx 4 3 , ∴ f XY ( x, y ) 3 4 (a) 3 3 3x 2 3 2 f X ( x) dy ( x 1) ,1 x 1 0 4 4 4 4 1 y 3 3 3 3 f Y ( y) dx 1 y 1 y 1 y ,0 y 1 1 y 4 4 4 2 x 2 1 (b) f X Y ( x y) 3 4 3 1 y 1 2 1 y , 1 x 1 2 f Y X ( y x) 3 4 3 3 x2 4 4 1 x2 1 ,0 y 1 3-11 Let U 1 , U 2 and U 3 be independent random variables uniform on [0,1].Find the probability that the roots of the quadratic U 1 x 2 U 2 x U 3 are real . Sol: 1 1 1 4 0 0 2 u1u3 P(U 4U 1U 3 ) 2 2 u 22 1 4 0 0 0 1 1 4 u3 1 0 2 u1u3 4 1 du 2 du1 du 3 1 1 1 u 22 4 u1 0 du du du 3 1 2 u2 0 2 4 du 2 du1 du 3 du 3 du1du 2 3-12【Question】 Let f ( x , y ) c( x 2 y 2 )e x , 0 x , x y x (a)Find c . (b)Find the marginal densities. 【Solution】 (a) f ( x, y ) c ( x 2 y 2 ) e x , 0 x , x y x x c( x 2 0 x x y )e dydx ce x ( x 2 y 2 )dydx x 2 0 x ce x ( x 2 y 0 1 3 yx y ) dx y x 3 4c x 3 e x dx 3 0 4c ( 4) 3 4c 3! 3 1 c 1 8 x f X ( x) 1 8 (x x 2 y 2 )e x dy 1 3 x x e , x0 6 f ( x, y )dx, y 0 y (b) f Y ( y ) f ( x, y )dx, y 0 y 1 y 4 e (1 y ), y 0 f Y ( y) 1 e y (1 y ), y 0 4 5 1 ln 2 36 6 5 1 ln 2 36 6 3-15【Question】 Suppose that X and Y have the joint density function f ( x, y ) c 1 x 2 y 2 , x 2 y 2 1 (d)Find the marginal densities of X and Y . Are X and Y independent random variables? 【Solution】 (d) 2 1 2 2 2 c 1 x y dxdy c 1 r r drd x 2 y 2 1 0 0 2 c 0 1 1 (1 r 2 ) 2 d 0 3 1 c 3 3 2 d 0 2c 3 1 c 3 2 f X ( x) 1 x 2 1 x 3 2 2 3 1 x 2 y 2 dy 2 (let 1 x 2 a 2 ) a a 2 y 2 dy a 3 y2 ( 2 2 a2 y2 a2 y a sin ) 2 a a 3 (1 x 2 ) 4 3 f X ( x) (1 x 2 ), 1 x 1 4 3 Similarly , f Y ( y ) (1 y 2 ), 1 y 1 4 f ( x, y ) f X f Y X and Y are not independent. 3-17【Question】 Let ( X , Y ) be a random point chosen uniformly on the region R X , Y : X Y 1. (b)Find the marginal densities X and Y using your sketch. Be careful of the range of integration. 【Solution】 (b) 1 x f X ( x) 1 dy 1 x , 1 x 1 2 x 1 Similarly , f Y ( y ) 1 y , 1 y 1 3-18【Question】 Let X and Y have the joint densities function f ( x , y ) k ( x y ), 0 y x 1 and 0 elsewhere. (b)Find k . (c)Find the marginal densities of X and Y . 【Solution】 (b) f ( x, y ) k ( x y ) , 0 y x 1 1 x k ( x y)dydx 0 0 1 yx 1 (kxy ky 2 ) dx y 0 2 0 1 1 kx 2 kx 2 dx 2 0 k x3 1 ( ) 2 3 0 k 1 6 k 6 x f X ( x) 6( x y )dy 0 1 f Y ( y ) 6( x y )dx y 3-19【Question】 Suppose that two components have independent exponentially distributed lifetimes, T1 and T2 , with parameters and , respectively. Find (a) P(T1 T2 ) and (b) P(T1 2T2 ) . 【Solution】 (a) f T1 ,T2 (t1 , t 2 ) e t1 e t 2 , 0 t1 , 0 t 2 P (T1 T2 ) e t1 e t 2 dt1 dt 2 0 t2 e t 2 e t 2 dt 2 0 ( ) t 2 e 0 1 (0 1) (b) P (T1 2T2 ) e t1 e t2 dt1 dt 2 0 2t2 e t2 e 2t2 dt 2 0 e t2 ( 2 ) dt 2 0 ( 2 ) 2 (1) 3-23【Question】 Suppose that, conditional on N , X has a binomial distribution with N trials and probability p of success, and that N is a binomial random variable with m trials and probability r of success, Find the unconditional distribution of X . 【Solution】 X N ~ Bin ( N , p) , N ~ Bin (m, r ) m m n P( X x) r n (1 r ) m n p x (1 p ) n x n 0 n x m m!n!(m n)! (rp ) x r n x (1 r ) m n (1 p ) n x n x n!( m n)! x!( n x )!( m x )! m m (m x)! ( pr ) x r n x (1 p ) n x (1 r ) m n n x ( m n)!( n r )! x let n x t , m x k k m k! ( pr ) x r t (1 p ) t (1 r ) k t t 0 ( k t )!t! x k m k (r rp ) t (1 r ) k t (1 rp ) k ( pr ) x (1 rp ) t (1 rp ) k t t 0 t x k m k r rp ( pr ) x (1 rp ) m x t 0 t 1 rp x m ( pr ) x (1 rp ) m x x t 1 r 1 rp k t X ~ Bin (m, rp ) 3-26【Question】 Spherical particles whose radii have density function f R (r ) are dropped on a mesh as in Problem 4. Find an expression for the density function of the particles that pass through. 【Solution】 w 2r d w f R (r )dr 2 3-29【Question】 Let f ( x ) 6 x 2 (1 x ) 2 , for 1 x 1. (a) Describe an algorithm to generate random variables form this density using the rejection method. In what proportion of the trials with the acceptance step be taken? 【Solution】 5 6 x 2 (1 x) 2 , 1 x 1 32 15 f ( x) , 1 x 1 4 f ( x) (a) Step1:Generate T~Uniform(-1,1) Step2:Generate U~Uniform(0,1),independent of T f (T ) If U , then letX T 15 4 o.w , go to Step1 3-34【Question】 Let N 1 and N 2 be independent random variables following Poisson distribution with parameters 1 and 2 . Show that the distribution of N N 1 N 2 is Poisson with parameter 1 2 . 【Solution】 N 1 ~ Poisson (1 ) N 2 ~ Poisson ( 2 ) N N1 N 2 M N1 (t ) e 1 ( e 1) t M N 2 (t ) e 2 ( e 1) t M N (t ) M N1 (t ) M N 2 (t ) e ( 1 2 )( e 1) N ~ Poisson (1 2 ) t 3-35【Question】 For a Poisson distribution, suppose that events are independently labeled A and B with probabilities p A pB 1 . If the parameter of the Poisson distribution is , show that the number of events labeled A follows a Poisson distribution with parameter p A . 【Solution】 N A B ~ Poisson ( ) A N ~ Bin ( N , p A ) p ( A a ) p ( A a, N n) n 0 n a e n p A (1 p A ) n a n! n 0 a (p A ) a e a! na 1 p A na (n a )! let t n a (p A ) a e a! 1 p A t t 0 t! (p A ) a e e (1 p A ) 1 p A t! a!e (1 p A ) t 0 t e PA ( p A ) a a! A ~ Poisson ( p A , ) 3-37【Question】 Let X and Y be independent standard normal random variables. Find the density of Z=X+Y, and show that Z is normally distributed as well. (Hint: Use the technique of completing the square to help in evaluating the integral.) 【Solution】 X~N(0,1) Y~N(0,1) X, Y independent M X (t ) e t2 2 M Y (t ) t2 2 M X Y (t ) e e t2 2 ∴ X+Y~N(0,2) 3-41【Question】 e t 2 ( 2 )2 2 Let X and Y have the joint density function f ( x , y ) , and let Z X Y . Show that the density function of Z is f Z ( z ) z 1 f ( x , ) dy . y y 【Solution】 Z Z XY X W W Y Y W x x z 1 1 w z J w2 w y y w 1 0 w z z 1 f Z ( z ) f ZW ( z , w)dw f XY ( , y ) dy y y 3-43【Question】 Consider forming a random rectangle in two ways. Let U 1 , U 2 , and U 3 be independent random variables uniform on [0,1]. One rectangle has sides U 1 and U 2 , and the other is a square with sides U 3 . Find the probability that the area of the square is greater than the area of the other rectangle. 【Solution】 U 1 ,U 2 ,U 3 ~U(0,1) independent 1 1 1 P( U 32 U 1U 2 )= 0 0 u1u 2 1 1 = 1 0 0 1 = (u 2 0 1 = (1 0 du 3 du 2 du1 u1 u 2 du 2 du1 2 u1 u 3 3 2 2 1 ) du1 0 2 u1 )du1 3 3 1 4 =( u1 u12 ) 9 0 4 5 =1- = 9 9 3-45【Question】 A point is generated on a unit disk in the following way: The radius, R , is uniform on [0,1] , and the angle is uniform on [0,2 ] and is independent of R . (a) Find the joint density of X = R cos and Y = R sin . (b) Find the marginal densities of X and Y . 【Solution】 (a) R ~U [0,1] ~U [0,2 ] 2 2 X R cos R X Y 1 Y Y R sin tan X r x J x r x y r x y y r y 1 1 x2 y2 y 1 1 f XY ( x, y ) f R ( x 2 y 2 , tan 1 ) J , x2 y2 1 2 2 x 2 x y (b) f X ( x) 1 x 2 1 x 2 f XY ( x, y )dy 1 x 2 2 2 2 1 x2 [ln( y x 2 y 2 )] 2 0 1 x2 y2 0 ln( 1 dy 1 x2 1 ), 1 x 1 x 1 2 2 du ln( u a u ) c , a 0 2 2 a u 1 y2 1 ), 1 y 1 Similarly, f Y ( y ) ln( y 1 3-53【Question】 Let X and Y be jointly continuous random variables. (b) Develop an expression for the joint density of XY and Y X . 【Solution】 (b) Z Z Z XY X W or W Y W X Y ZW ZW X J Z Y Z Z Z or W or W ZW ZW X 1 1 W 2 Y Z W W Y X , Z XY w W X X Z W Y Y f ZW ( z , w) 2 1 w z z z z , zw ) f XY ( , zw ) f XY ( , zw ) f XY ( , zw ) f XY ( w w w w 3-54【Question】 Find the joint density of X Y and X Y , where X and Y are independent exponential random variables with parameter λ. Show that X Y and X Y are independent. 【Solution】 X ~exp(λ) Y ~exp(λ) X , Y independent f XY ( x, y) 2 e ( x y ) WV X W X Y 1V Let X V Y Y W 1V 1 1 v J v 1 v w w (1 v) 2 w (1 v) 2 2 (1 v) f W V ( w, v) 2 e w w 1 2 e w w 2 (1 v) (1 v) 2 ∴ X Y , X Y are independent. 3-56【Question】 Each component of the following system (Figure 3.17) has an independent exponentially distributed lifetime with parameter λ. Find the cdf and the density of the system’s lifetime. ●Figure 3.17 T T T 1 T 2 T T a b 【Solution】 Ti ~exp(λ), i=1,…,6 T 3 T 4 ∴ P( Ti t )=1- e t 5 6 T c P( T t )=P( Ta t )P( Tb t )P( Tc t ) = 1 P(T1 t ) P(T2 t ) 1 P(T3 t ) P(T4 t ) 1 P(T5 t ) P(T6 t ) = 1 e 2t , t 0 3 FT (t ) 1 e 2t , t 0 3 f T (t ) 3 1 e 2t 2 2 e 2t 6e 2t 1 e 2t , t 0 2 3-62【Question】 Let X 1 , X 2 ,..., X n be independent continuous random variables each with cumulative distribution function F . Show that the joint cdf of X (1 ) and X ( n ) is F ( x , y ) F n ( y ) F ( y ) F ( x ) , x y . n 【Solution】 F ( x, y ) = P( X (1) x, X ( n ) y ) = P( X ( n ) y ) P( X (1) x, X ( n ) y ) P( X ( n ) y ) = P( X 1 y, X 2 y,..., X n y) = F ( y ) n n 2 Let X (1) =V, X (n ) =U, fUV (u, v) n(n 1) f (u) f (v)F (u) F (v) P( X (1) x, X ( n ) y ) = P( x V U y ) = y x n(n 1) f (u) f (v)F (u)F (v) u n2 x = nf (u )F (u ) F (v) y n 1 x dvdu u du x = nf (u)F (u) F ( x) du y n 1 x = F (u ) F ( x) n y n = F ( y ) F ( x) x F ( x, y ) F ( y ) F ( y ) F ( x) , x y n n 3-63【Question】 If X 1 ,..., X n are independent random variables, each with the density function f , show that the joint density of X (1) ,..., X ( n ) is n! f ( x1 ) f ( x 2 ) f ( x n ), x1 x 2 x n 【Solution】 n! f ( x ) f X ( xn ) f X (1) ,..., X ( n ) ( x1 ,..., xn ) X 1 otherwise 0 x1 xn The n! naturally comes into this formula because, for any set of values, x1 ,..., xn , there are n! equally likely assignments for those values to X 1 ,..., X n which all yield the same values for the order statistics. 3-67【Question】 Find the density of U ( k ) U ( k 1) if the U i , i 1,..., n are independent uniform random variables. This is the density of the spacing between adjacent points chosen uniformly in the interval [0,1]. 【Solution】 U i ~Uniform(0,1) f U ( k )U ( k 1) (u k , u k 1 ) n! 1 1 (u k 1 ) k 2 (1 u k ) nk (k 2)!(n k )! X U ( k ) U ( k 1) Let Y U ( k ) U ( k ) Y U ( k 1) Y X 0< U ( k 1) < U (k ) <1, 0< y x < y <1, 0< x < y <1 J 0 1 1 1 1 1 f X ( x) x n! yx dy ( y x) k 2 (1 y ) n k dy, Let z dz (k 2)!(n k )! 1 x 1 x n! k 2 nk 1 x z 1 z 1 x 1 x dz 0 ( k 2)! ( n k )! 1 1 n! 1 x n1 0 z k 2 1 z nk dz (k 2)!(n k )! n!1 x k 1n k 1 (k 2)!(n k )! n n 1 k 2!n k! n1 x n1 , 0 x 1 n!1 x n 1! (k 2)!(n k )! n 1 Note: X~Beta ( , ) f X ( x) ( ) 1 x (1 x) 1 , 0 x 1 ( )( ) 3-69【Question】 If T1 and T2 are independent exponential random variables, find the density function of R T( 2 ) T(1) . 【Solution】 Ti ~ exp( ) i 1,2 T1 ,T2 indep . f Ti (t ) e t , t 0 Let V T(1) , U T( 2 ) f U ,V (u , v) 2! (e u )(e v )( F (u )) 0 ( F (u ) F (v)) 0 ( F (v)) 0 0!0! 22 e (u v ) , 0 v u 0 1 R U V V V J 1 1 1 V V U R V f R,V (r, v) 22 e ( r vv) 1 f R (r ) 22 e 2v e r dv 0 = e r 2e 2v dv 0 = e r R T( 2) T(1) ~ exp( ) 0 v r v