Ch2 Homework Solution 2-8 Show that the binomial probabilities sum to 1. X ~ B (n, p) n n k k p k 0 (1 p) n k ( p (1 p)) n 1 2-11 Consider the binomial distribution with n trails and probability p of success on each trial. For what value of k is P(X=k) maximized? This value is called the mode of the distribution. (Hint: Consider the ratio of successive terms.) P( X k ) 1 P ( X k 1) & P( X k ) 1 P ( X k 1) n k p (1 p) n k n!(k 1)!(n k 1)! p (n k 1) p k 1 -(1) k!(n k )!n!(1 p) k (1 p) n k 1 n k 1 p (1 p) k 1 n k p (1 p) n k n!(k 1)!(n k 1)! p k (1 p) n k (k 1)(1 p) k 1 -(2) k ! n k 1 (n k ) p n k 1 k ! ( n k )! n ! p ( 1 p ) n k 1 p (1 p) k 1 (1) (n k 1) p k kp k p(n 1) p(n 1) 1 k p(n 1) (2) (k 1)(1 p) np kp k p(n 1) 1 if p(n 1) , k = p(n+1)-1 or if p(n 1) , k = [ p(n+1) ] p(n+1) 2-15 Two terms, A and B, play a series of games. If team A has probability 0.4 of winning each game, is it to its advantage to play the best three out of five games or the best four out of seven? Assume the outcomes of successive games are independent. (1) Three out of five games : P(A wins ) 0.43 3! 4! 0.43 0.6 0.43 0.62 0.43 (1 3x0.6 6 x0.36) 2! 2!2! = 4.96 x 0.43 (2) Four out of seven games : P(A w i n) s 0.44 4! 5! 6! 0.44 0.6 0.44 0.62 0.44 0.63 3! 3!2! 3!3! 0.44 (1 4 x0.6 10 x0.36 20 x0.216) 4.528 x0.43 “Three out of five games” is better! 2-25 The probability of being dealt a royal straight flush (ace, king, queen, jack, and ten of the same suit) in poker is about 1.3x10-8. Suppose that an avid poker player sees 100 hands a week, 52 weeks a year, for 20 years. a. What is the probability that she never sees a royal straight flush dealt? b. What is the probability that she sees two royal straight flushes dealt? 100 x 52 x 20 = 104000 (a) ( 1.3 x 10-8 )104000 = 0.9987 103998 104000 1 1.3x108 (1.3x108 ) 2 9 x107 (b) 2 2-28 Let p0, p1, …, pn denote the probability mass function of the binomial distribution with parameters n and p. Let q = 1-p. Show that the binomial probabilities can be computed recursively by p0 = qn and Pk (n k 1) p Pk 1 kq n k nk p q Pk (n k 1) p k Pk 1 n k 1 n k 1 kq p q k 1 Pk (n k 1) p Pk 1 kq k = 1, 2, …, n k = 1, 2, …, n 2-29 Show that the Poisson probabilities p0, p1, …, pn can be computed recursively by p0 = exp(-λ) and Pk P( X x) k Pk 1 k = 1, 2, …, n x e x! Pk k e (k 1)! Pk 1 k! k 1 e k Pk k Pk 1 2-32 For what value of k is the Poisson frequency function with parameter λ maximized? (Hint: Consider the ratio of consecutive terms.) Pk 1 Pk 1 k 1 & & Pk 1 Pk 1 k ! 1 1 k if , k = λ or λ-1 if , k = [λ] 2-39 The Cauchy cumulative distribution function is 1 1 tan 1( x) 2 F ( x) -∞ < x <∞ a Show that this is a cdf. b Find the density function. c Find x such that P (X > x) = .1. F ( x) (a) (1) 1 1 t a n1( x) 2 -∞ < x <∞ 1 1 tan 1 x 0 x 2 lim 1 1 t a n1 x 1 x 2 1 1 (2) F ( x) 0, x. F(x) 1 x2 lim (3) 1 1 tan 1 x F ( x0 ) x x0 2 lim F(x) 右連續 0 By (1)(2)(3) F(x) is a c.d.f (b) f ( x) F ( x) (c) 1 1 1 x2 1 a 1 x2 dx 0.1 1 1 t a n ( x) 0.1 a 1 ( t a n1 a ) 0.1 2 1 1 t a n1 a ( ) 2 10 a 3.078 1 ,- x 2-49 The gamma function is a generalized factorial function. a Show that Γ(1) = 1. b. Show that Γ(x+1) = xΓ(x). (Hint: Use integration by parts) c. Conclude that Γ(n) = (n-1)! for n = 1, 2, 3, … 1 2 d. Use the fact that ( ) to show that, if n is an odd integer, n (n 1)! ( ) n 1 2 2n 1( )! 2 Gamma function (t ) e y y t 1dy 0 (a) (1) e y dy e y 0 1 0 (b) ( x 1) y x 0 e y dy = e y y x 0 (e y ) xyx 1dy 0 = x e y y x 1dy 0 = x (x) (c) (n) (n 1)(n 1) = (n 1)( n 2)(n 2) = … = (n 1)( n 2)3 2 1 (1) = (n 1)! 1 (d) ( ) , n is an odd integer. 2 n (n 1)! Claim: ( ) n 1 2 2n 1( )! 2 1 Pf: (1) n = 1, ( ) . 2 (2) 設 n = k (k is an odd integer.) k (k 1)! ( ) 成立. k 1 2 2k 1( )! 2 (3) n = k + 2. k 1 by(b) k k2 k k k (k 1)! ( ) ( 1) ( ) x 2 k 1 k 1 2 2 2 2 2 2k 1 ( )! 2 2 = (k 1)! k 1 )! 2 By (1)(2)(3) 由數學歸納法知,原命題成立. 2k 1 ( 2-51 Show that the normal density integrates to 1. (Hint: First make a change of variables to reduce the integral to that for the standard normal.) The problem is then to show that x2 e 2 dx 2 . Square both sides and reexpress the problem as that of showing x 2 y2 e 2 dx e 2 dy = 2 Finally, write the product of integrals as a double integral and change to the polar coordinates. claim: i.e. claim: 1 2 x2 e 2 dx x2 e 2 dx 1 2 Sol : x2 Let e 2 dx x2 2 e 2 dx 2 x 2 y2 2 2 dx e dy = e = Let X r cos Y r sin dxdy rdrd = ( x 2 y 2 ) 2 e dxdy 2 0 0 r 2 e 2 rd dr r 2 r e 2 dr 0 = 2 r 2 = 2 e 2 0 = 2 x2 e 2 dx 1 2 2-57 X ~ N ( , 2 ) and 2 x2 e 2 dx 1 Y aX b , where a<0 , show that Y ~ N (a b, a 2 2 ) Sol: X ~ N ( , 2 ) Y aX b, a 0 X= ( x ) 2 f X ( x) 1 2 e 2 2 Y b a , J 1 a ( 1 f Y ( y) 2 e y b ) a 2 2 2 ( y ( b a )) 2 1 1 = a 2 a e 2 a 2 2 Y ~ N (a b, a 2 2 ) 2-58 U . If U is uniform on [0,1] , find the density of Sol: U ~uniform[0,1] fU (u) 1 , Y= U P(Y y) P( U ) y) P(U y 2 ) y 2 f Y ( y) (y)=2y , 0 y 1 2-60 Find the density function of Y= e Z , where Z ~ N ( , 2 ) .This is called the lognormal density, since log Y is normally distributed. Sol: Z~N(μ,σ²) Let Y= e Z , Z= ln Y , J 1 y 1 1 ∴ f Y ( y ) f Z ( l ny ) (y)= e y 2 = ( l yn ) 2 1 2 y 0 x , , 0 2 2 exp( ( 1 y ln x 2 ) ) 2 2 2-63 Suppose that follows a uniform distribution on the interval [ density of tan . Sol: ~U[ f ( ) = , ] 2 2 1 , θ [ , ] 2 2 , ].Find the cdf and 2 2 tan 1 y 1 Y= tan , P(Y y)=P(tan y)=P( tan 1 y ) 2 d 1 tan 1 y 1 , 2 x 2-67 The Weibull cumulative distribution function is F ( x) 1 e ( x ) , x ≧0,α>0,β>0 (a) Find the density function (b) Show that is W follows a Weibull distribution , then X= (W ) follows an exponential distribution . (c) How could Weibull random variable be generated from a uniform random number generator ? Sol: X ~ Weibull , x 0,α>0,β>0 (a) F (x) =, x 0,α>0,β>0 f ( x ) e x ( ) ( ) x 1 ( ) 1 x 1e , x 0,α>0,β>0 x (b) X= (W ) , X ~ Weibull ( , ) 1 J x 1 1 W (x) , 1 f X ( x) (x ) 1 e 1 (c) F x ( ) 1 ( z) z F W (w) 1 e ? Z 1 x e x ~ exp(1) let z= 1 e w ( ) 1-Z= e w ( ) w ( ) w ln( 1 z ) ( ) w 又 if Z~ uniform[0,1] then 1-Z~uniform[0,1] ∴we can firstly generate U ~uniform(0,1) let W= then X ~ Weibull ( , ) ( ln U ) ( ln( 1 z ))