Presentation on theme: "Statistics and Data Analysis"— Presentation transcript:
1Statistics and Data Analysis Part 3 – Probability
2Counting Rule for Probabilities 9/52Counting Rule for ProbabilitiesProbabilities for compounds of atomistic equally likely events are obtained by counting.P(Compound Event) =
310/52Compound EventsE = A Random consumer’s random choice of exactly one productEvent(fruit) = Event(berry #3) + Event(fruity #6) + Event(apple #8)P(Fruity) = P(#3) + P(#6) + P(#8) = 1/8 + 1/8 + 1/8 = 3/8P(Sweetened) = P(HoneyNut #2) + P(Frosted #7) = 1/8 + 1/8 = 1/4
4Appplications: Games of Chance; Poker 20/52Appplications: Games of Chance; PokerIn a 5 card hand from a deck of 52, there are 52*51*50*49*48)/(5*4*3*2*1) different possible hands. (Order doesn’t matter). 2,598,960 possible hands.How many of these hands have 4 aces? 48 = the 4 aces plus any of the remaining 48 cards.
622/52The Dead Man’s HandThe dead man’s hand is 5 cards, 2 aces, 2 8’s and some other 5th card (Wild Bill Hickok was holding this hand when he was shot in the back and killed in 1876.) The number of hands with two aces and two 8’s is = 1,584The rest of the story claims that Hickok held all black cards (the bullets). The probability for this hand falls to only 44/ (The four cards in the picture and one of the remaining 44.)Some claims have been made about the 5th card, but noone is sure – there is no record.
7Counting the Dead Man’s Cards 23/52Counting the Dead Man’s CardsThe Aces 6: There are 6 possible pairs out of [A♠ A♣ A♥ A♦](♠ ♣) (♠♥) (♠♦) (♣♥) (♣♦) (♥♦)The 8’s: There are also 6 possible pairs out of [8♠ 8♣ 8♥ 8♦]There are 44 remaining cards in the deck that are not aces and not 8’s.The total number of possible different hands is therefore 6(6)(44) = 1,584. If he held the bullets (black cards), then there are only (1)(1)(44) = 44 combinations. There is a claim that the 5th card was a diamond. This reduces the number of possible combinations to (1)(1)(11).
8Poker Hands Royal Flush – Top 5 cards in a suit 24/52Poker HandsRoyal Flush – Top 5 cards in a suit4 of a kind – plus any other cardStraight Flush – 5 sequential cards in the same suit suitFull House – 3 of one kind, 2 of another. (Also called a “boat.”)
9More Poker Hands Flush – 5 cards in a suit, not sequential 25/52More Poker HandsFlush – 5 cards in a suit, not sequential3 of a kind plus two other cardsStraight – 5 cards in a numerical row, not the same suitTwo pairs plus one other card
10Still More Poker Hands 1 pair plus 3 other cards 26/52Still More Poker Hands1 pair plus 3 other cardsHigh card: 5 cards, no pairs, mixed suits
11Probabilities of 5 Card Poker Hands 27/52Probabilities of 5 Card Poker HandsPoker Hand Different Combinations Probability Odds Against Royal Straight Flush 4 ,729:1 Other Straight Flush 36 ,193:1Straight Flush (Royal or other) ,973:1Four of a kind 624 ,164:1 Full House 3,744 :1 Flush 5,108 :1 Straight 10,200 :1 Three of a kind 54,912 :1 Two Pairs 123,552 :1 One Pair 1,098,240 :1 High card only (None of above) 1,302,540 :1 Total 2,598,960
13Odds vs. 5 Card Poker Hands 29/52Odds vs. 5 Card Poker HandsPoker Hand Combinations Probability Odds Against Royal Straight Flush 4 ,729:1 Other Straight Flush 36 ,193:1Straight Flush (Royal or other) ,973:1Four of a kind 624 ,164:1 Full House 3,744 :1 Flush 5,108 :1 Straight 10,200 :1 Three of a kind 54,912 :1 Two Pairs 123,552 :1 One Pair 1,098,240 :1 High card only (None of above) 1,302,540 :1 Total 2,598,960
14Joint Events Pairs (or groups) of events: A and B 30/52Joint EventsPairs (or groups) of events: A and BOne or the other occurs: A or B ≡ A BBoth events occur A and B ≡ A BIndependent events: Occurrence of A does not affect the probability of BAn addition rule: P(A B) = P(A)+P(B)-P(A B)The product rule for independent events:P(A B) = P(A)P(B)
15Joint Events: Pick a Card, Any Card 31/52Joint Events: Pick a Card, Any CardEvent A = Diamond: P(Diamond) = 13/522♦ 3♦ 4♦ 5♦ 6♦ 7♦ 8♦ 9♦ 10♦ J♦ Q♦ K♦ A♦Event B = Ace: P(Ace) = 4/52 A♦ A♥ A♣ A♠Event A or B = Diamond or Ace P(Diamond or Ace) = P(Diamond) + P(Ace) – P(Diamond Ace) = 13/52 + 4/52 – 1/52 = 16/52
1632/52ApplicationSurvey of German Individuals over 5 years Frequency in black, sample proportion in red. E.g., =1144/27326, =14243/27326FemaleMaleTotalUninsured1144.041861979.072423123.11429Insured11939.4369112264.4488024203.8857113083.4787714243.5212327326
17The Addition Rule - Application 33/52The Addition Rule - ApplicationSurvey of German Individuals over 5 yearsFemaleMaleTotalUninsured1144.041861979.072423123.11429Insured11939.4369112264.4488024203.8857113083.4787714243.5212327326An individual is drawn randomly from the sample of 27,326 observations.P(Female or Insured) = P(Female) + P(Insured) – P(Female and Insured)= =
18Product Rule for Independent Events 34/52Product Rule for Independent EventsIf two events A and B are independent, the probability that both occur is P(A B) = P(A)P(B)Example: I will fly to Washington (and back) for a meeting on Monday. I will use the train on Tuesday P(Late if I fly) = P(Late if I take the train)=.2. Late or on time for the two days are independent.What is the probability that I will miss at least one meeting?P(Late Monday, Not late on Tuesday) = .6(.8) = .48P(Not late Monday, Late Tuesday) = .4(.2) = .08P(Late Monday and Late Tuesday) = .6(.2) = .12P(Late at least once) = = .68
19Joint Events and Joint Probabilities 35/52Joint Events and Joint ProbabilitiesMarginal probability = Probability for each event, without considering the other.Joint probability = Probability that two (several) events happen at the same time
20Marginal and Joint Probabilities 36/52Marginal and Joint ProbabilitiesSurvey of German Individuals over 5 years Consider drawing an individual at random from the sample.FemaleMaleTotalUninsured1144.041861979.072423123.11429Insured11939.4369112264.4488024203.8857113083.4787714243.5212327326Marginal Probabilities; P(Male)=.52123, P(Insured) =Joint Probabilities; P(Male and Insured) =
21Conditional Probability 37/52Conditional Probability“Conditional event” = occurrence of an event given that some other event has occurred.Conditional probability = Probability of an event given that some other event is certain to occur. Denoted P(A|B) = Probability of A will occur given B occurred.Prob(A|B) = Prob(A and B) / Prob(B)
22Conditional Probabilities 38/52Conditional ProbabilitiesCompany ESI sells two types of software, Basic and Advanced, to two markets, Government and Academic. Sales occur with the following probabilities:Academic Government TotalBasicAdvancedTotalP(Basic | Academic) = .4 / .7 = .571P(Government | Advanced) = .1 / .4 = .25
23Conditional Probabilities 39/52Conditional ProbabilitiesP(Uninsured|Female)=P(Uninsured and Female)/P(Female)=.04186/.47877=.08743P(Male|Insured)=P(Male and Insured)/P(Insured)= /.88571=.50671An individual is drawn randomly from the sample of 27,326 individuals in the German socioeconomic panel.
24The Product Rule for Conditional Probabilities 40/52The Product Rule for Conditional ProbabilitiesFor events A and B, P(A B)=P(A|B)P(B)Example: You draw a card from a well shuffled deck of cards, then a second one. What is the probability that the two cards will be a pair?There are 13 cards. Let A1 be the card on the first draw and A2 be the second one. Then, P(A1 A2) = P(A1)P(A2|A1).For a pair of kings, P(K1) = 1/13. P(K2|K1) = 3/51.P(K1 K2) = (1/13)(3/51). There are 13 possible pairs, so P(Pair) = 13(1/13)(3/51) = 1/17.
2541/52Independent EventsEvents are independent if the occurrence of one does not affect probabilities related to the other.Events A and B are independent if P(A|B) = P(A). I.e., conditioning on B does not affect the probability of A.
26Independent Events? Pick a Card, Any Card 42/52Independent Events? Pick a Card, Any CardP(Red card drawn) = 26/52 = 1/2P(Ace drawn) = 4/ = 1/13.P(Ace|Red) = (2/52) / (26/52) = 1/13P(Ace) = P(Ace|Red) so “Red Card” and “Ace” are independent.
2743/52Independent Events?Company ESI sells two types of software, Basic and Advanced, to two markets, Government and Academic. Sales occur randomly with the following probabilities:Academic Government TotalBasicAdvancedTotalP(Basic | Academic) = .4 / .7 = not equal to P(Basic)=.6P(Government | Advanced) = .1 / .4 = not equal to P(Govt) =.3
2945/52Litigation RiskIf we decide to LITIGATE, the probability we will PREVAIL and FIND ASSET isP(Prevail,Find Asset) = P(Find Asset|Prevail) P(Prevail) = .5 * .5 = .25.
30Litigation Risk Analysis: Using Probabilities to Determine a Strategy 46/52Litigation Risk Analysis: Using Probabilities to Determine a StrategyTwo paths to a favorable outcome. Probability = (upper) .7(.6)(.4) + (lower) .5(.3)(.6) = = .258.How can I use this to decide whether to litigate or not?
3248/52Using Bayes TheoremIf I choose a cookie from Bowl #1, the probability it is chocolate chip is P(CC|#1) = P(CC and #1)/P(#1) = / .5 = = 1/4If you give me a chocolate chip cookie, what is the probability it came from Bowl #1? P(#1|CC) = P(CC|#1)P(#1)/P(CC) = (1/4)(1/2)/(3/8) = 1/3Example from
3349/52Drug TestingDataP(Test correctly indicates disease)=.98 (Sensitivity)P(Test correctly indicates absence)=.95 (Specificity)P(Disease) = (Fairly rare)Notation+ = test indicates disease, – = indicates no diseaseD = presence of disease, N = absence of diseaseData:P(D) = (Incidence of the disease)P(+|D) = (Correct detection of the disease)P(–|N) = (Correct failure to detect the disease)What are P(D|+) and P(N|–)? Note, P(D|+) = the probability that a patient actually has the disease when the test says they do.
3450/52More InformationDeduce: Since P(+|D)=.98, we know P(–|D)=.02 because P(-|D)+P(+|D)=1[P(–|D) is the P(False negative).Deduce: Since P(–|N)=.95, we know P(+|N)=.05 because P(-|N)+P(+|N)=1[P(+|N) is the P(False positive).Deduce: Since P(D)=.005, P(N)=.995 because P(D)+P(N)=1.
36Summary Randomness and decision making Probability 52/52SummaryRandomness and decision makingProbabilitySourcesBasic mathematics (the axioms)Simple and compound events and constructing probabilitiesJoint eventsIndependenceAddition and product rules for probabilitiesConditional probabilities and Bayes theorem