Probability: Week 4 Kwonsang Lee University of Pennsylvania kwonlee@wharton.upenn.edu February 13, 2015 Kwonsang Lee STAT111 February 13, 2015 1 / 21
Probability Sample space S: the set of all possible outcomes Event A: an outcome or a set of outcomes of a random process. For example, we can consider to toss a fair coin twice Sample space S: {HH, HT, TH, TT} Event A = getting at least one head: {HH, HT, TH} Pr(A) = 3/4 Note: Do you know how to solve at least one problem? Kwonsang Lee STAT111 February 13, 2015 2 / 21
Disjoint events Events A and B are called disjoint if they never occur together. For example, a fair die is rolled once. The event A is getting a odd number and the event B is getting an even number. Sample space S: {1, 2, 3, 4, 5, 6} Event A: {1, 3, 5} Event B: {2, 4, 6} No intersection A and B Addition Rule for disjoint events: If A and B are disjoint, then Pr(A or B) = Pr(A) + Pr(B) Kwonsang Lee STAT111 February 13, 2015 3 / 21
Independent events Events A and B are independent if knowing that one occurs does not change the probability that the other occurs. For example, rolling a fair die twice Event A: getting a even number at first rolling Event B: getting a even number at second rolling A and B are independent. Multiplication Rule for independent events: If A and B are independent, then Pr(A and B) = Pr(A) Pr(B) Kwonsang Lee STAT111 February 13, 2015 4 / 21
Independent events (optional) More precisely, A and B are independent Pr(A and B) = Pr(A) Pr(B) Sometimes, independence is not trivial Example: Rolling a fair die once. Sample space S: {1, 2, 3, 4, 5, 6} Event A = getting a even number: {2, 4, 6}, Pr(A) = 3/6 = 1/2 Event B = getting a multiple of three: {3, 6}, Pr(B) = 2/6 = 1/3 A and B: {6}, Pr(A and B) = 1/6 Therefore, A and B are independent. Pr(A and B) = Pr(A) Pr(B) = 1/6!! Kwonsang Lee STAT111 February 13, 2015 5 / 21
Conditional Probability The conditional probability that event B occurs given that event A has occurred is Pr(A and B) Pr(B A) =. Pr(A) If A and B are independent, Pr(B A) = Pr(A and B) Pr(A) = Pr(A) Pr(B) Pr(A) = Pr(B). Event A has no effect on event B. Kwonsang Lee STAT111 February 13, 2015 6 / 21
Random Variables A random variable is a numerical outcome of a random process or random event. For example, X: outcome when rolling a die - X can be one of {1, 2, 3, 4, 5, 6} X: height of a randomly chosen person in the class - X can be any number between 0 and hypothetically The first random variable is discrete and the second one is continuous. Kwonsang Lee STAT111 February 13, 2015 7 / 21
Random Variables (RV) If we observe a value of X once, say x 1, then x 1 is no longer a random variable. This is because there is no randomness here. From the previous examples, if we already rolled a die and face 6 is observed, then we just know the outcome with no uncertainty. Also, if we know which person is chosen in the second example, then the height of the chosen person is not a random variable. HOWEVER, we can use observations to know more about random variables. Kwonsang Lee STAT111 February 13, 2015 8 / 21
Random Variables (RV) Let s say that we have n observations x 1, x 2,..., x n. We can get some information of a random variable X from the observation such as mean, standard deviation and even distribution. In the first example, rolling a die, we have 100 observations and all are 6. Then we might think that the die is not fair. Furthermore, we might think that Pr(X = 6) = 1 and Pr(X = other values) = 0. We will talk about details of this later. (How to make inferences from observations) Kwonsang Lee STAT111 February 13, 2015 9 / 21
Mean and Spread 1 Mean of a random variable µ = mean of random variable x = mean of observations (data) 2 Spread of a random variable σ = standard deviation of random variable s = standard deviation of observations Review: x = x 1 + + x n n = n i=1 x i, s = n n i=1 (x i x) 2 n 1 Kwonsang Lee STAT111 February 13, 2015 10 / 21
How to calculate µ and σ? If we assume that we know the distribution of X, then we can calculate µ and σ. µ = X i P(X i ), σ = (X i µ) 2 P(X i ) i i where X i are all possible outcomes of X. Kwonsang Lee STAT111 February 13, 2015 11 / 21
How to calculate µ and σ? (continued) Example: X is the number of head when tossing a coin twice. S = { HH, HT, TH, TT} Possible values for X = { 0, 1, 2} X 1 = 0 with Pr(X 1 ) = 1/4, X 2 = 1 with Pr(X 2 ) = 2/4 and X 3 = 2 with Pr(X 3 ) = 1/4 µ = i X ip(x i ) = (0 1/4) + (1 2/4) + (2 1/4) = 1 σ = (X i µ) 2 P(X i ) = i ((0 1) 2 1/4) + ((1 1) 2 2/4) + ((2 1) 2 1/4) = 2/4 = 2/2 Kwonsang Lee STAT111 February 13, 2015 / 21
Some Useful Properties of RV If there is a new random variable Y is given as Y = a + bx, then mean(y) = a + b mean(x) or µ Y = a + bµ X SD(Y) = b SD(X) or σ Y = b σ X SD(Y) 2 = b 2 SD(X) 2 If there is a new random variable Z is given as Z = a + bx + cy, then mean(z) = a + b mean(x) +c mean(y) SD(Z) = b 2 SD(X) 2 + c 2 SD(Y) 2 SD(Z) 2 = b 2 SD(X) 2 + c 2 SD(Y) 2 Kwonsang Lee STAT111 February 13, 2015 13 / 21
The Normal Distribution If a random variable X has the normal distribution with mean µ and standard deviation σ, then we denote it by The density function is defined as X N(µ, σ). p(x = x) = p(x) = 1 e (x µ)2 2σ 2 2πσ If µ = 0 and σ = 1, then N(0, 1) is the standard normal distribution. Kwonsang Lee STAT111 February 13, 2015 14 / 21
Useful facts from google. http://blog.kanbanize.com/normal-gaussian-distribution-over-cycle-time/ Kwonsang Lee STAT111 February 13, 2015 15 / 21
Standardization The idea of standardization is simple X N(µ, σ) Z = X µ σ N(0, 1) From the previous diagram, Pr( 1 < Z < 1) 0.68 Pr( 2 < Z < 2) 0.95 Pr( 3 < Z < 3) 0.997 We can do more! Pr(Z > 0) = 0.5,... Kwonsang Lee STAT111 February 13, 2015 16 / 21
Question 1 Two balanced dice are tossed. Let event A be that the first die has a number less than 3 and let event B be that second die has a number larger than 3. a. What is Pr(A)? Pr(A) = 2/6 = 1/3 b. What is Pr(B)? Pr(B) = 3/6 = 1/2 c. Are A and B disjoint events? No. A and B have the intersection. d. Are A and B independent events? Yes. Pr(A and B) = Pr(A) Pr(B) Kwonsang Lee STAT111 February 13, 2015 17 / 21
Question 2 We will now roll a standard die and a nonstandard die. The second die has three faces with 0 and three faces with 2. Let X equal the sum of the two face numbers. a. What are the possible values of X? {1, 2, 3, 4, 5, 6, 7, 8} b. List the probability distribution of X. X 1 2 3 4 5 6 7 8 Pr(X ) 1 1 2 2 2 2 1 1 Kwonsang Lee STAT111 February 13, 2015 18 / 21
Question 2 c. What is the mean of the variable X? µ = X i Pr(X i ) 1 = 1 + 2 1 + 3 2 + 4 2 + 5 2 + 6 2 + 7 1 + 8 1 = 54 = 9 2 Kwonsang Lee STAT111 February 13, 2015 19 / 21
Question 2 d. What is the standard deviation of the variable X? σ 2 = (X i µ) 2 Pr(X i ) = (1 9 1 2 )2 + (2 9 1 2 )2 + (3 9 2 2 )2 + (4 9 2 2 )2 + (5 9 2 2 )2 + (6 9 2 2 )2 + (7 9 1 2 )2 + (8 9 1 2 )2 49 + 25 + 18 + 2 + 2 + 18 + 25 + 49 1 = 4 = 47 Therefore, σ = 47 Kwonsang Lee STAT111 February 13, 2015 20 / 21
Question 3 Math SAT scores for males have a mean of approximately 6 and a standard deviation of approximately 84. Assume these scores are normally distributed. Use this information and the table of normal probabilities to answer the following questions: a. What percent of students would score above 692? Z = 692 6 84 = 0.95. Pr(Z > 0.95) 1 0.8289 = 0.1711 = 17.11% b. What SAT score would a male student need in order to be in the top 20 percent? We want to find x to satisfy P(X < x) = 0.8. This is equivalent to find K such that Pr(Z = X µ σ < K = x µ σ ) = 0.8, K 0.84 and needed SAT score is x = µ + σ K = 6 + 84 0.84 683 http://www.stat.ufl.edu/~athienit/tables/ztable.pdf Kwonsang Lee STAT111 February 13, 2015 21 / 21