Upload
lester-evans
View
215
Download
2
Embed Size (px)
Citation preview
Copyright © 2014 Pearson Education, Inc. All rights reserved
Chapter 5
Modeling Variation
with Probability
5 - 2 Copyright © 2014 Pearson Education, Inc. All rights reserved
Learning Objectives
Understand that humans can’t reliably create random numbers or sequences.
Understand that a probability is a long-term relative frequency.
Know the difference between empirical and theoretical probabilities— and know how to calculate them.
5 - 3 Copyright © 2014 Pearson Education, Inc. All rights reserved
Learning Objectives Continued
Be able to determine whether two events are independent or associated and understand the implications of making incorrect assumptions about independent events.
Understand that the Law of Large Numbers allows us to use empirical probabilities to estimate and test theoretical probabilities.
Know how to design a simulation to estimate empirical probabilities.
Copyright © 2014 Pearson Education, Inc. All rights reserved
5.1
What Is Randomness?
5 - 5 Copyright © 2014 Pearson Education, Inc. All rights reserved
Randomness
If numbers are chosen at random, then no predictable pattern occurs and no digit is more likely to appear more often than another.
In general, outcomes occur at random if every outcome is just as likely to appear as any other outcome and no predictable pattern of outcomes occurs.
5 - 6 Copyright © 2014 Pearson Education, Inc. All rights reserved
Psychology and Randomness
Pick a “random” number between 1 and 20. This may seem random, but due to cognitive
bias some numbers, e.g. 17, are more likely than others. Odd numbers and especially prime numbers “feel” more random.
What issues might there be in picking ten people at random?
5 - 7 Copyright © 2014 Pearson Education, Inc. All rights reserved
Selected 10 Random Numbers Between 1 and 20 with StatCrunch
1. Go to Data→Simulate data→Uniform
2. Rows = 10, Columns = 1, a = 1, b = 21
3. Hit “Simulate”
4. Round all numbers down, that is, only look at the whole number part.
5 - 8 Copyright © 2014 Pearson Education, Inc. All rights reserved
Selected 10 Random Numbers Between 1 and 20 with StatCrunch
Random Numbers: 15,10,15,20,15,4,9,17,19,1
5 - 9 Copyright © 2014 Pearson Education, Inc. All rights reserved
Using a Random Number Table to Simulate Rolling a Die 10 Times
1. Pick a line, say 30, on the table to begin.
2. Select numbers in order disregarding 0,7,8,9.
3. The “random” numbers are 5,4,5,3,4,6,2,5,3
5 - 10 Copyright © 2014 Pearson Education, Inc. All rights reserved
Troubles With Tables and Computers
The random number table only has a finite list. If it is used many times, it will not be random at all.
Computers involve a random seed, typically given by the time it is clicked to the nearest millisecond. Generated numbers are called pseudo random numbers.
5 - 11 Copyright © 2014 Pearson Education, Inc. All rights reserved
Other Physical Techniques
Flip a coin to generate random 0’s and 1’s. Pick a card to generate random numbers. Roll a die to generate numbers from 1 to 6. Pick a number out of a hat. Warning: Skilled magicians can manipulate
coins, cards, dice, and hats to select a value of their choice.
5 - 12 Copyright © 2014 Pearson Education, Inc. All rights reserved
Empirical and Theoretical Probabilities
Probability measures the proportion or percent of the time that a random event occurs.
Theoretical probabilities are long run relative frequencies based on theory. P(Heads) = 0.5
Empirical probabilities are short run relative frequencies base on an experiment. A coin was tossed 50 times and landed on heads 22
times. The empirical probability is 22/50 = 0.44.
5 - 13 Copyright © 2014 Pearson Education, Inc. All rights reserved
Using Theoretical and Empirical Probabilities
Use Theoretical Probabilities when we can mathematically determine them. Dice, Cards, Coins, Genetics, etc.
Use Empirical Probabilities when they cannot be mathematically determined. This is done by sampling. Weather, Politics, Business Success, etc.
Copyright © 2014 Pearson Education, Inc. All rights reserved
5.2
Finding Theoretical Probabilities
5 - 15 Copyright © 2014 Pearson Education, Inc. All rights reserved
Probability Properties
0 ≤ P(A) ≤ 1 There can’t be a negative chance or more than a
100% chance of something occurring. P(Ac) = 1 – P(A)
Ac the complement of A means that A does not occur.
If there is a 25% chance of winning, then there is a 75% chance of not winning.
5 - 16 Copyright © 2014 Pearson Education, Inc. All rights reserved
Probability for Equally Likely Events
If all events are equally likely, then
Example: Find the probability of picking an Ace from a 52 card deck.
Number of Outcomes in ( )
Number of All Possible Outcomes
AP A
4 Aces 1(Ace)
52 Cards 13P
5 - 17 Copyright © 2014 Pearson Education, Inc. All rights reserved
Sum of Dice
Roll 2 dice. Find P(Sum = 6).
1 2 3 4 5 6
1 X
2 X
3 X
4 X
5 X
6
Sum of 6: 5 Possible Rolls: 36
P(Sum = 6) = 5
36
5 - 18 Copyright © 2014 Pearson Education, Inc. All rights reserved
AND
The word “And” in Probability means both must occur.
Example: If you roll a die, find the probability that it is even and less than 5.
Solution: The die rolls that are both even and less than 5 are: 2, 4.
2 1(Even AND <5)
6 3P
5 - 19 Copyright © 2014 Pearson Education, Inc. All rights reserved
OR
The word “OR” in probability means at least one of the events must occur.
Example: Find the probability of picking a Spade Or a King from a 52 card deck.
Solution: There are 13 spades in the deck. There are 3 kings that are not spades. Thus, there are 16 cards that are a spade or a king.
16 4(Spade OR King)
52 13P
5 - 20 Copyright © 2014 Pearson Education, Inc. All rights reserved
Mutually Exclusive Events
Two events are called Mutually Exclusive if they cannot both occur.
If A and B are Mutually Exclusive thenP(A AND B) = 0
Example: A person is selected at random. Let A be the event that the person is a registered Democrat and let B be the event that the person is a registered Republican. Then A and B are mutually exclusive events.
5 - 21 Copyright © 2014 Pearson Education, Inc. All rights reserved
Some Probability Rules
1. P(Ac) = 1 – P(A)
2. P(A OR B) = P(A) + P(B) – P(A AND B)
3. Mutually Exclusive: a. P(A OR B) = P(A) + P(B)
b. P(A AND B) = 0
5 - 22 Copyright © 2014 Pearson Education, Inc. All rights reserved
Venn Diagrams
A Venn Diagram is a chart that organizes outcomes.
P(Hat AND Glasses) = 2/6 P(Not Hat) = 1 – P(Hat) = 1 – 3/6 = 1/2
5 - 23 Copyright © 2014 Pearson Education, Inc. All rights reserved
Tables and Probability
Take a bus. 55/278
Be male and take a bike 14/278
Car Bike Walk Bus Total
Male 75 14 12 23 124
Female 90 7 25 32 154
Total 165 21 37 55 278
Transportation to Class
Find the probability that a randomly selected student will:
Be female or walk to class. 154/278 + 37/278 – 25/278
= 166/278
Copyright © 2014 Pearson Education, Inc. All rights reserved
5.3
Associations in Categorical Variables
5 - 25 Copyright © 2014 Pearson Education, Inc. All rights reserved
Conditional Probability
Conditional Probability is the probability of an event occurring given some additional knowledge.
Find the probability that a person will vote for a tax cut given that the person is Republican.
Find the probability that student who is a psychology major is also a vegetarian.
5 - 26 Copyright © 2014 Pearson Education, Inc. All rights reserved
Tables and Conditional Probability
P(Bus|Female) = Probability of riding the bus given that the person is female. 32/154
P(Bus AND Female) = 32/278
Car Bike Walk Bus Total
Male 75 14 12 23 124
Female 90 7 25 32 154
Total 165 21 37 55 278
5 - 27 Copyright © 2014 Pearson Education, Inc. All rights reserved
Determining a Probability Statement
Let A be the event that a person is left handed and B be the event that the person is over 30 year old. Write symbolically: The probability that:
a left handed person will be over 30. P(B|A)
a person is a lefty who is over 30. P(A AND B)
a person over 30 years old is a righty. P(AC|B)
5 - 28 Copyright © 2014 Pearson Education, Inc. All rights reserved
The Formula for a Conditional Probability
( AND )( | )
( )
P A BP A B
P B
Use this formula when explicitly given the probabilities or percents.
You do not need to use this formula when given a contingency table.
5 - 29 Copyright © 2014 Pearson Education, Inc. All rights reserved
Variations of the Formula
( AND )( | )
( )
P A BP A B
P B
( AND )( | )
( )
P A BP B A
P A
( AND ) ( | ) ( )P A B P A B P B
( | ) ( | )P A B P B A
5 - 30 Copyright © 2014 Pearson Education, Inc. All rights reserved
Conditional Probabilities
By 2020, 2% of Americans will be Senior Citizens living in poverty. 17% of all Americans will be Senior Citizens in 2020. What percent of all Senior Citizens will be living in poverty?
A → Senior Citizen, B → Living in Poverty P(A AND B) = 0.02, P(A) = 0.17 P(B|A) = 0.02/0.17 ≈ 0.12 In 2020, about 12% of all Senior Citizens will be
living in poverty.
5 - 31 Copyright © 2014 Pearson Education, Inc. All rights reserved
Independent Events
Events A and B are called independent if P(A|B) = P(A)
or equivalently
P(A AND B) = P(A)P(B) Intuitively, events are independent if
knowledge of B does not change the probability of A occurring.
5 - 32 Copyright © 2014 Pearson Education, Inc. All rights reserved
Determining Independence
Two 6-Sided dice are rolled. Let A be the event that the dice sum to 7 and B be the event that the first die lands on a 4. Are A and B independent? (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) P(A) = 6/36 P(A|B) = 1/6 P(A|B) = P(A)
Yes, the events are independent.
5 - 33 Copyright © 2014 Pearson Education, Inc. All rights reserved
Checking for Independence
55% of all students at the university are female and 30% of all students at the university graduate in four years. 13% of all students at the university are women who graduate in four years. Are gender and graduating in four years independent? F → Female, G → Graduate in 4 years P(F AND G) = 0.13 P(F) X P(G) = 0.55 X 0.30 = 0.165
Since 0.13 ≠ 0.165, gender and graduating in four years are not independent so they are associated.
5 - 34 Copyright © 2014 Pearson Education, Inc. All rights reserved
Independence and Repeated Events
8% of all babies are born with a low birth weight. If 10 babies are born tonight at the hospital, find the probability that at least one is born with a low birth weight. Assume Independence. P(x ≥ 1) = 1 – P(x = 0) = 1 – (0.92 x 0.92 x 0.92 x … x 0.92) = 1 – (0.92)10
≈ 0.57 There is about a 57% chance that at least one of the
10 babies will be born with a low birth weight.
Copyright © 2014 Pearson Education, Inc. All rights reserved
5.4
The Law of Large Numbers
5 - 36 Copyright © 2014 Pearson Education, Inc. All rights reserved
Empirical Probability Example The table to the right shows the result of tossing a coin 10
times. Empirical Probabilities of heads:
After first toss: P(H) = 1/1 = 1.00 After second toss: P(H) = 2/2 = 1.00 After third toss: P(H) = 3/3 = 1.00 After fourth toss: P(H) = 3/4 = 0.75 After tenth toss: P(H) = ?
Empirical probability is not the same as theoretical probability.
5 - 37 Copyright © 2014 Pearson Education, Inc. All rights reserved
Simulations Resources: UCLA’s SOCR
http://socr.ucla.edu/htmls/SOCR_Experiments.html
Choose Binomial Coin Experiment n is the number of coin tosses per trial. p is the probability that it lands on heads
5 - 38 Copyright © 2014 Pearson Education, Inc. All rights reserved
Simulations Resources: UCLA’s SOCR
http://socr.ucla.edu/htmls/SOCR_Experiments.html
Choose Card Experiment n is the number of card dealt. Y is the value, Z is the suit
5 - 39 Copyright © 2014 Pearson Education, Inc. All rights reserved
The Law of Large Numbers
The Law of Large Numbers states that if an experiment with a random outcome is repeated a large number of times, the empirical probability of an event is likely to be close to the true probability. The larger the number of repetitions, the closer together these probabilities are likely to be.
5 - 40 Copyright © 2014 Pearson Education, Inc. All rights reserved
The Law of Large Numbers Examples
If you flip a fair coin one million times, it is likely to land on heads close to half the time.
If you randomly survey 50,000 Americans asking them if they know what the capitol of Alabama is, the proportion from the survey who do know will be very close to the proportion of all Americans who know.
5 - 41 Copyright © 2014 Pearson Education, Inc. All rights reserved
Warnings About the Law of Large Numbers
If the theoretical probability if far from 0.5, use a very large number of trials for the Empirical Probability to be close.
If you flip a fair coin five times and it lands on heads all five times, this does not mean that it will land on tails the next five times to compensate.
5 - 42 Copyright © 2014 Pearson Education, Inc. All rights reserved
Law of Large Numbers Does Not Say That Streaks Cannot Occur
If the first five tosses of a coin all land heads, this does not violate the Law of Large Numbers.
If you just watched a fair die rolled 20 times without seeing a 2, this does not mean that a 2 is due on the next toss.
Copyright © 2014 Pearson Education, Inc. All rights reserved
Chapter 5
Case Study
5 - 44 Copyright © 2014 Pearson Education, Inc. All rights reserved
Probability of 2 SIDS in a Family
Sally Clark claimed that her two babies died of SIDS.
Only one in 8543 babies die of SIDS. How likely is it that a two siblings will die of
SIDS? If the two events are independent then
1 1 1(Both )
8543 8543 72,982,849P SIDS
5 - 45 Copyright © 2014 Pearson Education, Inc. All rights reserved
What Did the Jury Decide
There are three possibilities: This rare event occurred by random chance. SIDS was not the true cause of death. The events were not independent.
Jury’s Verdict: Guilty!
What do you think?
Copyright © 2014 Pearson Education, Inc. All rights reserved
Chapter 5
Guided Exercise 1
5 - 47 Copyright © 2014 Pearson Education, Inc. All rights reserved
Finding a Probability
Find the probability that a person is Liberal OR a Democrat.
1. P(Liberal) = 530/1858
2. P(Dem) = 689/1858
3. Liberal and Dem Mutually Exclusive? No, since there are 306 who are both.
Dem Rep Other Total
Liberal 306 26 198 530
Moderate 279 134 322 735
Conservative 104 309 180 593
Total 689 469 700 1858
5 - 48 Copyright © 2014 Pearson Education, Inc. All rights reserved
Finding a Probability
Dem Rep Other Total
Liberal 306 26 198 530
Moderate 279 134 322 735
Conserv. 104 309 180 593
Total 689 469 700 1858 Find the probability that a
person is Liberal OR a Democrat.1. P(Liberal) = 530/1858
2. P(Dem) = 689/1858
3. Liberal and Dem Mutually Exclusive? No, since there are 306 who are both.
4. P(Liberal AND Dem) = 306/1858
5. Remember to Subtract:P(Lib AND Dem) = P(Lib) +P(Dem) – P(Lib AND Dem)
6. = 530/1858 + 689/1858 – 306/1858
7. ≈ 0.49
Copyright © 2014 Pearson Education, Inc. All rights reserved
Chapter 5
Guided Exercise 2
5 - 50 Copyright © 2014 Pearson Education, Inc. All rights reserved
Are Gender and Which Thumb is on Top of Naturally Clasped Hands Independent?
First expand the table to include the marginal totals.
M W
Right 18 42
Left 12 28
5 - 51 Copyright © 2014 Pearson Education, Inc. All rights reserved
Are Gender and Which Thumb is on Top of Naturally Clasped Hands Independent?
First expand the table to include the marginal totals.
P(Right) = 60/100 = 0.6 P(Right|Man) = 18/30 = 0.6 Since P(Right|Man) = P(Right), they are
independent.
M W Total
Right 18 42 60
Left 12 28 40
Total 30 70 100