3 Conditional Probability - University of Notre Dame

3
Conditional Probability
Question: What are the chances that a college student chosen at random from the U.S.
population is a fan of the Notre Dame football team? Now, if the person chosen is a
student at Notre Dame, what are the chances that they are a fan of the Notre Dame
football team? Does the additional information change the probability?
3.1
Definitions:
A Conditional Probability, denoted by P(A|B)
3.2
Example:
Experiment by drawing a card at random from a standard deck of 52 cards. Let A be
the event that the card is a heart. Let B be the event that the card is red. Calculate:
1. P(A)
SOLUTION:
2. P(B)
SOLUTION:
3. P(A|B)
SOLUTION:
1
3.3
Example:
The table below displays information for 4,304 individuals, 18 years or older, interviewed
during an illegal drug use, tobacco, and alcohol survey that took place in Nebraska in
1997. The respondents have been classified according to their answer to the following
questions:
1. Have you smoked more than 100 cigarettes in your life? If the answer is ”yes”, the
individual is classified as an ”Ever smoker” (could be former or current smoker), if
the answer is ”no” the individual is classified as ”Never a smoker”
2. Have you used marijuana at least once in your life?
Let S be the event that the respondent has been a smoker, S C be the event he hasn’t
ever been a smoker, M be the event he has tried marijuana, and M C be the event that
he has never tried marijuana. Assume one individual is randomly selected from the 4,304
individuals in the table.
1. What is the probability that a person has used marijuana given that the person
has been a smoker?
SOLUTION:
2. What is the probability that a person has used marijuana given that the person
has not been a smoker?
SOLUTION:
2
3. What is the probability that the person has been a smoker, given that they have
used marijuana?
SOLUTION:
3.4
Multiplication Law and Independent Events
In the previous section we introduced how to calculate a conditional probability,
P(A|B) =
P(A ∩ B)
P(B)
This can be rearranged to get the equation
P(A|B)P(B) = P(A ∩ B)
3.5
Examples:
The Jawas have ten droids, 4 of which are good and the rest are bad. If Uncle Owen
selects two droids without returning them, what is the probability that both will be
good?
SOLUTION:
The events A and B are independent if the occurrence of B does not alter the probability
that A has also occurred. That is, A and B are Independent if
3
Remark:
3.6
Example:
1. Define an experiment by drawing a card at random from a standard deck of 52
cards.
(a) Let A be the event that the card is a heart. Let B be the event that the card
drawn is red. Are A and B independent events?
SOLUTION:
(b) Let D be the event that the card is a King, Queen, or Jack (face cards). Are
D and B independent events.
SOLUTION:
2. Example 5.6 on page 211: Suppose that switches A and B in a two-component
series system are closed about 60% and 80% of the time, respectively, and they
operate independently. Find the probability the circuit is closed (i.e, both A and
B are closed).
SOLUTION:
4
3. Example 5.7 on page 212: Suppose that 99.5% of the parts purchased from a
certain vendor are good (i.e., not defective). If 50 parts are purchased, what is the
probability that at least 1 in defective?
SOLUTION:
3.7
Bayes’ Theorem
Bayes rule is named for Reverend Thomas Bayes, an English Presbyterian Minister who
lived in the 1700’s. The rule converts and an unknown conditional probability, say
P(B|A), to one involving a known conditional probability, say P(A|B). Thus, in the past
it has been called the rule of ”inverse probability”.
Rule of Total Probability is for k mutually exclusive events, B1 , B2 , ..., Bk , such that
P(B1 ) + P(B2 ) + ... + P(Bk ) = 1, and given an observed event A,
5
3.8
Examples:
Let’s assume on a given day in South Bend there is a 0.50 chance that it is cloudy, and
0.20 chance that it is rainy, and a 0.30 chance that it is sunny. Furthermore, given that it
is rainy there is a 0.90 chance that I will take my umbrella, given that it is cloudy there
is a 0.50 chance I will take my umbrella, and given that it is sunny there is a 0.01 chance
I will take my umbrella. On any day, what is the chance that I will take my umbrella?
SOLUTION:
The Rule of Total Probability can be applied to Bayes’ Theorem when for k mutually
exclusive events, B1 , B2 , ..., Bk , such that P(B1 ) + P(B2 ) + ... + P(Bk ) = 1, and given an
observed event A,
6
3.9
Examples:
1. Referring to the previous example, find the probability that it is rainy, given that
I have my umbrella.
SOLUTION:
2. The HIV virus occurs at a rate of 0.007 among US adults (this is called the ”prevalence”). Tests for HIV (such as the ELISA test) will yield a positive result 99.7%
of the time, given that the patient actually has HIV (this is called the sensitivity of
the test). Given that the patient does not have HIV, the test will yield a negative
result 98.5% of the time.
(a) Translate the above information into (conditional and unconditional) probabilities.
SOLUTION:
7
(b) If you were in the position of actually taking an HIV test, what probability
would you be interested in knowing?
SOLUTION:
(c) Do you think this probability will be small or large?
SOLUTION:
(d) Calculate the probability referred to in parts 2 and 3.
SOLUTION:
8
(e) Can you explain the result?
SOLUTION:
3. Create a Tree Diagram based on the HIV Testing in the previous example.
SOLUTION:
9
4
Random Variables
4.1
Definitions:
The concept of random variable is very important in probability and statistics. Different
texts will define random variables in different ways. Here are some examples in varying
degrees of mathematical formality (These definitions are all saying basically the same
thing.):
• Very Formal:
• Somewhat Formal:
• Informal:
Remark:
10
4.2
Examples
Example 5.12 on page 220: The reliability of a product at time t, denoted R(t), is
defined as the probability that it is still working correctly after t units of time. The time
X until a product fails often follows an exponential distribution with parameter λ. The
mean of the distribution, µ = 1/λ, is called the mean time before failure (MTBF). R(t)
may be calculated from
Z ∞
λe−λx dx = e−λt
R(t) = P(X > t) =
t
1. Suppose the lifetime of a certain product follows an exponential distribution with
an MTBF of 10,000 hours. Find the proportion of such products that fail before
20,000 hours.
SOLUTION:
2. Find the probability the product fails before 20,000 hours.
SOLUTION:
11
5
Sampling Distributions
5.1
Definitions:
1. A Parameter
2. A Sample Statistic
3. A sampling distribution
Population Parameter
Mean
Variance
Standard Deviation
Proportion
12
Sample Statistics
5.2
Examples:
In 2013, Gallup Poll found that 69% of Americans believe ”Yes, there is solid evidence
for global warming.”
1. Identify the parameter and statistic in this scenario.
SOLUTION:
2. What if we took many samples and made a histogram of each sample statistic:
What would this look like?
SOLUTION:
13
6
Describing Sample Distributions
6.1
Definitions:
1. The mean or expected value of the sampling distribution for x¯ is µ, the population
mean, which is written as:
2. The standard error, denoted as σx¯ =
distribution of x¯.
√σ ,
n
is the standard deviation of the sampling
3. Bias
Remark:
6.2
The Central Limit Theorem
The Central Limit Theoream states that any sampling distribution of the mean or
x¯ can be approximated by a normal distribution if:
1.
2.
14
i.e. That is, suppose that a sample is obtained containing a large number of observations,
each observation being randomly generated in a way that does not depend on the values
of the other observations, and that the arithmetic average of the observed values is
computed. If this procedure is performed many times, the central limit theorem says
that the computed values of the average will be distributed according to the normal
distribution (commonly known as a ”bell curve”). (WIKI)
6.3
Examples:
Exercise 55 on page 242: Suppose the sediment density (in gm/cm3 ) of specimens
from a certain region is normally distributed with a mean of 2.65 and standard deviation
of 0.85.
1. In a random sample of 25 such specimens, what is the probability the sample
average sediment density is at most 3.00? Between 2.65 and 3.00?
SOLUTION:
2. How large a sample would be required to ensure that the first probability in part
(1) is at least 0.99?
SOLUTION:
15
6.4
Sampling Distribution of the Sample Proportion
1. Recall that the sample proportion p is the estimate of the population proportion
π. The formula is: where x is the number of elements in the sample that possess
the characteristic of interest, and n is the sample size.
Similar x¯, we can describe the shape of p and p is considered an unbiased estimator.
This means the expected value of p estimates the population proportion π.
2.
3.
16
6.5
Examples:
Exercise 57 on page 242: Only 5% of a large population of 100 ohm gold band resistors
have resistances that exceed 105 ohms.
1. For samples of size 100 from this population, describe the sampling distribuiton of
the sample proportion of resistors that have resistors that have resistances in excess
of 105 ohms.
SOLUTION:
2. What is the probability that the proportion of resistors with resistance exceeding
105 ohms in a radnom sample of 100 will be less than 3%?
SOLUTION:
17