7.5: Conditional Probability Section 7.5-7.6

advertisement
Notes for math 141
Section 7.5-7.6
Finite Mathematics
7.5: Conditional Probability
Example 1: A survey is done of people making purchases at a gas station: buy drink
(D) no drink (Dc) Total
Buy drink(D)
Buy Gas (G)
20
c
No Gas (G )
10
Total
30
No drink(Dc )
15
5
20
Total
35
15
50
a) What is the probability that a person buys a drink?
b) What is the probability that a person doesnt buy a drink?
c) What is the probability that a person buys gas and a drink?
d) What is the probability that a person buys gas but not a drink?
e) What is the probability that a person who buys a drink also buys gas?
f) What is the probability that a person who doesnt buy a drink buys gas?
1
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Definition: If E and F are events in an experiment and P (E) ≠ 0, then the conditional probability that the event F will occur given that the event E has already
occurred is
P (E ∩ F )
P (F ∣E) =
.
P (E)
Definition: The Product Rule is found by rearranging the above formula as follows:
P (E ∩ F ) = P (E)P (F ∣E).
2
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 2: Lets use a tree diagram to help us understand the product rule:
Example 3: At a party, 13 of the guest are women. Seventy-five percent of the women
wore sandals and 40 % of the men wore sandals.
a) What is the probability that a person chosen at random at the party is a man
wearing sandals?
b) What is the probability that a person chosen at random is wearing sandals?
3
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 4: Consider drawing 3 cards from a standard deck of 52 cards without
replacement.
a) What is the probability that the 3 cards are hearts?
b) What is the probability that the third card drawn is a heart given the first two
cards are hearts?
4
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Independent events
Definition: If A and B are independent events, then P (A) = P (A∣B) and P (B) =
P (B∣A). Thus, two events A and B are independent if and only if
P (A ∩ B) = P (A) ⋅ P (B).
Example 5: A medical experiment showed the probability that a new medicine was
effective was .75, the probability of a certain side effect was .4, and the probability of
both occuring was .3. Are the events independent?
5
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 6: Meghan and Natalie go to Freebirds. After ordering their food they get
to roll a pair of fair dice for a chance to get their meal for free. Each die has six sides
with one of the sides having a backwards F on it. If both of the dice land on the
backwards F, you win. What is the probability that at least one of the girls wins?
6
Notes for math 141
Section 7.5-7.6
Finite Mathematics
7.7 Bayes Theorem
Example 7: If we are given information about P (F ∣E), can we find P (E∣F )?
Definition: The above formula is known as Bayes Theorem.
7
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 8: We are to choose a marble from a cup or a bowl. We flip a fair coin to
decide whether to choose from the cup or the bowl. The bowl contains 1 red and 2
green marbles. The cup contains 3 red and 2 green marbles. What is the probability
that a marble came from the bowl given that it is red?
Example 9: A crate contains 7 basketballs and 4 footballs. A bag contains 4 basketballs and 2 footballs. A ball is drawn at random from the crate and put in the
bag. A ball is then drawn from the bag. Given that a basketball was chosen from the
bag, what is the probability that a football was drawn from the crate?
8
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 10: Two cards are drawn in succession without replacement from a standard deck of 52 cards. What is the probability that the first card is a face card given
that the second card is an ace?
Example 11:Complete the following tree diagram and use it to answer the following
questions:
a) Find P (E).
b) Find P (A ∪ D).
c) Find P (B ∩ E).
d) Are E and B independent events?
9
Notes for math 141
Section 7.5-7.6
Finite Mathematics
8.1:Random Variables and Histograms
Definition: A random variable is a rule that assigns a number to each outcome of
an experiment.
Example 1: Suppose we toss a coin three times. Then we could define the random variable X to represent the number of times we get tails.
Example 2: Suppose we roll a die until a 5 is facing up. Then we could define
the random variable Y to represent the number of times we rolled the die.
Example 3: Suppose a flashlight is left on until the battery runs out. Then we
could define the random variable Z to represent the amount of time that passed.
10
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Types of Random Variables
1. A finite discrete random variable is one which can only take on a limited number
of values that can be listed.
2. A infinite discrete random variable is one which can take on an unlimited
number of values that can be listed in some sort of sequence.
3. A continuous random variable is one which takes on any of the infinite number
of values in some interval of real numbers. (i.e. usually measurements)
11
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 4: Classify each of the following random variables as finite discrete, infinite
discrete, or continuous and list/describe the possible values for the random variable.
a) A drawer contains 15 red pens, 8 blue pens, and 5 black pens. An experiment
consists of drawing pens out of the drawer with replacement until a red pen is drawn.
Let X represent the number of pens drawn.
b) An experiment consists of randomly selecting 3 pens without replacement from
a conveyor belt. Let Y represent the total weight (in ounces) of the selected pens.
c) An experiment consists of randomly selecting 3 pens with replacement from a
drawer that contains 15 red pens, 8 blue pens, and 5 black pens. Let Z represent the
number of red pens drawn.
12
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 5: Referring to Example 1, find the probability distribution of the random
variable X.
Example 6: An experiment consists of randomly selecting a sample of 3 grapes out
of a bowl that contains 20, of which 8 are rotten. Let X represent the number of
rotten grapes in the sample. Find the probability distribution of X.
13
Notes for math 141
Section 7.5-7.6
Finite Mathematics
Example 7: Blue Baker prides itself on having the best chocolate chips cookies in
town. To be sure each cookie has the right number of chocolate chips, a few cookies
are selected from each batch and the number of chocolate chips in each cookie is
counted. This is done for several days and the following results were found:
Number of Cookies
2 4 5
Number of Chocolate Chips 8 11 12
6 8
13 14
Identify the random variable X in this experiment and find the probability distribution
of X.
14
Notes for math 141
Section 7.5-7.6
Finite Mathematics
We use histograms to represent the probability distributions of random variables.
We place the possible values for the random variable X on the horizontal axis. We
then center a bar around each x value and let its height be equal to the probability
of that x value
Example 8: Referring to Example 7,
a) Draw the histogram for the random variable X
b) Find P (X ≥ 12)
15
Download