Example_class_3_slides

Example_class_3_slides - Example class 3 STAT1301...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Example class 3 STAT1301 Probability and Statistics I Chan Chi Ho, Chan Tsz Hin & Shi Yun September 28, 2011 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Review Law of Total Probability 1 If 0 < P (B ) < 1, then P (A) = P (A | B )P (B ) + P (A | B c )P (B c ) for any A. 2 If B1 , B2 , ..., Bk are mutually exclusive and exhaustive events (i.e. a partition of the sample space), then for any event A, k P (A) = ∑ P (A | Bj )P (Bj ) j =1 where k can also be ∞. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Review 1 Bayes’ Theorem (Bayes’ rule, Bayes’ law) For any two event A and B with P (A) > 0 and P (B ) > 0, P (B | A) = P (A | B ) 2 P (B ) P (A) Bayes’ Theorem If B1 , B2 , ..., Bk are mutually exclusive and exhaustive events (i.e. a partition of the sample space), and A is any event with P (A) > 0,then for any Bj , P (Bj | A) = P (A | Bj )P (Bj ) P (Bj )P (A | Bj ) =k P (A) ∑i =1 P (Bi )P (A | Bi ) where k can also be ∞. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Review: Random Variables 1 Basics - Random variable is a measurable function between a Sample Space (Domain) and State Space (Range). - A function (with some requirement) X : Ω ω → X (ω ) ∈ X (Ω) defined on the sample space Ω = {ω }is called a random variable. 2 Distribution- Law of a Random Variable’s Dance There is a law governing how any random variable to be observed in its state space. The law is a probabilistic one, called the probability distribution of a random variable. There are two qualifications for any real-valued function f (x ) to be a probability density/mass function. (a) f (x ) > 0 for any x ∈ X (Ω) (b) x ∈X (Ω) f (x )dx = 1 or ∑x ∈X (Ω) f (x )dx = 1 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Review: Random Variables 1 Real valued random variables There are three groups of real-valued random variables: (a) Discrete random variables (its state space is a discrete subset in R) (b) Continuous random variables (its state space is a continuous subset in R) (c) Partially Discrete and Partially Continuous Random Variables The Distribution of a Discrete/Continuous Random Variable is called its Probability Mass/Density Function because of a superficial difference in mathematical treatments and graphical representation. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Review: Random Variables Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 1 A small plane have gone down, and the search is organized into three regions. Starting with the likeliest, they are: Region Initial Chance Plane is there Chance of Being Overlooked in the Mountains 0.5 0.3 Praire 0.3 0.2 Sea 0.2 0.9 The last column gives the chance that if the plane is there, it will not be found. For example, if it went down at sea, there is 90% chance it will have disappeared, or otherwise not be found. Since the pilot is not equipped to long survive a crash in the mountains, it is particularly important to determine the chance that the plane went down in the mountains. (a) Before any search is started, what is this chance in the mountains? (b) The initial search was in the mountains, and the plane was not found. Now what is the chance the plane is nevertheless in the mountains? (c) The search was continued over the other two regions, and unfortunately the plane was not found anywhere. Finally now what is the chance that the plane is in the mountains. (d) Describing how and why the chances changed from (a) to (b) to (c). Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 1 Let M, P, S be the events that the plan went down in the mountains, Prairie, sea respectively. Let OM, OP, OS be the events that the plane is not found in mountains, prairie, sea respectively. Then we have: P (M ) = 0.5 P (P ) = 0.3 P (S ) = 0.2 P (OM | M ) = 0.3 P (OP | M ) = P (OS | M ) = 1 P (OP | P ) = 0.2 P (OM | M ) = P (OS | M ) = 1 P (OS | S ) = 0.9 P (OM | S ) = P (OP | S ) = 1 (a) P (M ) = 0.5 (b) P (M |OM ) = = P (OM | M )P (M ) P (OM | M )P (M ) + P (OM | P )P (P ) + P (OM | S )P (S ) (0.3)(0.5) = 0.2308 (0.3)(0.5) + 0.3 + 0.2 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 1 (c) P (OM ∩ OP ∩ OS ) = P (OM ∩ OP ∩ OS |M )P (M ) + P (OM ∩ OP ∩ OS |P )P (P ) +P (OM ∩ OP ∩ OS |S )P (S ) = P (OM |M )P (M ) + P (OP |P )P (P ) + P (OM |S )P (S ) = (0.3)(0.5) + (0.2)(0.3) + (0.9)(0.2) = 0.39 P (M |OM ∩ OP ∩ OS ) = = P (OM ∩ OP ∩ OS |M )P (M ) P (M ∩ OM ∩ OP ∩ OS ) = P (OM ∩ OP ∩ OS ) P (OM ∩ OP ∩ OS ) (0.3)(0.5) P (OM |M )P (M ) = = 0.3846 P (OM ∩ OP ∩ OS ) (0.39) (d) Prior to any search, the probability is 0.5. After the initial search, the plane was not found in the mountains. Therefore given this information the probability decreased to 0.2308. However, after the continued search, the plane was also not found in other regions. Hence the probability increased to 0.3846 due to this additional information. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 2 Let S = {1, 2, ..., n}and suppose that A and B are, independently, equally likely to be any of the 2n subsets ( including the null set and S itself) of S. (a) Show that 3n P (A ⊂ B ) = 4 HINT: Let N(B) denote the number of elements in B. Use n P (A ⊂ B ) = ∑ P (A ⊂ B |N (B ) = i )P (N (B ) = i ) i =0 (b) Show that P (A ∩ B = φ ) = Chan Chi Ho, Chan Tsz Hin & Shi Yun 3 4 n Example class 3 Solution to Problem 2 Solution (a) Denote N(B) as the number of elements in B. Then P (A ⊂ B |N (B ) = i ) = P (N (B ) = i ) = 2i = 2i −n 2n Cin 2n Using Law of Total probability, n P (A ⊂ B ) = ∑ P (A ⊂ B |N (B ) = i )P (N (B ) = i ) i =0 n = Cn i ∑ 2i −n × 2n i =0 = 2−2n n ∑ (Cin × 2i ) (Binomial Theorem) i =0 = 3 2−2n (2 + 1)n = ( )n 4 n (b)P (A ∩ B = φ ) = P (A ⊂ B c ) = 3 4 probabilistic behavior. Chan Chi Ho, Chan Tsz Hin & Shi Yun (B and Example class 3 B c )have equivalent Problem 3(Monty Hall Problem) Suppose you are on a game show, and you are given the choice of three boxes. In one box is a key to a new BMW while empty in others. You pick a box A. Then the host, Monty Hall, who knows what are inside the boxes, opens another box, say box B, which is empty. He then says to you, "Do you want to abandon your box and pick box C?" Is it to your advantage to switch your choice? Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 3 Solution Let A,B,C be the event that the keys are in box A,B,C respectively. Let M be the event that Monty Hall opens box B. Then consider the three different cases: If the key is in box A, then both B and C are empty and Monty can randomly 1 open any one of them at his own choice, therefore P (M |A) = 2 . If the key is in box B, then Monty surely won’t open box B, therefore P (M |B ) = 0. If the key is in box C, then Monty can only open box B because surely he won’t open A or C, therefore P (M |C ) = 1. Using Bayes’ rule, (1/2)(1/3) P (M |A)P (A) P (A|M ) = P (M |A)P (A)+P (M |B )P (B )+P (M |C )P (C ) = (1/2)(1/3)+(0)(1/3)+(1)(1/3) = 1 3 Obviously, P (C |M ) = 1 − P (A|M ) = 1 − 1 = 2 33 Hence given the information that Monty Hall opened box B, the probability that the key is in box C is 2/3 which doubles the probability that the key is in box A. Therefore it’s a reasonable decision to trade box A for box C. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 4 Suppose that you are invited to play a game with the following rules: One of the numbers 2, . . . , 12 is chosen at random by throwing a pair of dice and adding the numbers shown. You win 9 dollars in case 2, 3, 11, or 12 comes out, or lose 10 dollars if the outcome is 7. Otherwise, you do not win or lose anything. This defines a function on the set of all possible outcomes {2, . . . , 12}, the value of the function being the corresponding gain (or loss if the value is negative). What is the probability that the function takes positive values, i.e„ that you will win some money? Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 4 As shown in the figure, the answer is Chan Chi Ho, Chan Tsz Hin & Shi Yun 6 36 = 1. 6 Example class 3 Problem 5 The amount of bread (in hundreds of kilos) that a bakery sells in a day is a random variable with density cx for 0 ≤ x < 3 f (x ) = c (6 − x ) for 3 ≤ x < 6 0 else (a) Find the value of c which makes f a probability density function. (b) What is the probability that the number of kilos of bread that will sold in a day is, (i) more than 300 kilos? (ii) between 150 and 450 kilos? (c) Denote by A and B the events in (i) and (ii), respectively. Are A and B independent events? Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 5 Solution (a) First, c must be ≥ 0 to make f (x ) ≥ 0. Second, c has to make +∞ −∞ f (x )dx = 1true. 3 1= 6 c (6 − x )dx + 0 = cxdx + 0 3 c c × 9 + × 9 = 9c , 2 2 1 9 (b) Since f is continuous at x=3, therefore Px (x > 3) = Px (x ≥ 3) + 6 1 (i) Px (x ≥ 3) = 3 ∞ f (x )dx = 3 c (6 − x )dx = 9 c = 2 2 4.5 3 4.5 (ii) Px (1.5 ≤ x ≤ 4.5) = 1.5 f (x )dx = 1.5 cxdx + 3 c (6 − x )dx = c 3 2 (9 − 2.25) × 2 = 4 c= Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 5 (c)A = {ω : X (ω ) ≥ 3} ⊂ Ω, P (A) = Px (X ≥ 3) = 1 2 3 B = {ω : 1.5 ≤ X (ω ) ≤ 4.5} ⊂ Ω, P (B ) = Px (1.5 ≤ x ≤ 4.5) = 4 A ∩ B = {ω : 3 ≤ X (ω ) ≤ 4.5} ⊂ Ω, P (A ∩ B ) = Px (3 ≤ x ≤ 4.5) = 4.5 3 3 c (6 − x )dx = 8 Now that P (A ∩ B ) = P (A)P (B ),they are independent. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 6 A random variable X is called discrete whenever there is a countable set C ⊂ R such that Px (C ) = 1. A random variable X is said to have the binomial distribution B (n, p ), where n = 1, 2, ...and p ∈ [0, 1], if n Px ({k }) = Ck p k (1 − p )n−k for k= 0,1,2,...,n. Verify that such a random variable is discrete. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 6 Solution Be aware of the following identity from the elementary algebra: n n n n n (a + b )n = C0 an b 0 + C1 an−1 b 1 + C2 an−2 b 2 + ... + Cn−1 a1 b n−1 + Cn a0 b n Substitute a and b by 1-p and p respectively will give n 1= n ∑ Ck pk (1 − p)n−k k =0 This means there exists a countable set {0, 1, ..., n) ⊂ Rsuch that Px ({0, 1, ..., n}) = 1. Therefore X is a discrete random variable. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 7 A number is randomly chosen from the interval (0,1). What is the probability that: (a) its first decimal digit will be a 1; (b) its second decimal digit will be a 5; (c) the first decimal digit of its square root will be a 3? Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 7 Solution First, some clarification. A “number” here means a point of on the axis of real numbers. The usual representation of such a point is called the “decimal expansion” of the number, using digits 0~9. For example, the mid-point of the interval (0,1) has decimal expansion 0.500... , or equivalently,0.499.. . (a) Since the manner of drawing a point is random, each of the possible first 1 decimal digits will be equiprobable, making 10 as the answer. (b) An unconscious reasoning to this part will be “there is no difference between a) and b) except for the superficial difference in positions of the 1 digits”, leading to the same 10 as the answer. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 7 A more analytical way of thinking about the two questions is to consider two random variables: r1 : (0, 1) ω →first decimal digit of ω ∈ {0, 1, 2, ..., 9}and r2 : (0, 1) ω →second decimal digit of ω ∈ {0, 1, 2, ..., 9} to be the (deterministic) mechanisms that tell you the first and second decimal digits, respectively, of the number (randomly) drawn. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 7 From the graphs, it is clear the answers derived from our previous unconscious reasoning are correct. Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 7 (c) Define the random variables √ X : (0, 1) ω →first digit of ω ∈ {0, 1, 2..., 9}. Px (x = 3) = P (ω : X (ω ) = 3) = P ({0.09 ≤ ω < 0.16}) = 0.07 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 8 Find an example of two different random variables X and X’ with the same distribution Px = Px ,- Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Solution to Problem 8 Solution To consider tossing a fair coin with sample space {H,T }. R.V. X is defined as: ω HT X (ω ) 1 0 X (ω ) 0 1 1 1 Px (·) 2 2 1 1 Px (·) 2 2 Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 Problem 9 (a)A project will bring $1M profit if completed. If the probability of completion is 80%, what is the expected profit? (b) For every set of real numbers, we define the indicator function by IA = 1 0 if if x ∈ A, x ∈ A. / Show that Px (A) = E [IA (X )] = Chan Chi Ho, Chan Tsz Hin & Shi Yun A dFx (x ) Example class 3 Solution to Problem 9 Solution (a) $0.8M. (b) E [IA (X )] = 1 · P {IA (X ) = 1} + 0 · P {IA (X ) = 0} = P {IA (X ) = 1} = Px (A) = A dFx (x ) Chan Chi Ho, Chan Tsz Hin & Shi Yun Example class 3 ...
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.

Ask a homework question - tutors are online