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
The Most Interesting Statistics From 2014 | RealClearMarkets On average, children run a mile 90 seconds slower than their counterparts 30 years ago. Nine percent of Americans carry no cash, and half carry $20 or less. The average teen processes 3,700 texts per month. …. The Statisticians Objectives 1. 2. 3. 4. Ask the right questions Collect useful data Summarize the data Make decisions and generalizations based on the data 5. Turn the data and decisions into new knowledge The Frame Population u Sample Sampling u u u u u u u u u u u u u Describe Inference Probability Probability 1. What is the probability that a flipped coin comes up heads? 2. What is the probability of a randomly selected card being a king? 3. What is the chance of rolling a 3 or 4 on a die? Random Experiments Outcomes (minimal results) Events (A, B, C…) Sample Space (S) E1: Flip a coin once – Outcomes: T or H – Events: • A={T} • B={H} • C={H or T} – S = {T,H} E2: Flip two coins - Outcomes: (H,H) or (H,T) or (T,H) or (T,T). - Events: - A: {One H, one T} = {(H,T), (T,H)} - B: {at least one H} = {(H,T),(T,H), (H,H)} - S = {(T,T); (T,H);(H,T); (H,H) } E3: Cast two dice Outcomes: (1,1) or (1,2) or … (6,6) Events: A = {(3,4)} B ={The sum is greater than 7} C=… S = {(1,1);(1,2); … ; (6,6)} Probability: classical definition • All outcomes are equally likely P(A) = # outcomes in A Total # outcomes You can think of the classical definition of probability as a proportion E4. Draw a card A deck of 52 cards: S={all possible draws} # outcomes in S = 52 P(a King) = 4/52 = 1/13 P(a Heart) = 13/52 = ¼ P(king of Hearts)= 1/52 Flip a Coin Three Times • Outcomes HHH HHT HTH HTT THH THT TTH TTT 1. P(HHH) = 1/8 = 0.125 2. P(Two Heads) = 3/8 = 0.375 3. P(At least 2 Heads) = 4/8 = ½ = 0.5 Roll Two Dice • Outcomes: (1,1) (1,2) (1,3) (1,4) (1,5) (1,6) (2,1) (2,2) (2,3) (2,4) (2,5) (2,6) (3,1) (3,2) (3,3) (3,4) (3,5) (3,6) (4,1) (4,2) (4,3) (4,4) (4,5) (4,6) (5,1) (5,2) (5,3) (5,4) (5,5) (5,6) (6,1) (6,2) (6,3) (6,4) (6,5) (6,6) P(Sum =2) = 1/36 = 0.0278 P(Sum=9) = 4/36 = 1/9 = 0.111 P(Sum=7) = 6/36 = 1/6 = 0.167 Simple Random Sample • 1000 people in population, – 250 prefer red to green – 300 prefer green to red – The rest don’t care • Random person – P(prefers green to red) = 300/1000 = 30% – P(don’t care) = 450/100 = 0.45 Probability Properties • 0 ≤ P(A) ≤ 1 • P(A) = 0 → A is impossible • P(S) = 1 Probability: a general definition Size of the Event A P(A) = Size of the Sample Space S Venn diagrams A S 𝐴𝑟𝑒𝑎 𝑜𝑓 𝐴 𝑃 𝐴 = 𝐴𝑟𝑒𝑎 𝑜𝑓 𝑆 Unequal Outcomes • • • • Assign a probability to each outcome. All probabilities ≥ 0. P(A) = sum P of each outcome in A All probabilities sum to 1. – P(S) = 1 • All probabilities ≤ 1. Choose a Mascot Oscar Kermit Elmo Grover P 0.1 0.3 0.2 0.4 •P(Kermit or Elmo) = 0.3 + 0.2 = 0.5 •P(Oscar or Kermit or Elmo) = 0.1 + 0.3 + 0.2 = 0.6 •P(Grover) = 0.4 OR Rule • If A and B can’t both happen: P(A OR B) = P(A)+P(B) • A and B are said to be Mutually Exclusive Mutually Exclusive A B S Mutually Exclusive AÅB= A and B cannot both happen Examples: A=“Draw a King” A=“Roll a 3” B = “Draw a Queen” B = “Roll an even number” E2: Flip two coins - A: {One H, one T} - P(A) = P[(H,T) OR (T,H)}] =1/4+1/4= 1/2 - B: {at least one H} - P(B) = P[(H,T) OR (T,H) OR (H,H)} = 3/4 Complements • Complement of A All outcomes not in A c A c • P(A ) = 1 – P(A) • P(Drawing a card other than an Ace) =1 – 1/13 = 12/13 E2: Flip two coins - B: {at least one H} - P(B) = P[(H,T) OR (T,H) OR (H,H)} = 3/4 Or we could use the complement: - BC = {no H} - P(BC) = P(T,T) = ¼ → P(B) = 1- P(BC) = 1-1/4=3/4 AND Rule • If A and B are Independent P(A AND B) = P(A)P(B) • Independent • if A occurs, No affect on if B occurs • Examples H and then H 6 and then 2 A and B A AÅB B Successive Events • P(Heads and then Tails) = • P(Roll ) = • P(Roll 1 and then an even number) = Probability Rules • Not ) 1 - Probability • OR & Mutually Exclusive ) Add • AND & Independence ) Multiply OR Rule • Mutually Exclusive –Events contain no common outcomes –Intersection is empty –They can’t both happen • For mutually exclusive events A,B P(A or B) = P(A) + P(B) Mutually Exclusive • Outcomes are mutually Exclusive –Cast a die: only one number can happen –Flip a coin: only one face shows up • Mutually Exclusive events are NOT independent –If A and B are mutually exclusive they cannot both happen → P(A AND B) = 0 2. OR Rule • Roll 2 dice, P(Sum is 7 or 9) = 1/6 + 1/9 = 5/18 • Flip three coins P(1 H or 3 H) = 3/8 + 1/8 = ½ • Draw a card P(K or Q) = 1/13 + 1/13 = 2/13 P(Diamond or Heart) = ¼ + ¼ = 1/2 P(K or Diamond) = ???? General OR Rule • For any events A, B P(A or B) = P(A) + P(B) – P(A and B) A OR B A AÅB B S P(King or Heart) • P(King) = 4/52 = 1/13 • P(Heart) = 13/52 = ¼ • P(King and Heart) = P(King of Hearts) = 1/52 • P(King or Heart) = = P(King) + P(Heart) – P(King and Heart) =4/52 + 13/52 – 1/52 = 16/52 = 4/13 Example P(A) = 1/3 , P(B)= ¼ and P(A and B) =1/6 A Compute P(Ac or B) B S P(Ac or B)? • Use general OR rule –P(Ac or B) = P(Ac) + P(B) – P(Ac and B) • Note that – P(Ac)= 1- P(A) = 1-1/3 = 2/3 – P(B) = ¼ Not independent – P(Ac and B)? AC A S P(B) = P(Ac and B) + P( A and B) Since they are mutually exclusive S AC and B A Then P(Ac and B) = P(B) – P(A and B) Finally – P(Ac)= 1- P(A) = 1-1/3 = 2/3 – P(B) = ¼ – P(Ac and B) = P(B)-P(A and B) = ¼ - 1/6 = 1/12 • From which P(Ac or B)= 2/3 + ¼ -1/12 = 5/6