0% found this document useful (0 votes)
10 views58 pages

STATS+Ch+13-14+PPT

Uploaded by

kerrynguyen06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views58 pages

STATS+Ch+13-14+PPT

Uploaded by

kerrynguyen06
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Probability:

Foundations for Inference


Chapters 13, 14
Bock, Velleman, DeVeaux
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Randomness
 Random – when individual outcomes are uncertain, but
there is a regular distribution of outcomes in a large
number of repetitions
 Did the outcome occur by chance?
Chance behavior is unpredictable in the short-term, but
creates a predictable pattern in the long-run
 Probability – the proportion of times a particular
outcome would occur (over the long-term)
 Independent – where the outcome of 1 trial is not
influenced (or related to) the outcome of another
Tossing a coin
 Consider the ‘event’ tossing a coin…
 Obviously the only ‘outcomes’ are heads/tails
Which is more likely?
 What probability would we expect for observing a head?
Or a tail?
 Toss a coin… did you see a head or a tail?
Repeat… did you see the same result? Why/why not?
 If we tossed 10 coins, how many Heads would we expect to
see? (think about the likelihood of a head x 10 coins)
If we tossed 20 coins? 100 coins?
What would we expect over time?
Tossing a coin…
 Notice the probability (%) of observing a head…
 Initially
 After a few tosses
 After a large
number of tosses
Rolling two dice…
 Suppose you rolled 2 dice at the same time
 What would be all of the possible combinations?
Rolling two dice…
 Notice all of the combinations for the 2 dice
 There are 36 combinations (6x6 in this case)
 Note: 3-1 is a different outcome than 1-3
(i.e., you can distinguish between the 2 dice)
Rolling two dice…
 Once you know these outcome possibilities, you can
calculate a number of probabilities
 What is the likelihood of observing:
 A double
 A total of 7
 A dice with a 2 showing… etc.
Rolling two dice…
 What is the likelihood of observing:
 A double… there are 6 doubles (1-1, 2-2, 3-3, etc.),
so: P(doubles) = 6/36 = 1/6
 A total of 7… there are 6 ways to observe a 7 (1-6, 6-1, 2-5,
5-2, 3-4, 4-3), so: P(sum=7) = 6/36 = 1/6
 A dice with a 2 showing… there are actually 12 dice with 2’s
on them, so: P (dice with 2) = 12/36 = 1/3
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Probability Models
 In the previous examples like flipping coins and
rolling dice, the outcomes can be expressed (modeled)
in the following terms:
 All possible outcomes (called the Sample Space, S)
 An event (or a particular outcome)
 Probability (of that event)
 Probability Model
• Consists of a Sample Space and the probability for an event (or all
events)
Probability Models
 Let’s define the Probability Model for our 2
examples…
 Flipping a coin…
 Sample Space, S = {Heads, Tails}
Probability of each is 50%
 Rolling 2 dice…
 Sample Space, S = {1-1, 2-1, 3-1…, 1-2, 2-2..., 6-6}
Probability of each unique event is 1/36th
Probability Models
 Let’s define some more Probability Models…
 Flipping a coin, then rolling 1 dice…
 Selecting a playing card…

Remember: Order is important!


(flip a coin, roll 1 dice is different from
roll 1 dice, flip a coin)
Probability Models
 Let’s define some more Probability Models…
 Flipping a coin, then rolling 1 dice…
 Sample Space, S = {H1, H2… H6, T1, T2… T6}
Probability of each is 1/12th
 Selecting a playing card…
 Sample Space, S = {Ace-Spades… King-Spades, Ace-
Hearts…King-Hearts, Ace-Clubs… King-Clubs, Ace-
Diamonds…King-Diamonds}
Probability of each is 1/52nd (i.e., each card is
equally as likely as any other card to be selected)
Probability Models
 Calculating probabilities using Probability
Models…
 In selecting a playing card, what is the
likelihood (probability) of observing:
 A diamond
 A face card
 A four
Probability Models
2 decimal
What is the likelihood of observing: places for
Percentages
 A diamond
 13 diamonds in a deck of 52 playing cards,
P(diamond) = 13/52= 1 / 4 = 25.00%
 A face card [Face card is Jack-Queen-King of any suit]
3 face cards x 4 suits = 12 face cards in a deck,
P (face card) = 12/52 = 3 / 13 = 23.07%
 A four
 There are 4 fours in a deck,
P ( 4) = 4/52, 1/13 = 7.69%
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Probability Rules, Notation
 Probability of event A (probability function) is
referenced as P(A)
 Rule 1: Any probability P(A) is a number between 0
and 1 0 < P(A) < 1
 Rule 2: The probability of the sample space S is equal
to 1 P(S) = 1
 Rule 3: The probability that any event A does not
occur is P(Ac) = 1 - P(A)
Note: Ac is the complement of event A
Notation is important! P(A)
Probability Rules, Notation
 Rule 4: If two events A and B are disjoint (i.e., no
outcomes in common), then the probability of either
event is the sum of the probabilities of the two events:
P(A or B) = P(A ∪ B) = P(A) + P(B)
Reads: Probability of the Union of Events A, B.
(Also called the Addition Rule)

 Probability of the Intersection of Events A,B


P (A and B) also shown as P(A ∩ B) = P(A) * P(B)

OR = add probabilities Know the difference


AND = multiply probabilities between ∪ and ∩
Probability Model Examples
 Returning to our ‘rolling 2 unique dice’
example… If we recall, there were 36 possible
outcomes within the sample space.
 Considering these outcomes, what is the
probability:
 the sum of the 2 dice = 5? Write in proper
Probability Model
 the sum is NOT = 5? notation format,
 the sum is 5 OR 7? and solve…
 the sum is a multiple of 4?
Rolling two dice…
 Considering these outcomes, what is the
probability:
 the sum of the 2 dice = 5? the sum is NOT = 5?
 the sum is 5 OR 7? the sum is a multiple of 4?
Probability Model Examples
 Canada has 2 official languages, English and French. Choosing a
Canadian at random in a recent survey gave the following
distribution of responses:
English French Asian/Pacific Other

0.63 0.22 0.06 ?

 What is the probability of ‘Other’? Why?


 0.09, because the entire P(sample space) = 100%
 What is the probability that a Canadian’s “mother tongue” is not
English?
 P( Englishc ) = 1-P(English) = 1-0.63 = 0.37 = 37%
 What is the probability that a Canadian’s mother tongue is either French
or Asian Pacific?
 = P(Fr) + P(AP) = 0.22+0.06 = 0.28 = 28%
Probability Model Examples
 Curious as to how common it was for college students to have pierced ears, a
survey of 200 students of both genders was taken, tracking whether or not they
had pierced ears. The results of the survey were:
Pierced Ears?
Gender Yes No Total
Male 24 76 100
Female 96 4 100
Total 120 80 200
 Choosing a student at random from this survey, what is the probability the
student:
 Has pierced ears?
• P (Pierced) = 120/200 = 60% (out of grand total)
 Is a male with pierced ears?
• 24/200 = 12% (intersection)
 Is male OR has pierced ears?
• (100+120-24)/200
196 / 200 = 98% (Note: avoid double counting…)
Probability Model Examples
 A computer-simulated application rolled a dice thousands of times, coming up
with the following distribution of results:

1 2 3 4 5 6
0.13 0.19 0.18 0.2 0.12 0.18
 Using this sample distribution, let the following notations be defined as:
P(A) = P(odd result on the dice)
P(B) = P(result less than 4)
 Find the following probabilities:
P(1 or 5)?
 0.13+0.12 = 25% (union)
 P(A ∩ B)?
 A: 1,3,5 B: 1,2,3
P(1,3) = 0.13+0.18 = 31% (intersection)
 P(A ∩ Bc)?
 A: 1,3,5 B: 4,5,6
P(5) = 0.12 = 12%
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Tree Diagrams
 Another way to display the possible outcomes
for a particular event is to create a
Tree Diagram.
 Graphical display of the event(s)
Note: Sequence is important!
 All of the possible outcomes (Sample Space) must be
shown
Note: For large trees, you may abbreviate with “…”
 Sample Space is often designated at the end of the
tree
Tree Diagrams
 For our example of Flipping a coin, followed by
rolling a dice, the tree diagram would be:
 Notice:
 Root node
 Labels
 Tree lines
 Sample Space values
Tree Diagrams
 Create a Tree Diagram for the event of:
Flipping a coin, then rolling 2 dice…
Tree Diagrams
 Tree Diagram for
Flipping a coin,
then rolling 2 dice…
 Note: for large Sample
Space values, “…” is
acceptable
 Show full range of values
(i.e., both H, T, multiple
1-6 ranges)
 S{H-1-1… H-1-6… H-6-6…
T-1-1… T-1-6… T-6-6}
Tree Diagrams
 Create a Tree Diagram and find the
probabilities for the following events:
 3 consecutive coin flips
a) 3 heads
b) 2 heads
c) at least 1 head
 2 consecutive dice rolled
a) the same number twice
b) a sum of at least 7
c) a sum less than 10
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Venn Diagrams
 Mutually exclusive (disjoint)
vs. non-mutually exclusive
(joint) sets

 Joint:
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

 Disjoint:
P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
but note P(A ∩ B) = 0
Venn diagram example…
 In an apartment complex, 40% of residents read the
USA Today, while 25% of residents read the New
York Times. Five percent of residents read both.
Suppose we select an apartment resident at random
and record which of the two papers the person reads.
 Make a two-way table that displays the sample space.
 Construct a Venn diagram to represent the outcomes.
 Find the probability the person reads at least 1 of the 2
papers.
 Find the probability the person does not read either paper.
Venn diagram example…
 Define the events:
 A: reads the USA Today
B: reads the New York Times
 Given: P(A) = 0.40, P(B) = 0.25
P(A ∩ B) = 0.05 Reads
USA Today?
Reads NY Times? YES NO Total
YES 0.05 0.20 0.25
NO 0.35 0.40 0.75
Total 0.40 0.60 1.00
Venn diagram example…
 Construct a Venn Diagram:
Read
0.40 USA Today

0.25 Read
NY Times
35% 5% 20%

Reads
USA Today?
Reads NY Times? YES NO Total
YES 0.05 0.20 0.25
NO 0.35 0.40 0.75
Total 0.40 0.60 1.00
Venn diagram example…
 Find the probability the person reads at least 1
of the 2 papers…
 P(A ∪ B) = P(A) + P(B) - P(A ∩ B)
= 0.40 + 0.25 – 0.05 = 0.60 (60%)
A: reads the USA Today Reads
B: reads the New York Times USA Today?
Reads NY Times? YES NO Total
YES 0.05 0.20 0.25
NO 0.35 0.40 0.75
Total 0.40 0.60 1.00
Venn diagram example…
 Find the probability the person does not read
either paper…
 From the table, NYTimes=No and USAToday=No,
probability = 0.40 (40%)
 Also, 1 – P(A ∪ B) = 1 – 0.60 = 0.40
OR, P(Ac ∩ Bc) = 0.40
Reads
USA Today?
Reads NY Times? YES NO Total
YES 0.05 0.20 0.25
NO 0.35 0.40 0.75
Total 0.40 0.60 1.00
Venn diagram example…
 A recent census at a major university found that
40% of its students primarily used Macs, the
remainder used PCs. At the same time, 67% of the
school’s students were undergraduates, with the
remainder graduate students. In the census, 23% of
respondents were graduate students who used PCs as
their main computer.
 Assuming there were 10,000 students in the census, make
a two-way table that displays the sample space.
 Construct a Venn diagram to represent the outcomes.
 Find the probability the student is either a graduate
student OR uses a Mac. Write the event in symbolic form
using the 2 events.
Venn diagram example…
 Define the events: Note: I chose
 A: students using PCs B: graduate students B: Grad because
 P(A) = 0.60, P(B) = 0.33 and P(A ∩ B) = 0.23 PC + Grad was given
Student Classification Student Classification

Undergrad Grad Undergrad Grad

Computer Type Computer Type

PCs 0.37 0.23 0.60 PCs 3,700 2,300 6,000


Macs 0.30 0.10 0.40 Macs 3,000 1,000 4,000
0.67 0.33 1.00 6,700 3,300 10,000

Find the probability the student is either a graduate or a uses a Mac.


P(Ac ∪ B) = P(Ac) + P(B) - P(Ac ∩ B)
= 0.40 + 0.33 – 0.10 = 0.63 (63%)
(note: different example than on Activity worksheet…)
Venn diagram example…
 Venn Diagram:
Students
using a PC

Graduate
students

37 % 23% 10%
Venn diagram example…
 The two-way table below describes the members
of the US Senate in a recent year.
Male Female
Democrats 47 13
Republicans 36 4

 Construct a Venn diagram that models the chance


process using events, R: republican, F: female
 Find P(R ∪ F). Interpret this value in context.
 Find P(Rc ∩ Fc). Interpret this value in context.
Venn diagram example…
 Define the events:
 R: republicans, F: female
 P(R) = 0.40, P(F) = 0.17
Male Female
Democrats 47 13 60
Republicans 36 4 40
83 17 100
 Find P(R ∪ F) = (40+17-4)/100
<OR> (40+13)/100 = 0.53 (53%)
Probability that a person chosen is Republican OR Female.
 Find P(Rc ∩ Fc) = 47/100 = 0.47 (47%)
Probability that a person chosen is Not Republican
AND Not Female
(i.e., a Democrat who is Male, Male democrat)
Venn diagram example…
 Venn Diagram:
Republicans

Females

P(R) = 0.40, P(F) = 0.17

36 % 4 % 13%
Venn Diagrams – Multiple Variables
 There are 125 students enrolled in various AP courses at the
American High School.
 There are 31 students in AP European History, 52 students in AP Calculus,
and 18 students in AP Spanish
 10 students study both AP European History and AP Calculus, 5 students
study both AP European History and AP Spanish, 8 students study both AP
Calculus and AP Spanish, and 3 students study all three.
 What is the probability:
• A student takes an AP course other than these three?
AP-European
• A student takes just AP-Calculus? History
• A student takes just AP-European History?

AP-Spanish
AP-Calculus
Venn Diagrams – Multiple Variables
 125 students:
 31 AP-European History, 52 AP-Calculus, 18 AP-Spanish
 10 in both AP-EH + AP-Calc, 5 in both AP-EH + AP-Span, 8 in both AP-
Calc + AP-Span, 3 in all 3 AP classes
 What is the probability:
• A student takes an AP course other than these three?
• P (EH+Calc+Span)c = 125 – (19+8+37+2+3+5+7) = 125 – 81 = 44 => 44/125 = 35.2%
NOTE: you can also use the 31/52/18 total numbers but would need to subtract the
2/3/5/7 intersecting numbers AND subtract 3 a 2nd time (triple-counted)

• A student takes just AP-Calculus? 19


• P (just Calc) = 52 – 7 – 3 – 5 = 37/125 = 29.6% AP-European
History

• A student takes just AP-European History?


2 7
• P (just EH) = 31 – 7 – 3 – 2 = 19/125 = 15.2% 3
AP-Spanish
5 AP-Calculus
8 37
Probability Topics:
 Probability, Chance, and Randomness
 Probability Models
 Probability Rules
 Tree Diagrams
 Venn Diagrams
 Conditional Probability
Conditional Probability
 The probability we assign to an event can change if
we know that some other event has occurred.
 In other words, the probability of the (2nd) event is
displayed under the conditions that we know about
the 1st event.
 Generically, with 2 defined events (A, B) we can
describe the probability of event B, given that
event A has occurred as P(B | A).
(Note: “B” is 1st in this equation as it is the desired
probability, in the context of “A”)
Probability Model Examples
 Recalling the survey of 200 college students, the data breakdown
of gender and pierced ears is listed below, with defined events:
M: Male, F: Female P: Pierced Ears, N: Not Pierced Ears
 From the table, we have calculated the following probabilities:
 Probability of Male or Pierced Ears:

• P(M ∪ P) = P(M) + P(P) – P(M ∩ P)


= 100/200 + 120/200 – 24/200 = 196 / 200 = 0.98 (98%)
<Alternatively> P(M ∪ P) = (100 + 96) / 200 = 0.98
 Probability of Male and Pierced Ears:
• P(M ∩ P) = 24 /200
= 0.12 (12%) Pierced Ears?
Gender Yes No Total
Male 24 76 100
Female 96 4 100
Total 120 80 200
Probability Model Examples
 Continuing… M: Male, F: Female P: Pierced Ears, N: Not Pierced Ears
 Some Conditional Probability examples:
 Find the probability the student is Male, given the student has pierced
ears.
 P (M | P) = 24 / 120 = 0.20 (20%)
(Note: the population is only those with total pierced ears, not ALL people)

 Find the probability the student is Female, given that the student has
pierced ears.
 P(F | P) = 96 / 120 = 0.80 (80%)
Pierced Ears?
Gender Yes No Total
Male 24 76 100
Female 96 4 100
Total 120 80 200
Probability Model Examples
 Continuing… M: Male, F: Female P: Pierced Ears, N: Not Pierced Ears
 A few more Conditional Probability examples:
 Find the probability the student is Female, given that the student does
not have pierced ears.
 P(F | N) = 4 / 80 = 0.05 (5%)

 Given that the student is male, find the probability that he does not
have pierced ears?
 P(P | M) = 76 / 100 = 0.76 (76%)
(Note: pay attention to the wording…)
Pierced Ears?
Gender Yes No Total
Male 24 76 100
Female 96 4 100
Total 120 80 200
Probability Model Examples
 Is Gender and Ear Piercing “Independent”?
 Remember: Independent events means that 1 event does not impact
another event… or, event 2 is not dependent upon event 1
 You can check for Independence within 2-way tables by comparing the
proportions of certain rows (or columns) against other rows (or columns),
or against the overall total.
 For example:
• % Pierced Ears overall is 120/200 = 60%
• % Males with Pierced Ears is 24/200 = 12%
These are considerably different, so Gender and Pierced Ears are NOT independent
(i.e., pierced ears DOES depend on gender…)

Pierced Ears?
Gender Yes No Total
Male 24 76 100
Female 96 4 100
Total 120 80 200
Independence,
Mutually Exclusive Events
 Are Gender and Leisure Time Preference
independent?

 % Dance = 18/50 = 36%


% Men who Dance = 2/20 = 10%
% Women who Dance = 16/30 = 53%
Gender and Leisure Time Preference are NOT
Independent
 Note: Men and Women are mutually exclusive
Probability Model Examples
 And recalling the study of 10,000 students, the data breakdown of
undergraduate/graduate level and PC/Mac usage is listed below, with these
defined events: Student Classification
 P: students using PCs Undergrad Grad Totals
M: students using Macs; Computer Type
U: undergraduate students PCs 3,700 2,300 6,000
B: graduate students Macs 3,000 1,000 4,000
Totals 6,700 3,300 10,000
 What are the following Conditional Probabilities? (Use proper statistical
notation.)
 Find the probability a student uses a PC, given the student is an
undergraduate.
 Find the probability a student uses a Mac, given the student is a graduate.
 Find the probability a student is a graduate, given he/she uses a Mac.
Probability Model Examples
 And recalling the study of 10,000 students, the data breakdown of
undergraduate/graduate level and PC/Mac usage is listed below, with these
defined events: Student Classification
 P: students using PCs Undergrad Grad Totals
M: students using Macs; Computer Type
U: undergraduate students PCs 3,700 2,300 6,000
B: graduate students Macs 3,000 1,000 4,000
Totals 6,700 3,300 10,000

 Find the probability a student uses a PC, given the student is an


undergraduate.
 P(P | U) = 3700 / 6700 = 0.5522 (55.2%)
Probability Model Examples
 And recalling the study of 10,000 students, the data breakdown of
undergraduate/graduate level and PC/Mac usage is listed below, with these
defined events: Student Classification
 P: students using PCs Undergrad Grad Totals
M: students using Macs; Computer Type
U: undergraduate students PCs 3,700 2,300 6,000
B: graduate students Macs 3,000 1,000 4,000
Totals 6,700 3,300 10,000

 Find the probability a student uses a Mac, given the student is a


graduate.
 P(P | G) = 1000 / 3300 = 0.3030 (30.3%)
Probability Model Examples
 And recalling the study of 10,000 students, the data breakdown of
undergraduate/graduate level and PC/Mac usage is listed below, with these
defined events: Student Classification
 P: students using PCs Undergrad Grad Totals
M: students using Macs; Computer Type
U: undergraduate students PCs 3,700 2,300 6,000
B: graduate students Macs 3,000 1,000 4,000
Totals 6,700 3,300 10,000

 Find the probability a student is a graduate, given he/she uses a


Mac.
 P(G | M) = 1000 / 4000 = 0.25 (25%)
Conditional Probability example
 And lastly, recalling from our apartment reader
example…
40% of the apartment readers read the USA Today,
25% read the New York Times, and 5% read both.
 Define the events:
 A: reads the USA Today; B: reads the New York Times
 Find the probability an apartment resident reads the
USA Today, given the resident reads the New York
Times. Reads USA Today?
 P(A | B) = 5 / 25 YES NO Total
Reads NY Times?
= 0.20 (20%)
YES 5 20 25
NO 35 40 75
Total 40 60 100
Conditional Probability
 Conditional probability does not have to be
demonstrated in a two-way table…
 Using cards as an example:
 Initiating a game and starting to deal out cards, what is
the likelihood a person is dealt a Heart?
 13/52 = 1/4 = 25%
 If the person is dealt a heart, what is NOW the likelihood
the person is again dealt a heart (i.e., without
replacement)?
• There are now only 51 cards, and 12 hearts, available
• In conditional probability context:
P (Heart | Heart) = 12 / 51 = 0.2353 (23.5%)
• Does the probability going from 25% to 23.5% make sense?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy