Download Randomness and Probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Birthday problem wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability interpretations wikipedia , lookup

Probability wikipedia , lookup

Transcript
Conditional Probability
and
Independence
Section 5.3
Reference Text:
The Practice of Statistics, Fourth Edition.
Starnes, Yates, Moore
Objectives
1. Conditional Probability
-
“what's the probability of Event B given that Event A has happened”
2. Independent Events
If the chances of event B occurring is not affected by whether event A
occurs, then A and B are independent!
3. Tree Diagrams!
Map out my probability calculations!
General Multiplication Rule
P(A ∩ B) = P(A) * P(B I A)
Special case of independent events, multiplication rule becomes
P(A ∩ B) = P(A) * P(B)
4. Conditional Probability formula
Two way Tables
• Students in college stats class wanted to find out how
common it is for young adults to have their ears
pierced. They recorded data on two variablesgender and whether the student had a pierced ear –
for all 178 people in class. The two way table below
displays the data.
Pierced ears?
Gender
Yes
No
Total
Male
19
71
90
Female
84
4
88
Total
103
75
178
A= male B= pierced ears
P(A) = P(male) =
P(B) = P(pierced ears) =
P(A ∩ B) = P(male and pierced ears) =
P(A U B) = P(male or pierced ears) =
Now lets turn out attention to some other interesting probability
questions…
Conditional Probability
• The probability that one event happens given that
another event is already known to have happened is
called Conditional Probability.
• Suppose we known that event A has happened. Then
the probability that event B happens given that event
A has happened is denoted by
P(B I A)
Read | as “given
that” or “under
the condition
that”
Heads Up
• You might be thinking to yourself in the
previous slide and this next slide, “hey,
we’ve done this before! Is there a
connection between conditional probability
and the conditional distributions of Chapter
1?!”
• Of course! We have been doing probability
and conditional probability from the start!
Conditional Probability
• Conditional probability narrows your focus in
onto a specific event. Given a certain
condition….
A= male B= pierced ears
We can ask… P(A I B) then switch the order… P( B I A)
• Example: Grade Distributions
E: the grade comes from an EPS course, and
L: the grade is lower than a B.
Total
6300
1600
2100
Total 3392 2952
Find P(L)
P(L) = 3656 / 10000 = 0.3656
Find P(E | L)
P(E | L) = 800 / 3656 = 0.2188
Find P(L | E)
P(L| E) = 800 / 1600 = 0.5000
3656
10000
Conditional Probability and Independence
Consider the two-way table on page 314. Define events
•
Conditional Probability and Independence
Definition:
Two events A and B are independent if the occurrence of one
event has no effect on the chance that the other event will
happen. In other words, events A and B are independent if
P(A | B) = P(A) and P(B | A) = P(B).
Example:
Are the events “male” and “left-handed”
independent? Justify your answer.
P(left-handed | male) = 3/23 = 0.13
P(left-handed) = 7/50 = 0.14
These probabilities are not equal, therefore the
events “male” and “left-handed” are not independent.
Conditional Probability and Independence
When knowledge that one event has happened does
not change the likelihood that another event will
happen, we say the two events are independent.
Independence: Think of it this
way
Not Independent
Independent
P(left-handed | male) = 3/23 = 0.13
P(left-handed) = 7/50 = 0.14
P(A I B) = 19/100 = .19
P(A) = 19/100 = .19
. 𝟏𝟑 ≠. 𝟏𝟒, 𝒕𝒉𝒖𝒔 𝒏𝒐𝒕 𝒊𝒏𝒅𝒆𝒑𝒆𝒏𝒅𝒆𝒏𝒕
. 𝟏𝟗 = . 𝟏𝟗, 𝒕𝒉𝒖𝒔 𝒊𝒏𝒅𝒆𝒑𝒆𝒏𝒅𝒆𝒏𝒕
In order to know if two events are independent we
need to compute probabilities.
Checking for Independence
• In order to know if two events are independent we
need to compute probabilities.
Example: Is there a relationship between gender and
handedness? To find out we used CensusAtSchool’s Random
Data Selector to chose an SRS of 50 Australian high school
students who completed a survey. The two way table displays
data on the gender and dominant hand of each student.
Dominant Hand
Gender
Right
Left
Total
Male
20
3
23
Female
23
4
27
Total
43
7
50
Are the events “male” and “left
handed” independent?
• Suppose we are told that the chosen student is male.
From the two way table
P(Left handed I male) = 3/23 =0.13
• The unconditional probability
P(left handed) = 7/50 =0.14
These two probabilities are close, but they’re not equal. So
the events “male” and “left handed” are not independent.
Consider flipping a
coin twice.
What is the probability
of getting heads and
heads again?
The word “and” implies
multiplication!
Sample Space:
HH HT TH TT
So, P(two heads) = P(HH) = 1/4
Conditional Probability and Independence
• Tree Diagrams
We learned how to describe the sample space S of a chance
process in Section 5.2. Another way to model chance
behavior that involves a sequence of outcomes is to construct
a tree diagram.
General Multiplication Rule
The probability that events A and B both occur can be
found using the general multiplication rule
P(A ∩ B) = P(A) • P(B | A)
where P(B | A) is the conditional probability that event
B occurs given that event A has already occurred.
Conditional Probability and Independence
• General Multiplication Rule
The idea of multiplying along the branches in a tree
diagram leads to a general method for finding the
probability P(A ∩ B) that two events happen
together.
General Multiplication Rule
• When we calculate the probability of flipping
two heads, we are following the general
multiplication rule!
P(A ∩ B) = P(A) * P(B I A)
Read as: “The Probability of A intersect B equals the
probability of flipping a heads multiplied by the
probability of flipping a second heads given that the first
flip was heads.”
Teens with online profiles
• The Pew Internet and American Life Project
finds that 93% of teenagers (ages 12 to 17)
use the internet, and that 55% of online teens
have posted a profile on a social-networking
site
Question: What percent of teens are online and
have posted a profile? Create a tree diagram.
Lets do this on the board!
• Example: Teens with Online Profiles
P(online )  0.93
P(profile | online )  0.55
P(online and have profile )  P(online ) P(profile | online )


 (0.93)(0.55)
 0.5115
51.15% of teens are online and have
 a profile.
posted
Conditional Probability and Independence
The Pew Internet and American Life Project finds that 93% of teenagers (ages
12 to 17) use the Internet, and that 55% of online teens have posted a profile
on a social-networking site.
What percent of teens are online and have posted a profile?
Check for Understanding
• A computer company makes desktops and laptop computers
at factories in three states- California, Texas, and New York.
The California factory produces 40% of the company’s
computers, the Texas factory makes 25%, and the remaining
35% are manufactured in New York. Of the computers made
in California, 75% are laptops. Of those made in Texas and
New York, 70% and 50% respectively, are laptops. All
computers are first shipped to a distribution center in Missouri
before being sent out to stores. Suppose we select a computer
at random from the distribution center.
1. Construct a tree diagram to represent the situation.
2. Find the probability that it’s a laptop from California. Show
your work.
Independence: A Special
Multiplication Rule
Definition:
Multiplication rule for independent events
If A and B are independent events, then the probability that A and B
both occur is
P(A ∩ B) = P(A) • P(B)
Note that this rule only applies to independent events.
Lets look at an example.
The Challenger Disaster
Example:
On January 28, 1986, Space Shuttle Challenger exploded on
takeoff. All seven crew members were killed. Following the
disaster, scientists and statisticians helped analyze what went
wrong. They determined that the failure of O-ring joints in the
shuttle’s booster rockets was to blame. Under cold conditions
that day, experts estimated that the probability that an individual
O-ring joint would function properly was 0.977. But there were
six of these O-ring joints, and all six had to function properly for
the shuttle to launch safely.
• Assuming that O-ring joints succeed or fail independently,
What is the probability that the shuttle would launch safely
under similar conditions?
The Challenger Disaster
• Assuming that O-ring joints succeed or fail independently, what
is the probability that the shuttle would launch safely under
similar conditions?
• P(joint 1 OK and joint 2 OK and joint 3 OK and joint 4 OK and joint 5 OK
and joint 6 OK) =
(0.977) (0.977) (0.977) (0.977) (0.977) (0.977)= 0.87
• There is an 87% chance that the shuttle would launch safely
under similar conditions (and a 13% chance that it wouldn’t).
General Multiplication Rule
P(A ∩ B) = P(A) • P(B | A)
Conditional Probability Formula
To find the conditional probability P(B | A), use the formula
=
Conditional Probability and Independence
• Calculating Conditional Probabilities
If we rearrange the terms in the general multiplication
rule, we can get a formula for the conditional
probability P(B | A).
• Example: Who Reads the Newspaper?
P(A  B)
P(B | A) 
P(A)


P(A  B)  0.05
P(A)  0.40
0.05
P(B | A) 
 0.125
0.40
There is a 12.5% chance that a randomly selected resident who reads USA
Today also reads the New York Times.
Conditional Probability and Independence
In Section 5.2, we noted that residents of a large apartment complex can be
classified based on the events A: reads USA Today and B: reads the New
York Times. The Venn Diagram below describes the residents.
What is the probability that a randomly selected resident who reads USA
Today also reads the New York Times?
You Try!
• We classified U.S. households according to the
type of phones they used:
Cell Phone
No Cell Phone
Total
Landline
0.60
0.18
0.78
No Landline
0.20
0.02
0.22
Total
0.80
0.20
1.00
Question: What is the probability that a randomly
selected household with a landline also has a cell
phone?
P(A  B)
P(B | A) 
P(A)
Solution:
𝑃(𝑙𝑎𝑛𝑑𝑙𝑖𝑛𝑒 𝑎𝑛𝑑 𝑐𝑒𝑙𝑙 𝑝ℎ𝑜𝑛𝑒)
𝑃( 𝑐𝑒𝑙𝑙 𝑝ℎ𝑜𝑛𝑒 𝑙𝑎𝑛𝑑𝑙𝑖𝑛𝑒 =
𝑙𝑎𝑛𝑑𝑙𝑖𝑛𝑒
Objectives
1. Conditional Probability
-
“what's the probability of Event B given that Event A has happened”
2. Independent Events
If the chances of event B occurring is not affected by whether event A
occurs, then A and B are independent!
3. Tree Diagrams!
Map out my probability calculations!
General Multiplication Rule
P(A ∩ B) = P(A) * P(B I A)
Special case of independent events, multiplication rule becomes
P(A ∩ B) = P(A) * P(B)
4. Conditional Probability formula
Homework
Worksheet