Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Handout Ch 5 Review Bernoulli Distribution A random variable X has a Bernoulli distribution if Pr(X = 1) = p and Pr(X = 0) = 1– p = q The p.m.f. of X can be written as p x q1 x for x 0, 1 f ( x | p) otherwise 0 E ( X ) 1 p 0 q p E ( X 2 ) 12 p 0 2 q p Var( X ) E ( X 2 ) E ( X ) pq 2 (t ) E (e tX ) pet q for t 2 Jia-Ying Chen Binomial Distribution If the random variable X1, …, Xn form n Bernoulli trials with parameter p, and if X X 1 X n , then X has a binomial distribution. The p.m.f. of X can be written as n x n x for x 0, 1, 2,, n p q f ( x | n, p) x 0 otherwise n E ( X ) E ( X i ) np i 1 n Var ( X ) Var ( X i ) npq i 1 n (t ) E (e ) E (etXi ) ( pet q) n tX i 1 3 If X1, …, Xk are independent random variables and if Xi has a binomial distribution with parameters ni and p, then the sum X 1 X k has a Jia-Ying Chen binomial distribution with parameters n n1 nk and p. Example 1 (5.2.10) 4 The probability that each specific child in a given family will inherit a certain disease is p. If it is known that at least one child in a family of n children has inherited the disease, what is the expected number of children in the family who have inherited the disease? Jia-Ying Chen Solution 5 Jia-Ying Chen Poisson Distribution X has a Poisson distribution with mean l if the p.m.f. of X has: e l lx for x 0,1, 2, f ( x | l ) x! 0 otherwise lx Recall that e x 0 x! l lx Therefore, f ( x | l ) e e l e l 1 x 0 x 0 x! 6 e l l x 1 e l l y e l lx E ( X ) xf ( x | l ) x l l l x! y! x 0 x 1 x 1 ( x 1)! y 0 l Jia-Ying Chen Poisson Distribution E X ( X 1) x( x 1) f ( x | l ) x 0 e l lx 2 e l l y e l lx x( x 1) l2 l2 l2 x! x2 x 2 ( x 2)! y 0 y! E X ( X 1) E ( X 2 ) E ( X ) E ( X 2 ) l E ( X 2 ) l2 l Var ( X ) E ( X 2 ) [ E ( X )]2 l2 l l2 l The moment generating function (let ) x t t etxe l lx l (t ) E (e ) e e l ele el ( e 1) x! x! x 0 x 0 tX 7 Jia-Ying Chen Poisson Distribution If the random variables X1, …, Xk are independent and if Xi has a Poisson distribution with mean li , then the sum X 1 X k has a Poisson distribution with mean l1 lk . Proof: Let i (t ) denote the m.g.f. of Xi and (t ) denote the m.g.f. of the sum X1 X k . k k i 1 i 1 (t ) i ( t ) e 8 li ( et 1) e ( l1 lk )( et 1) Example 5.4.1: The mean number of customers who visit the store in one hour is 4.5. What is the probability that at least 12 customers will arrive in a two-hour period? X = X1 + X2 has a Poisson distribution with mean 9. So, Pr( X 12) 0.1970. Jia-Ying Chen Poisson Approximation to Binomial Distribution When the value of n is large and the value of p is close to 0, the binomial distribution with parameters n and p can be approximated by a Poisson distribution with mean np. Proof: For a binomial distribution with l= np, we have n(n 1) (n x 1) x f ( x | n, p) p (1 p) n x x! lx n n 1 n x 1 l n l . ... (1 ) (1 ) x x! n n n n n n n 1 n x 1 l x . ... ( 1 ) 1 As n , then p 0 , then nlim n n n n l n l ( 1 ) e Also, nlim n e l lx f ( x | n, p) (for every fixed positive integer x) x! 9 l For x 0, f ( x | n, p) (1 p) n (1 ) n . n Jia-Ying Chen 羅必達法則 當x→a時,函數f(x)及g(x)都趨於零; 在點a的附近鄰域內,f’(x)及g’(x)都存在,且g’(x) ≠0 lim x a f ' ( x) 存在(或為無窮大), g ' ( x) 則 lim x a 10 f ( x) f '( x) lim g ( x) x a g '( x) 各種形式:0/0,∞/∞,0× ∞, ∞- ∞,00, ∞0,1∞ Jia-Ying Chen Example 2 (5.4.8) 11 Suppose that X1 and X2 are independent random variables and that Xi has a Poisson distribution with mean li (i=1,2). For each fixed value of k (k=1,2,…), determine the conditional distribution of X1 given that X1+X2=k Jia-Ying Chen Solution 12 Jia-Ying Chen Example 3 (5.4.14) 13 An airline sells 200 tickets for a certain flight on an airplane that has only 198 seats because, on the average, 1 percent of purchasers of airline tickets do not appear for the departure of their flight. Determine the probability that everyone who appears for the departure of this flight will have a seat Jia-Ying Chen Solution 14 Jia-Ying Chen Geometric Distribution Suppose that the probability of a success is p, and the probability of a failure is q=1 – p. Then these experiments form an infinite sequence of Bernoulli trials with parameter p. Let X = number of failures to first success. f ( x | p ) = pqx for x = 0, 1, 2, … Let Y = number of trials to first success. f ( y | p ) = pqy–1 q 1 E( X ) E (Y ) p p q q Var( X ) 2 Var(Y ) 2 p p 15 Jia-Ying Chen The m.g.f of Geometric Distribution If X1 has a geometric distribution with parameter p, then the m.g.f. 1 (t ) E (e ) p (qet ) x tX1 x 0 It is known that 1 (t ) p 1 qet E ( X 1 ) 1(0) x x 0 1 1 for t log (1/q) q p Var ( X 1 ) 1(0) [ 1(0)]2 16 (for 0 1) q p2 Jia-Ying Chen Example 4 假設某工廠產出不良品的機率為0.1,請問 (1)在發現第一個不良品前有10個良品產出的機 率為何? (2)直到產出10 個或10個以上產品才發現第一個 不良品之機率 為何? 17 Jia-Ying Chen Solution 令X 表示發現第一個不良品時檢查出良品的產品數,則 (1)發現第一個不良品前有10個良品產出的機率為 P( X 10) 0.1 (0.9)10 0.03487 (2)直到產出10 個或10個以上產品才發現第一個不良品之 機率, P( X 9) 0.1 (0.9)9 0.1 (0.9)10 0.1 (0.9)11 0.1 (0.9)9 (1 0.9 0.92 1 9 0.1 (0.9) 1 0.9 (0.9)9 0.3874 Or 18 ) P( X 9) P(前 9 個產品均為良品) (0.9)9 0.3874 Jia-Ying Chen Normal Distribution 19 There are three reasons why normal distribution is important Mathematical properties of the normal distribution have simple forms Many random variables often have distributions that are approximately normal Central limit theorem tells that many sample functions have distributions which are approximately normal 2 1 1 x 2 exp The p.d.f. of a normal distribution f ( x | , ) 1/ 2 2 (2 ) Jia-Ying Chen 極座標 直角座標與極座標的轉換 ∫ ∫dxdy=rdrdθ X=r*cosθ,y=r*sinθ (x,y) 20 Ex: x2+y2≦1 r Jia-Ying Chen The m.g.f. of Normal Distribution (t ) E (e ) tX 1 ( x )2 exp tx dx 2 2 2 ( x u)2 1 2 2 [ x ( 2t )]2 since tx t t 2 2 2 2 2 [ x ( 2t )]2 1 22 1 so (t ) exp( t t ) exp dx 2 2 2 2 1 exp(t 2t 2 ) 2 E (X ) (0) Var ( X ) (0) [ (0)]2 2 21 Jia-Ying Chen Properties of Normal Distribution 22 If the random variables X1, …, Xk are independent and if Xi has a normal distribution with mean mi and variance si2, then the sum X1+ . . .+ Xk has a normal distribution with mean m1 + . . .+ mk and variance s12 + . . .+ sk2. k k 1 2 2 k k 2 2 Proof: (t ) i (t ) exp i t i t exp i t i t 2 i 1 i 1 i 1 i 1 The variable a1x1 + . . .+ akxk+ b has a normal distribution with mean a1m1 + . . .+ akmk + b and variance a12s12 + . . .+ ak2sk2 Suppose that X1, …, Xn form a random sample from a normal distribution with mean m and variance s2 , and let X n denote the sample mean. Then X n has a normal distribution with mean m and s2/n. Jia-Ying Chen Example 5 (5.6.11) Suppose that a random sample of size n is to be taken from a normal distribution with mean μ and standard deviation 2. Determine the smallest value of n such that Pr( X n 0.1) 0.9 23 Jia-Ying Chen Solution 24 Jia-Ying Chen Example 6 Suppose that the joint p.d.f. of two random variables X and Y is as follows. Show that these two random variable X and Y are independent. 1 (1/ 2)( x2 y2 ) f ( x, y) e for - x 2 and - <y< 25 Jia-Ying Chen Solution 26 Recall that suppose X and Y are random variables that have a continuous joint p.d.f. Then X and Y will be independent if and only if, for x and y , f ( x, y ) g1 ( x) g 2 ( y ) 1 (1/ 2)( x2 y2 ) 1 12 x2 1 12 y2 f ( x, y) e ( e )( e ) g1 ( x) g 2 ( y) 2 2 2 And Therefore, X and Y are independent Jia-Ying Chen Exponential Distribution A gamma distribution with parameters a = 1 and b is an exponential distribution. f x | e x (for x 0) A random variable X has an exponential distribution with parameters b has: 1 1 E X , Var X 2 , t (for t ) t Pr X t t e x dx e t 27 Pr X t h e t h Pr X t h | X t t e h Pr X h Pr X t e Memoryless property of exponential distribution Jia-Ying Chen Life Test Suppose X1, …, Xn denote the lifetime of bulb i and form a random sample from an exponential distribution with parameter β. Then the distribution of Y1=min{X1, …, Xn} will be an exponential distribution with parameter n β. Proof: Pr Y1 t Pr X 1 t , ..., X n t Pr X 1 t Pr X n t e t e t e n t Determine the interval of time Y2 between the failure of the first bulb and the failure of a second bulb. 28 Y2 will be equal to the smallest of (n-1) i.i.d. r.v., so Y2 has an exponential distribution with parameter (n-1) β. Y3 will have an exponential distribution with parameter (n-2) β. The final bulb has an exponential distribution with parameter β. Jia-Ying Chen Physical Meaning of Exponential Distribution 29 Following the physical meaning of gamma distribution, an exponential distribution is the time required to have for the 1st event to occur, i.e., Pr X t e t where β is rate of event. In a Poisson process, both the waiting time until an event occurs and the period of time between any two successive events will have exponential distributions. In a Poisson process, the waiting time until the nth occurrence with rate b has a gamma distribution with parameters n and b. Jia-Ying Chen Example 7 (5.9.10) 30 Suppose that an electronic system contains n similar components that function independently of each other and that are connected in series so that the system fails as soon as one of the components fails. Suppose also that the length of life of each component, measured in hours, has an exponential distribution with mean μ. Determine the mean and the variance of the length of time until the system fails. Jia-Ying Chen Solution 31 Jia-Ying Chen Example 8 (5.9.11) 32 Suppose that n items are being tested simultaneously, the items are independent, and the length of life of each item has an exponential distribution with parameter β. Determine the expected length of time until three items have failed. Hint: The required value is E(Y1+Y2+Y3) Jia-Ying Chen Solution 33 Jia-Ying Chen