Docsity

Understanding Probability Rules: 'Or', Conditional, 'And', and Independence, Study notes of Statistics

Toggle sidebar
bg1
(C) 2007 Nancy Pfenning
Elementary Statistics: Looking at the Big Picture 1
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture
Lecture 14
Finding Probabilities:
More General Rules
General “Or” Rule
Conditional Probability; General “And” Rule
Two Types of Error
Independence
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14.2
Looking Back: Review
4 Stages of Statistics
Data Production (discussed in Lectures 1-4)
Displaying and Summarizing (Lectures 5-12)
Probability
Finding Probabilities
Random Variables
Sampling Distributions
Statistical Inference
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14.3
Basic Probability Rules (Review)
Non-Overlapping “Or” Rule: For any two
non-overlapping events A and B,
P(A or B)=P(A)+P(B).
Independent “And” Rule: For any two
independent events A and B,
P(A and B)=P(A)×P(B).
(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14.4
More General Probability Rules
Need “Or” Rule that applies even if events
overlap.
Need “And” Rule that applies even if
events are dependent.
Consult two-way table to consider
combinations of events when more than
one variable is involved.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Understanding Probability Rules: 'Or', Conditional, 'And', and Independence and more Study notes Statistics in PDF only on Docsity!

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture

Lecture 14

Finding Probabilities:

More General Rules

General “Or” Rule Conditional Probability; General “And” Rule Two Types of Error Independence (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 2

Looking Back: Review

4 Stages of Statistics  Data Production (discussed in Lectures 1-4)  Displaying and Summarizing (Lectures 5-12)  Probability  Finding Probabilities  Random Variables  Sampling Distributions  Statistical Inference (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 3

Basic Probability Rules ( Review)

Non-Overlapping “Or” Rule: For any two non-overlapping events A and B, P(A or B)=P(A)+P(B). Independent “And” Rule: For any two independent events A and B, P(A and B)=P(A)×P(B). (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 4

More General Probability Rules

 Need “Or” Rule that applies even if events overlap.  Need “And” Rule that applies even if events are dependent.  Consult two-way table to consider combinations of events when more than one variable is involved.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 5 Example: Parts of Table Showing “Or” and “And”Background : Professor notes gender (female or male) and grade (A or not A) for students in class.  Questions: What part of a two-way table shows…  Students who are female and get an A?  Students who are female or get an A? Total 0.25 0.75 1. Male 0.10 0.30 0. Female 0.15 0.45 0. A not A Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 7 Example: Parts of Table Showing “Or” and “And”Background : Professor notes gender (female or male) and grade (A or not A) for students in class.  Responses:  Students who are female and get an A: table on ____  Students who are female or get an A: table on _____ Total Male Female 0. A not A Total Total Male 0. Female 0.15 0. A not A Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 8

Example: Intuiting General “Or” Rule

Background : Professor reports: probability of getting an A is 0.25; probability of being female is 0.60. Probability of both is 0.15.  Question: What is the probability of being a female or getting an A? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 10

Example: Intuiting General “Or” Rule

Background : Professor reports: probability of getting an A is 0.25; probability of being female is 0.60. Probability of both is 0.15.  Response:

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 16

Basic Probability Rules ( Review)

Non-Overlapping “Or” Rule: For any two non-overlapping events A and B, P(A or B)=P(A)+P(B). Independent “And” Rule: For any two independent events A and B, P(A and B)=P(A)×P(B). (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 18 Example: When Probabilities Can’t Simply be Multiplied (Review)Background : In a child’s pocket are 2 quarters and 2 nickels. He randomly picks a coin, does not replace it, and picks another.  Response: To find the probability of the first and the second coin being quarters, we can’t multiply 0. by 0.5 because after the first coin has been removed, the probability of the second coin being a quarter is not 0.5: it is 1/3 if the first coin was a quarter, 2/3 if the first was a nickel. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 19 Example: When Probabilities Can’t Simply be Multiplied (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 20

Definition and Notation

Conditional Probability of a second event, given a first event, is the probability of the second event occurring, assuming that the first event has occurred. P(B given A) denotes the conditional probability of event B occurring, given that event A has occurred. Looking Ahead: Conditional probabilities help us handle dependent events.

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 21

Example: Intuiting the General “And” Rule

Background : In a child’s pocket are 2 quarters and 2 nickels. He randomly picks a coin, does not replace it, and picks another.  Question: What is the probability that the first and the second coin are quarters? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 23

Example: Intuiting the General “And” Rule

Background : In a child’s pocket are 2 quarters and 2 nickels. He randomly picks a coin, does not replace it, and picks another.  Response: probability of first a quarter (2/4), times (conditional) probability that second is a quarter, given first was a quarter (1/3): (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 24

Example: Intuiting the General “And” Rule

Response: Illustration of probability of getting two quarters: (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 25 Example: Intuiting General “And” Rule with Two-Way TableBackground : Surveyed students classified by sex and whether or not they have ears pierced.  Question: What are the following probabilities?  P(M) [being male]  P(E given M) [having ears pierced, given male]  P(M and E) [being male and having ears pierced]

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 36 Example: Applying General “And” RuleBackground : Studies suggest lie detector tests are “well below perfection”, 80% of the time concluding someone is a spy when he/she actually is, 16% of the time concluding someone is a spy when he/she isn’t. We’ll assume 10 of 10,000 govt. employees are spies. Note: P(D given S)=0.8, P(D given not S)=0.16, P(S)=0.001, P(not S)=0.Response:  being a spy and being detected as one:  not being a spy and “detected” as one:  Overall probability (“Or” Rule): (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 37 Example: “Or” Probability as Weighted Average of Conditional ProbabilitiesBackground : Studies suggest lie detector tests are “well below perfection”, 80% of the time concluding someone is a spy when he/she actually is, 16% of the time concluding someone is a spy when he/she isn’t. We’ll assume 10 of 10,000 govt. employees are spies.  Question: Should we expect the overall probability of being “detected” as a spy, P(D), to be closer to P(D given S)=0.80 or to P(D given not S)=0.16? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 39 Example: “Or” Probability as Weighted Average of Conditional ProbabilitiesBackground : Studies suggest lie detector tests are “well below perfection”, 80% of the time concluding someone is a spy when he/she actually is, 16% of the time concluding someone is a spy when he/she isn’t. We’ll assume 10 of 10,000 govt. employees are spies.  Response: Vast majority are not spiesexpect P(D) closer to ________ (In fact, P(D) was found to be 0.16064.) (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 40 General “And” Rule Leads to Rule of Conditional Probability Recall: For any two events A and B, P(A and B)=P(A)×P(B given A) Rearrange to form Rule of Conditional Probability: P(B given A) = P(A and B) P(A)

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 41 Example: Applying Rule of Conditional ProbabilityBackground : For the lie detector problem, we have  Probability of being a spy: P(S)=0.  Probability of spies being detected: P(D given S)=0.  Probability of non-spies “detected”: P(D given not S)=0.  Probability of being a spy and detected: P(S and D)=0.  Overall probability of positive lie detector: P(D)=0.  Question: If the lie-detector indicates an employee is a spy, what is the probability that he/she actually is one? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 45 Example: Applying Rule of Conditional ProbabilityBackground : For the lie detector problem, we have  Probability of being a spy: P(S)=0.  Probability of spies being detected: P(D given S)=0.  Probability of non-spies detected: P(D given not S)=0.  Probability of being a spy and detected: P(D and S)=0.  Overall probability of positive lie detector: P(D)=0.  Response: P(S given D)=P(D and S) = P(D) Note: P(S given D) is very different from P(D given S) (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 46

Two Types of Error in Lie Detector Test

1 st^ Type of Error: Conclude employee is a spy when he/she actually is not. 2 nd^ Type of Error: Conclude employee is not a spy when he/she actually is. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 47 Example: Two Types of Error in Lie Detector TestBackground : For the lie detector problem, we have  Probability of spies being detected: P(D given S)=0.  Probability of non-spies detected: P(D given not S)=0.  Questions:  What is probability of 1st^ type of error (conclude employee is spy when he/she actually is not)?  What is probability of 2nd^ type of error (conclude employee is not a spy when he/she actually is)?

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 54 Example: Intuiting Conditional Probabilities When Events Are IndependentBackground : Students are classified according to gender (M or F) and whether they get an A in Stats.  Questions:  Should gender and getting an A or not be dependent or ind.? How should P(A) and P(A given F) compare?  What are the above probabilities, and which is higher? Total 0.25 0.75 1. Male 0.10 0.30 0. Female 0.15 0.45 0. A not A Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 56 Example: Intuiting Conditional Probabilities When Events Are IndependentBackground : Students are classified according to gender (M or F) and whether they get an A in Stats.  Responses:  Gender and grade should be _________; should have P(A)__P(A given F)  P(A)= ____; P(A given F)=______________________ Total 0.25 0.75 1. Male 0.10 0.30 0. Female 0.15 0.45 0. A not A Total (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 57

Independence and Conditional Probability

Rule: A and B independentP(B)=P(B given A) Test: P(B)=P(B given A)A and B are independent P(B) P(B given A)A and B are dependent Independent regular and conditional probabilities are equal (occurrence of A doesn’t affect probability of B) (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 58

Independence and Product of Probabilities

Rule: IndependentP(A and B)=P(A)×P(B) Test: P(A and B) = P(A)×P(B)independent P(A and B) P(A)×P(B)dependent Independentprobability of both equals product of individual probabilities

(C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 60

Table of Counts Expected if Independent

 For A, B independent, P(A and B)=P(A)×P(B).  This Rule dictates what counts would appear in two-way table if the variable A or not A is independent of the variable B or not B:  If independent, count in category- combination A and B must equal total in A times total in B, divided by overall total in table. (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 61 Example: Counts Expected if IndependentBackground : Students are classified according to gender and ears pierced or not. A table of expected counts ( etc.) has been produced.  Question: How different are the observed and expected counts? (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 63 Example: Counts Expected if IndependentBackground : Students are classified according to gender and ears pierced or not. A table of expected counts ( etc.) has been produced.  Response: Observed and expected counts are very different (270 vs. 174, 20 vs. 116, etc.) because (C) 2007 Nancy Pfenning Elementary Statistics: Looking at the Big Picture L14. 64 Example: Counts Expected if IndependentBackground : Students are classified according to gender and grade (A or not). A table of expected counts ( , etc.) has been produced.  Question: How different are the observed and expected counts? Total 25 75 100 M 10 30 40 F 15 45 60 Obs A not A Total Total 25 75 100 M 10 30 40 F 15 45 60 Exp A not A Total