Probability
A deck of cards
Jacks, Queens, and Kings are called Face or Picture Cards.
Ace, 2, 3, , , 10 are called number cards.
What do you think?
You choose one card at random from a deck of 52 cards.
1. What is the prob. of getting a King?
2. What is the prob. of getting a Queen?
3. What is the prob. of getting a King and a Queen?
4. What is the prob. of getting a King or a Queen?
4/52; 4/52; 0/52; 8/52
What do you think?
You choose one card at random from a deck of 52 cards.
1. What is the prob. of getting a Hearts?
2. What is the prob. of getting a Queen?
3. What is the prob. of getting a Queen or a Hearts?
13/52; 4/52; 13/52 + 4/52 – 1/52 = 16/52.
What do you think?
• What is the probability of pulling a King?
• P(K) = 4/52
• If the card I pulled is a face card. What is the probability it is
a King?
• P(K | Face card) = 4/12
70% of the students have a Windows computer and 40%
have a Mac. 20% of the students have both computers.
• A student has a Windows computer. What’s the probability
he also has a Mac?
If there are 100 students, 70 will have a Windows system. 20 of
them will also have a Mac. So, P(Mac given Windows) = 20/70
70 Windows 20 both 40 Macs
4.6
The pass rate of a first-time taker for the bar exam is 70%. The
students can the test one more time, and because this is the 2nd
time, the pass rate now is 80%. Find the probability that a
randomly selected law school graduate becomes a lawyer
(candidates cannot take the exam more than twice).
Projector bulb
• A projector has a bulb whose reliability is 95%. It has a
backup bulb which comes on if the main bulb fails. The
reliability of the backup bulb is 85%. You are taking the
projector to a very critical meeting and are worried
about the projector, and so, want to find the overall
reliability of the projector (bulb)?
Drug user
Stephanie lives in Portage county where 5% of the residents are
drug users.
Stephanie is given a drug test.
The test correctly identifies users 95% of the time.
The test correctly identifies nonusers 90% of the time.
If Stephanie tests positive, what’s the probability she is a drug
user?
Suppose Stephanie moves to Summit county where 20% of the
residents use drugs. If she tests positive, what is the probability
now that she is a drug user?
Will it be the same or different?
Chapter 5
Bayes’ Theorem – the formula
General Form of Bayes’ Theorem
• A generalization of Bayes’s Theorem allows event B to have as many
mutually exclusive and collectively exhaustive categories as we wish
(B1, B2, … Bn) rather than just two dichotomous categories (B and B').
P ( A | Bi ) P ( Bi )
P ( Bi | A)
P ( A | B1 ) P ( B1 ) P ( A | B2 ) P ( B2 ) ... P ( A | Bn ) P ( Bn )
5-10
Terminology
• Experiment
• Any well-defined action (Toss a coin)
• Outcome
• The result of performing an experiment (Heads or Tails)
• Random Variable
• An expression whose value is the outcome of an experiment
• Sample Space
• The set of all possible outcomes associated with a given experiment
• Event
• The set of outcomes each having a given characteristic or attribute
(getting an even number)
Slide 11
Random Experiment…
• An experiment is a procedure that is
• carried out under controlled conditions, and
• executed to discover an unknown result.
• An experiment that results in different outcomes even
when repeated in the same manner every time is a
random experiment.
Experiment Outcomes
Flip a coin Heads, Tails
Exam Marks Numbers: 0, 1, 2, ..., 100
Assembly Time t > 0 seconds
Course Grades F, D, C, B, A
Sample Space…
A list of exhaustive and mutually exclusive outcomes is called a sample space
and is denoted by S. The outcomes are denoted by O1, O2, …, Ok
• We represent the sample space as: S = {O1, O2,…, Ok}
The probability of any outcome is between 0 and 1
i.e. 0 ≤ P(Oi) ≤ 1 for each i, and
• The sum of the probabilities of all outcomes equals 1
i.e. P(O1) + P(O2) + … + P(Ok) = 1
S is discrete if it consists of a finite or countable infinite set
of outcomes.
S is continuous if it contains an interval of real numbers.
M&M candies
If you draw an M&M candy at random from a bag, the candy will have one
of six colors. The probability is based on the manufacturing process:
Color Brown Red Yellow Green Orange Blue
Probability 0.3 0.2 0.2 0.1 0.1 ?
What is the probability that an M&M chosen at random is blue?
S = {brown, red, yellow, green, orange, blue} = Sample Space
P(S) = P(brown) + P(red) + P(yellow) + P(green) + P(orange) + P(blue) = 1
P(blue) = 1 – [P(brown) + P(red) + P(yellow) + P(green) + P(orange)]
= 1 – [0.3 + 0.2 + 0.2 + 0.1 + 0.1] = 0.1
What is the probability that a random M&M is any of red, yellow, or orange?
P(red or yellow or orange) = P(red) + P(yellow) + P(orange)
= 0.2 + 0.2 + 0.1 = 0.5
Complement Rule…
• The complement of an event A is the event that occurs when A
does not occur.
• The complement rule gives us the probability of an event NOT
occurring. That is:
• P(AC) = 1 – P(A)
• P(A) = 1 – P(AC)
• For example, in the simple roll of a die, the probability of the
number “1” being rolled is 1/6. The probability that some
number other than “1” will be rolled is 1 – 1/6 = 5/6.
Mutually Exclusive Events
• Events A and B are mutually exclusive (or disjoint) if their
intersection is the null set that contains no elements.
What is the probability of getting an
King and a Queen when you pull a
card from a deck? Are the two
events mutually exclusive?
Are the events of getting a Queen
and a Hearts mutually exclusive?
5A-16
Chapter 5
Collectively Exhaustive Events
There can be more than two mutually exclusive, collectively exhaustive
events, as illustrated below. For example, a Wal-Mart customer can
pay by credit card (A), debit card (B), cash (C), or
check (D).
Question: If you can pay
partly by credit card and
partly by cash, will the
events be mutually
exclusive? No.
If you can pay using food
stamps, will the 4 events
be collective exhaustive?
No.
5-17
Collectively Exhaustive Events
A = aces; B = black cards; D = diamonds; H = hearts
Are events A, B, D, and H collectively exhaustive?
Are they mutually exclusive?
Are events B, D, and H collectively exhaustive?
Are they mutually exclusive?
Business Statistics: A First Course, 5e © 2009 Prentice-Hall, Inc.
Probability
Three approaches to assigning probability:
Approach Example
Classical There is a 50 % probability of heads on a coin flip. The probability
is 1/6 that a 7 will be obtained when rolling 2 die. Here we make
certain assumptions (such as equally likely, independence) about the
situation.
Relative Based on previous records, there is a 12% chance that I’ll sell a
frequency house this week. These calculations are based on historical data.
Subjective There is a 67% chance that LA Rams will win Superbowl this year.
Agree? Such assumptions are based on a variety of facts but can’t
always be verified.
5A-19
Classical Method of Assigning Probabilities
Good when an experiment has equally likely outcomes.
What is the probability of getting a Queen from a deck
of cards?
Of a Hearts?
Of a Queen of Hearts?
Of a total of 5 when you role two dice?
Answers: 4/52; 13/52; 1/52; 4/36
Law of Large Numbers
• As the number of times that an experiment is repeated
increases, the relative frequency (proportion) of a particular
outcome tends to approach the probability of the outcome.
When you toss a coin, you expect to get a Head half the time
and a Tail, half the time. This may not be the case when you
toss the coin for 3 or 4 times. But if you toss it a 1,000 times,
you will be very close to 50% Heads and 50% Tails. Even
closer if you toss 10,000 times.
Relative frequency – another example
If on a shopping spree, the following percentages were recorded for
the four methods of payments.
credit card: 32% What is the
probability that the
debit card: 15% next person in line
will pay by a credit
cash: 35% card?
check: 18%
Sum = 100%
Joint, Marginal, Conditional Probability…
• We study methods to determine probabilities of events that result
from combining other events in various ways.
• Lets us look at salary gains obtained after getting an MBA degree
from schools presented in a contigency table.
Contingency Tables
Example: Salary Gains and MBA Tuition
• Consider the following cross-tabulation table for n =
67 top-tier MBA programs:
5B-24
Contingency Tables
Marginal Probabilities
• The marginal probability of a single event is found by dividing
a row or column total by the total sample size.
P(S2) = 33/67 = .4925 ; P(T2) = 19/67
P(T1) = 16/67 = .2388
5B-25
Contingency Tables
Joint Probabilities
• A joint probability represents the intersection of two events in a
cross-tabulation table.
• Consider the joint event that the school has low tuition and
large salary gains denoted as P(T1 S3)).
P(T1 S3) = 1/67 = .0149
5B-26
Contingency Tables
Conditional Probabilities
• Found by restricting to a single row or column (the condition).
• For example, knowing that a school’s MBA tuition is high (T3), we
would restrict ourselves to the third row of the table.
• Find the probability that the salary gains are small (S1) given that
the MBA tuition is large (T3).
P(S1 | T3) = 5/32 = .1563
5B-27
Conditional Probability…
• Conditional probability is used to determine how two
events are related; that is, we can determine the probability
of one event given the occurrence of another related event.
• Conditional probabilities are written as P(A | B) and read as
“the probability of A given B” and is calculated as:
Independence…
• One of the objectives of calculating conditional
probability is to determine whether two events
are related.
• In particular, we would like to know whether
they are independent, that is, if the probability
of one event is not affected by the occurrence
of the other event.
• Two events A and B are independent if
P(A|B) = P(A) or P(B|A) = P(B)
Independence
4.30
Union of events
4.31
P( A B C ) P( A) P ( B) P(C )
P( A B) P( A C ) P( B C )
P( A B C )
A B =
A B +
A B +
A B
C C C C
A B A B A B
- - -
C C C
+ A B
C What is P(Q U K U Hearts)?
Slide 32
Multiplication Rule…
• The multiplication rule is used to calculate the joint probability
of two events. It is based on the formula for conditional
probability.
P(A and B) = P(A | B)•P(B)
Likewise, P(A and B) = P(B | A) • P(A)
If A and B are independent events, then P(A and B) = P(A)•P(B)
Multiplication Rule…
Suppose you toss a coin two times. Does the second toss outcome depend
on the 1st toss outcome? No as the tosses are independent.
That means, P(H | H) = P(H), P(H | T) = P(H), P(T | H) = P(T)
From our multiplication formula, we have
P(A and B) = P(A | B)•P(B)
That is, P(H and T) = P(H | T) • P(T)
But because the tossing events are independent, we can say
P(H and T) = P(H) x P(T)
So, if you toss 4 coins, what is the probability of getting 4 heads?
Answer: .5 x .5 x .5 x.5
Reliability of independent events
• To illustrate system reliability, suppose a Web site has 2
independent file servers. Each server has 99% reliability. What is
the total system reliability? Let,
`
F1 be the event that server 1 fails
F2 be the event that server 2 fails
5-35
Chapter 5
What is the probability that both the systems will fail?
P(F1 F2 ) = P(F1) P(F2) = (.01)(.01) = .0001
So, the probability that both servers are down
is .0001 = .01%
The probability that one or both servers is “up” is,
that is, no server is down is:
1 - .0001 = .9999 or 99.99%
5-36
Example
A graduate statistics course has 7 male and 3 female
students. The professor will allow a student to answer only 1
question.
What is the probability that the two students chosen
are female?
Probability of 1st being female = 3/10 = P(F)
If the 1st was a female, probability of 2nd student being a
female = P(F | F) = 2/9
Thus, we want to answer the question: what is P(F and F)?
P(F and F) = P(F)•P(F|F) = (3/10)(2/9) = 6/90 = .067
• “There is a 6.7% chance that the professor will choose two
female students from her grad class of 10.”
• Find P(M and F) and P(M and M).
Example – changed rules
• The professor has changed the rules. Now, anyone can answer any
question any number of times.
• What is the probability that the two students chosen are female?
• Notice that now P(F|F) = P(F) = 3/10, P(M|F) = P(M) = 7/10, and so
on. This is like tossing of a coin where earlier outcome has no effect
on the later outcome.
• So, P(F and F) = P(F)•P(F) = (3/10)(3/10) = 9/100 = .09 = 9%
Bayes’ Theorem
Often we begin probability analysis with initial or
prior probabilities.
Then, from a sample, special report, or a product
test we obtain some additional information.
Given this information, we calculate revised or
posterior probabilities.
Bayes’ theorem provides the means for revising the
prior probabilities.
Application
Prior New Posterior (revised)
of Bayes’
Probabilities Information Probabilities
Theorem
Chapter 5
Bayes’ Theorem – the formula
General Form of Bayes’ Theorem
• A generalization of Bayes’s Theorem allows event B to have as many
mutually exclusive and collectively exhaustive categories as we wish
(B1, B2, … Bn) rather than just two dichotomous categories (B and B').
P ( A | Bi ) P ( Bi )
P ( Bi | A)
P ( A | B1 ) P ( B1 ) P ( A | B2 ) P ( B2 ) ... P ( A | Bn ) P ( Bn )
5-41
• Bayes Theorem in Medicine
suppose that a patient shows up in an emergency room with a severe
headache, muscle aches and fatigue. These symptoms are consistent
with both Lyme disease (= H), which is rare in the area, and influenza
(= H*), which is more common. We are about to learn whether the patient
has a fever (= E). The known statistics for people exhibiting the patient's
symptoms are given in the table below (not available).
While only 3% of people have Lyme disease, this illness is accompanied by
fever 90% of the time. The much larger group of patients (about 27%) who
have the flu are feverish only 70% of the time. Somewhat paradoxically,
patients with both the flu and Lyme disease present with fevers slightly less
often than patients with Lyme disease alone (perhaps because flu-induced
fevers tend to show up more rapidly than those caused by Lyme disease).
Bayes Theorem – Example
Bayes Theorem – Example (cont.)
Bayes Theorem – Example (cont.)
Bayes Theorem – Example (cont.)
Drug user
Joe lives in Portage county where 5% of the residents are drug
users.
Joe is given a drug test.
The test correctly identifies users 95% of the time.
The test correctly identifies nonusers 90% of the time.
If Joe tests positive, what’s the probability he is a drug user?
Drug user
Joe moves to Portage county where 20% of the residents are drug
users.
Joe is given a drug test.
The test correctly identifies users 95% of the time.
The test correctly identifies nonusers 90% of the time.
If Joe tests positive, what’s the probability he is a drug user?
Pregnancy test . . . Bayes’ theorem
Suppose 60% of the women who purchase pregnancy testing
kits are actually pregnant. The kits are not accurate, however.
A kit may give a positive result even if the woman is not
pregnant (false positive) , or a negative result even when she
is pregnant (false negative).
Positive test result Negative test result
Actually pregnant 96% 4%
Not pregnant 1% 99%
If someone is buying a kit, there is a 60% chance she is pregnant.
This is called Prior probability. Suppose the kit shows positive. So,
we have this new information. Now what is the probability she is
pregnant? This is called Posterior or Revised probability.