Basics of Probability Lecture
Basics of Probability Lecture
Basics of Probability Lecture
4-1
Deterministic Models and
Random or Probabilistic Models.
4-2
What is probability
4-3
Basic Probability Concepts
4-4
Some examples
■ Tossing a Coin
■ When a coin is tossed, there are two possible
outcomes:
■ heads (H) or tails (T)
■ We say that the probability of the coin landing H
is ½ and the probability of the coin landing T is
½.
4-5
Example: the chances of rolling a "4" with a die
4-6
Assessing Probability
probability of occurrence
Assuming
all
outcomes 2. empirical probability
are
equally
likely probability of occurrence
3. subjective probability
4-7
Example of a priori probability
4-8
Example of empirical probability
4-9
Events
■ Simple event
■ An event described by a single characteristic
■ e.g., A red card from a deck of cards
■ The activity that produces such an event is referred to in
probability theory as an experiment.
■ Joint event
■ An event described by two or more characteristics
■ e.g., An ace that is also red from a deck of cards
■ Complement of an event A (denoted A’)
■ All events that are not part of event A
■ e.g., All cards that are not diamonds
4-10
Sample Space
The Sample Space is the collection of all
possible events
e.g. All 6 faces of a die:
4-11
4-12
Visualizing Events
■ Contingency Tables
Ace Not Ace Total
Black 2 24 26
Red 2 24 26
Total 4 48 52
Total 4 48 52
P(Ace) = 4 / 52
4-14
Definition: Joint Probability
■ Joint Probability refers to the probability of an
occurrence of two or more events (joint event).
■ ex. P(Ace and Red)
■ ex. P(Black and Not Ace)
Ace Not Ace Total
4-16
Collectively Exhaustive Events
■ When a list of the possible events that can result
from an experiment includes every possible
outcome, the list is said to be collectively exhaustive.
■ example:
A = aces; B = black cards;
C = diamonds; D = hearts
4-18
Computing Joint and
Marginal Probabilities
4-19
Joint Probability Example
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
4-20
Marginal Probability Example
P(Ace)
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
4-21
Marginal & Joint Probabilities In A
Contingency Table
Event
Event B1 B2 Total
A1 P(A1 and B1) P(A1 and B2) P(A1)
A2 P(A2 and B1) P(A2 and B2) P(A2)
4-22
Axioms of Probability
4-23
Mutually Exclusive
A and B
A
B A B
A B
1
4
2
A J♦ 9♥ 2♥ B
3♥ 10♥
J♠ J♥ A♥ 7♥
K♥ 4♥
J♣ 5♥ 8♥
6♥ Q♥
Because the card can be a Jack and a heart at the same time,
the events are not mutually exclusive.
The Addition Rule
The probability that event A or B will occur is given by
P (A or B) = P (A) + P (B) – P (A and B ).
If events A and B are mutually exclusive, then the rule can be
simplified to P (A or B) = P (A) + P (B).
Example:
You roll a die. Find the probability that you roll a number less than 3
or a 4.
The events are mutually exclusive.
P (roll a number less than 3 or roll a 4)
= P (number is less than 3) + P (4)
The Addition Rule
Example:
A card is randomly selected from a deck of cards. Find the probability
that the card is a Jack or the card is a heart.
The events are not mutually exclusive because the Jack of
hearts can occur in both events.
4-32
ADDITION RULE FOR
MUTUALLY EXCLUSIVE EVENTS
4-33
General Addition Rule Example
4-34
4-35
4-36
Copyright ©2011 Pearson Education 4-37
Multiplication Rule
4-38
Example
4-39
Multiplication Rule
Example:
Two cards are selected, without replacement, from a deck. Find
the probability of selecting a diamond, and then selecting a spade.
Example:
A die is rolled and two coins are tossed.
Find the probability of rolling a 5, and flipping two tails.
P (rolling a 5) =
4-44
Multiplication Rules
4-45
Probability Summary So Far
■ Probability is the numerical measure
of the likelihood that an event will 1 Certain
occur
■ The probability of any event must be
between 0 and 1, inclusively
0 ≤ P(A) ≤ 1 For any event A 0.5
■ The sum of the probabilities of all
mutually exclusive and collectively
exhaustive events is 1
0 Impossible
If A, B, and C are mutually exclusive and
collectively exhaustive
4-46
Examples
The conditional
probability of B given
that A has occurred
Example:
There are 5 red chip, 4 blue chips, and 6 white chips in a basket.
Two chips are randomly selected. Find the probability that the
second chip is red given that the first chip is blue. (Assume that
the first chip is not replaced.)
Because the first chip is selected and not replaced, there are
only 14 chips remaining.
P (selecting a red chip|first chip is blue)
Conditional Probability
Example:
100 college students were surveyed and asked how many hours a week
they spent studying. The results are in the table below. Find the
probability that a student spends more than 10 hours studying given
that the student is a male.
Less then More than
5 5 to 10 10 Total
Male 11 22 16 49
Female 13 24 14 51
Total 24 46 30 100
The sample space consists of the 49 male students. Of these 49,
16 spend more than 10 hours a week studying.
P (more than 10 hours|male)
Independent Events
CD No CD Total
AC 0. 0. 0.
2
0. 5
0. 7
No AC 0.
Total 2
0. 1
0. 3
4 6 1.0
4-59
Application of Bayes’ Theorem
Thus:
P(A1) = .65 and P(A2) = .35
Quality levels differ between suppliers
Percentage Percentage
Good Parts Bad Parts
Supplier 1 98 2
Supplier 2 95 5
A1
B
(A1, B)
A2 G (A2, G)
B
(A2, B)
Each of the experimental
outcomes is the intersection of 2
events. For example, the
probability of selecting a part
from supplier 1 that is good is
given by:
Probability Tree for Step
Two-Supplier
2
Example
Step 1 Probability of
Condition
Supplier Outcome
P(G | A1)
.98
P(A1) P(B | A1)
.65 .02
(4.14)
(4.15)
The probability of selecting a bad
part is found by adding together
the probability of selecting a bad
part from supplier 1 and the
probability of selecting bad part
from supplier 2.
That is:
(4.16)
Bayes’ Theorem for 2 events
By substituting equations (4.15) and (4.16) into
(4.14), and writing a similar result for P(B | A2), we
obtain Bayes’ theorem for the 2 event case:
Do the Math
Bayes’ Theorem
Tabular Approach to Bayes’ Theorem—
2-Supplier Problem
a. P(S1) = .5
b. P(B | S1) = .75
c. Use Bayes’ theorem to compute the posterior probability that a
request for information indicates a successful bid.
Bayes’ Theorem Example
Sum = 0.36
4-77
Counting Rules
4-78
Learning Objective
4-79
Counting Rules
■ Rules for counting the number of possible
outcomes
■ Counting Rule 1:
■ If any one of k different mutually exclusive and
collectively exhaustive events can occur on each of
n trials, the number of possible outcomes is equal to
kn
■ Example
■ If you roll a fair die 3 times then there are 63 = 216 possible
outcomes
■ Counting Rule 2:
■ If there are k1 events on the first trial, k2 events on
the second trial, … and kn events on the nth trial, the
number of possible outcomes is
(k1)(k2)…(kn)
■ Example:
■ You want to go to a park, eat at a restaurant, and see a
movie. There are 3 parks, 4 restaurants, and 6 movie
choices. How many different possible combinations are
there?
■ Answer: (3)(4)(6) = 72 different possibilities
Copyright ©2011 Pearson Education 4-81
Counting Rules
(continued)
■ Counting Rule 3:
■ The number of ways that n items can be arranged in
order is
n! = (n)(n – 1)…(1)
■ Example:
■ You have five books to put on a bookshelf. How many
different ways can these books be placed on the shelf?
■ Example:
■ You have five books and are going to put three on a
bookshelf. How many different ways can the books be
ordered on the bookshelf?
■ Counting Rule 5:
■ Combinations: The number of ways of selecting X
objects from n objects, irrespective of order, is
■ Example:
■ You have five books and are going to select three are to
read. How many different combinations are there, ignoring
the order in which they are selected?
4-84
Starter 6.0.1
■ When order does not matter, ABC is the same as ACB (etc.), so
there are only 4 combinations in the 24 permutations.
■ They can be seen in the 4 columns
■ Notice that there are 3! (which is r!) permutations of each
combination.
■ They can be seen in the 6 rows
■ So to get the number of combinations of n objects taken r at a time,
divide permutations by r!
■ The formula is
Examples