Knowledge Check!
1. A census is always possible
2. The Fundamental Rule for Using Data for Inference states that available data can be used to make
inferences about a much larger group if the data can be considered to be representative with regard
to the question(s) of interest.
3. Shoppers at a mall are surveyed to determine the attitudes of Ontarians about raising the sales tax –
is this survey sample representative with regard to the question of interest?
4. In the York sleep study, say we send our interviewers out onto campus from 8am-10am to ask
students how many hours of sleep they got last night. Will this be a biased sample?
5. A simple random sample is one in which every individual has an equal probability of being selected to
be in the sample.
34
PROBABILITY
[UH] Chapter 7
[MA] Chapter 4
35
What is Probability?
What is probability?
What is the relationship between probability and statistics?
36
Events and the Sample Space
Experiment: The process by which an observation (or measurement) is obtained
Examples:
37
Events and the Sample Space
Simple Event: The outcome that is observed on a single repetition of the experiment
– This is the basic element to which probability is applied.
– One and only one simply event can occur when the experiment is performed.
– A simple event is denoted by E with a subscript.
– Each simple event will be assigned a probability, measuring ”how often” it occurs
Sample Space: The set of all simple events of an experiment
38
Events and the Sample Space
Example
Consider an experiment. where we toss a die and observe the number on the upper face.
When a die is tossed once, there are six possible outcomes. The simple events are:
39
Events and the Sample Space
One way we can display the simple events is using a tree diagram.
Example: A medical technician records a person’s blood type and Rh factor. List the simple events in the
experiment.
40
Events and the Sample Space
Another way we can display these simple events is using a table of outcomes.
Example: A medical technician records a person’s blood type and Rh factor. List the simple events in the
experiment.
41
Events and the Sample Space
Event: a collection of one or more simple events
Example:
42
Events and the Sample Space
Two events are mutually exclusive (or disjoint) if
Example:
43
Calculating Probabilities Using Simple Events
The probability of an event A measures how often we think A will occur
– we denote this by P(A)
Recall: Relative Frequency =
frequency
𝑛
, where n is the number of times an experiment was performed.
Suppose we perform an experiment n times, then the relative frequency for an event A is simply
If we let n get infinitely large,
44
Requirements for Simple Event Probabilities
1. Each probability must lie between
2. If event A can never occur, then P(A) =
3. If event A always occurs when the experiment is performed then P(A) =
4. The sum of the probabilities for all simple events in S is
The probability of an event A is found by adding the probabilities of all the simple events contained in A
45
Requirements for Simple Event Probabilities
Example: Toss a fair coin twice. What is the probability of observing at least one head?
46
Requirements for Simple Event Probabilities
Example: Three children are selected and their sex is recorded. Assume that males and females are
equally likely. What is the probability that there are two boys and one girl in the group?
47
Event Relations and Their Probabilities
The complement of an event A is
The union of two events, A and B, is
The intersection of two events, A and B, is
48
Event Relations and Their Probabilities
When two events, A and B are mutually exclusive,
𝑃 𝐴∪𝐵 =
When two events, A and B are mutually exclusive,
𝑃 𝐴∩𝐵 =
49
De Morgan’s Laws
1.
𝑨 ∩ 𝑩 𝒄 = 𝑨𝒄 ∪ 𝑩𝒄
2.
𝑨 ∪ 𝑩 𝒄 = 𝑨𝒄 ∩ 𝑩𝒄
5
Event Relations and Their Probabilities
Example: In a coffee place, we have that 70% of the customers add sugar to their coffee; 35% add milk to
their coffee, and 25% add both milk and sugar to their coffee. Find the probability that someone uses
neither sugar nor milk.
50
Review
Example: The proportions of blood types A, B, AB and O in the population of all Caucasians in the United
States are reported as 0.40, 0.11, 0.04, and 0.45, respectively. If a single Caucasian is chosen randomly
from the population, what is the probability that they will have either type A or type AB blood?
Useful Counting Rules
If the simple events in an experiment are equally likely, you can calculate
𝑛𝐴 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑖𝑚𝑝𝑙𝑒 𝑒𝑣𝑒𝑛𝑡𝑠 𝑖𝑛 𝐴
𝑃 𝐴 =
=
𝑁 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑠𝑖𝑚𝑝𝑙𝑒 𝑒𝑣𝑒𝑛𝑡𝑠
You can use counting rules to find 𝑛𝐴 and N.
The mn Rule
Suppose you have to make 2 decisions, where decision 1 has 𝑚 options to choose from, and decision 2
has 𝑛 options to choose from.
There are mn ways to accomplish this experiment.
Example: Toss two coins. The total number of simple events is:
The mn Rule
We can generalize this rule.
Suppose you have to make 𝑘 decisions, and each decision has a number (possibly different) of options.
Decision 1 has 𝑛1 options, decision 2 has 𝑛2 options, and so on, until decision 𝑘 has 𝑛𝑘 options.
The total number of possible options are then 𝑛1 ∙ 𝑛2 ∙ 𝑛3 ∙ ⋯ ∙ 𝑛𝑘 .
Example: You are eating at your favourite restaurant and the waiter informs you that you have (a) two
options for appetizers: soup or juice; (b) three options for the main course: a meat, fish or vegetable dish;
and (c) two options for dessert: ice cream or cake. How many possible choices do you have for your
complete meal?
Permutations
A permutation of a set of objects is an ordered arrangement of the objects without repetition.
The number of permutations of a set of 𝑛 objects when taken 𝑘 at a time is
𝑛!
𝑃 𝑛, 𝑘 =
𝑛−𝑘 !
where 𝑛! = 𝑛 𝑛 − 1 𝑛 − 2 … 2 (1), and 0! = 1.
Example: Suppose five runners finish a race with no ties. How many ways can the first, second and third
places be decided?
Combinations
A combination is a set of objects in an unordered subset of the objects without repetition.
The number of combinations of a set of 𝑛 objects taken 𝑘 at a time is
𝑛
𝑛!
𝐶 𝑛, 𝑘 =
=
.
𝑘
𝑘! (𝑛 − 𝑘)!
Example: Two city council members are to be selected from a total of five to form a subcommittee to study
the city’s traffic problems. How many different subcommittees are possible?
Permutation or Combination?
1. A teacher has 12 books and wants to lend out 3 of them to a student. In how many ways can this be
done?
2. A password consists of 4 different letters chosen from the 26-letter alphabet. How many possible
passwords can we try?
3. A manager has 6 tasks that need to be assigned to 6 employees, one task per employee. In how
many ways can the task be assigned?
4. An actuary is reviewing 10 insurance policies and wants to select 3 at random for a detailed audit.
How many different sets of policies can be chosen?
Conditional Probabilities
Conditional probability is what happens when we restrict the sample space and ask a probability
question.
1
For example, if we ask the probability you roll a 4 on a 6-sided die, the answer is 6 . However, if we
rephrase the question as what is the probability that you roll a 4, given that you know you rolled an even
number, then we’ve restricted the sample space to 2,4, and 6.
Conditional Probabilities
Given any two events 𝐴 and 𝐵, with 𝑃 𝐹 > 0, the conditional probability of 𝐴 given 𝐵 can be found using
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
Example: Toss a fair coin twice and define
- A: head on the second toss
- B: head on the first toss
𝑃 𝐴𝐵 =
𝑃 𝐴 𝐵𝑐 =
Conditional Probabilities
Given any two events 𝐴 and 𝐵, with 𝑃 𝐹 > 0, the conditional probability of 𝐴 given 𝐵 can be found using
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
Example: A bowl contains five M&Ms, two red and three blue. Randomly select two candies and define
- A: second candy is red
- B: first candy is blue
𝑃 𝐴𝐵 =
𝑃 𝐴 𝐵𝑐 =
Defining Independence
Two events A and B are independent if and only if
𝑃 𝐴 𝐵 = 𝑃(𝐴) or 𝑃 𝐵 𝐴 = 𝑃 𝐵 .
Otherwise, they are dependent.
We note that
So, if the events A and B are independent, then
Defining Independence
Example: In a certain population, 10% of the people can be classified as being high risk for a heart
attack. Three people are randomly selected from this population. What is the probability that exactly one
of the three are high risk?
Defining Independence
Example: Suppose we have additional information for the previous example. We know that only 49% of
the population are female. Also, of the female patients, 8% are high risk. A single person is selected at
random. What is the probability that it is a high-risk female?
The Law of Total Probability
We say a set of events is exhaustive if their union is the entire sample space.
If a set of events 𝑆1 , 𝑆2 , … , 𝑆𝑘 are mutually exclusive and exhaustive, then to calculate the probability of an
event 𝐴, we calculate
𝑃 𝐴 = 𝑃 𝐴 ∩ 𝑆1 + 𝑃 𝐴 ∩ 𝑆2 + ⋯ + 𝑃 𝐴 ∩ 𝑆𝑘
= 𝑃 𝑆1 𝑃 𝐴 𝑆1 + 𝑃 𝑆2 𝑃 𝐴 𝑆2 + ⋯ + 𝑃 𝑆𝑘 𝑃(𝐴|𝑆𝑘 )
Bayes’ Rule
Given two events A and B, with 𝑃 𝐴 > 0 and 𝑃 𝐵 > 0, we know that
Now, since 𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐵 ∩ 𝐴 , then we have
and we can rearrange to obtain
This is Bayes’ Theorem and it allows us to reverse our conditional probability questions. If you know the
probability of A given B, now we can find the probability of B given A.
A really fun part of statistics history because of how much tea there is surrounding these ideas.
Bayes’ Rule
Another more general way Bayes’ Rule is typically written is
𝑃 𝑆𝑖 𝐴 =
𝑃 𝑆𝑖 𝑃 𝐴 𝑆𝑖
σ𝑘𝑗=1 𝑃 𝑆𝑗
𝑃 𝐴 𝑆𝑗
,
𝑖 = 1, … , 𝑘.
where 𝑆1 , 𝑆2 , … , 𝑆𝑘 are mutually exclusive and exhaustive events.
Each 𝑃(𝑆𝑖 ) is a called a prior probability of 𝑆𝑖 .
𝑃(𝑆𝑖 |𝐴) is called the posterior probability.
What is the denominator in the above Bayes’ Rule?
Bayes’ Rule
Example: From a previous example, we know that 49% of a population are female. Of the female patients,
8% are high risk for heart attack, while 12% of the male patients are high risk. A single person is selected
at random and found to be high risk. What is the probability that it is a male?
Bayes’ Rule
Example: A salesman routinely takes a morning flight from NY to DC. The probability that he flies on
Continental (C) is 0.45; Delta (D) is 0.35; United (U) is 0.2. He prefers the aisle seat and the probability
that he gets one is 10% on Continental, 12% on Delta, and 25% on United.
a) Find the probability he flies United and gets an aisle seat?
b) Find the probability he gets an aisle seat?
c) Suppose he got an aisle seat. What is the probability he flew United?
Bayes’ Rule
Example: A patient goes to see the doctor. The doctor performs a test for HIV which is 99% reliable: That
is, 99% of HIV+ people test positive and 99% of HIV- people test negative. Only 1% of the population in
the country are HIV+. The patient tests positive. What is the probability that the patient actually has HIV?
Using Simulations to Estimate Probability
Some probabilities are so difficult/time consuming to calculate that it is easier to simulate the situation
repeatedly by using a computer or calculator, and observe the relative frequency of interest.
If you simulate the random circumstance n times, and the event of interest occurs X of those n times,
then the estimated probability for the event of interest is 𝑋Τ𝑛 .
Using Simulations to Estimate Probability
[UH] Example 7.30: Getting All the Prizes
A particular brand of cereal contains a prize in each box. Suppose that cereal boxes each contain one of
four prizes and a box is equally likely to contain any one of the four prizes. You would like to collect all four
prizes. If you buy six boxes of cereal, how likely is it that you will get all four prizes?
Estimated probability is:
Actual probability is:
What is the error like? What would happen if we
repeated this simulation?
Flawed Intuitive Judgements about Probability
Specific People vs. Random Individuals
According to the Federal Aviation Administration (http://www.ntsb.gov/aviation/Table6.htm), between 1989
and 2008, there were 64 fatal airline accidents for regularly scheduled flights on U.S. carriers. During that
same time period, there were 227,166,913 flight departures. That means that the relative frequency of fatal
accidents was about one accident per 3.5 million departures.
Based on these kinds of statistics, you will sometimes hear statements like, “The probability that you will be in
a fatal plane crash is 1 in 3.5 million” or “The chance that your marriage will end in divorce is 50%.”
Here are two equivalent, correct ways to restate the aggregate statistics about fatal plane crashes:
•
In the long run, about 1 flight departure out of every 3.5 million ends in a fatal crash.
•
The probability that a randomly selected flight departure ends in a fatal crash is about 1 ⁄ 3,500,000.
If you have had a terrific marriage for 30 years, it is not likely to end in divorce now. Your probability of a divorce
surely is less than the 50% figure often reported in the media. Here are two correct ways to express aggregate
statistics about divorce:
•
In the long run, about 50% of marriages end in divorce.
•
At the beginning of a randomly selected marriage, the probability that it will end in divorce is about .50.
Flawed Intuitive Judgements about Probability
Coincidences
A coincidence is a surprising concurrence of events, perceived as meaningfully related, with no apparent
causal connection.
Here is a famous example that you can use to test your intuition about surprising events. How many
people would need to be gathered together to be at least 50% sure that two of them share the same
birthday (month and day, not necessarily year)?
There are several reasons why people have trouble with this problem. If your answer was somewhere
close to 183, or half the number of birthdays, then you may have confused the question with another one,
such as the probability that someone in the group has your birthday or that two people have a specific
date as their birthday.
Flawed Intuitive Judgements about Probability
Gambler’s Fallacy
Another common misperception about random events is that they should be self- correcting. Another way
to state this is that people think the long-run frequency of an event should apply even in the short run.
This misperception has classically been called the gambler’s fallacy.
The gambler’s fallacy can lead to poor decision making, especially if applied to gambling. Note that the
gambler’s fallacy primarily applies to independent events. The gambler’s fallacy may not apply to
situations in which knowledge of one outcome affects probabilities of the next.
A somewhat different but related misconception is what Tversky and Kahneman (1982) call the belief in
the law of small numbers, “according to which [people believe that] even small samples are highly
representative of the populations from which they are drawn”.
They report that “in considering tosses of a coin for heads and tails, for example, people regard the
sequence HTHTTH to be more likely than the sequence HHHTTT, which does not appear random, and also
more likely than the sequence HHHHTH, which does not represent the fairness of the coin”. Remember
that any specific sequence of heads and tails is just as likely as any other sequence if the coin is fair, so
the idea that the first sequence is more likely is a misperception.
Summary
■ Counting rules can be used to help us determine the number of possible events when calculating
probabilities
■ The probability of event A given event B: 𝑃 𝐴 𝐵 =
𝑃(𝐴∩𝐵)
𝑃(𝐵)
■ If events A and B are independent, then 𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐴 𝑃 𝐵
■ Bayes’ Rule: 𝑃 𝑆𝑖 𝐴 =
𝑃 𝑆𝑖 𝑃 𝐴 𝑆𝑖
σ𝑘
𝑗=1 𝑃 𝑆𝑗 𝑃 𝐴 𝑆𝑗
,
𝑖 = 1, … , 𝑘.