STAT 211 Topic 2
Lecture 3
« previous | Tuesday, January 25, 2010 | next »
Probability
Sample Space
All possible outcomes of an experiment:
- EX flipping a coin:
- EX rolling a die:
Event
Any subset of outcomes contained in sample space
- EX flipping a coin: Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle E=\{H\}, \{T\}, \{H,T\}, ...}
Set Theory
For two events Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B}
- Union (Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A \cup B} )
- all outcomes that are in A, B, or both
- Intersection(Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A \cap B} )
- all outcomes that are in A and B
- Complement (Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A'} )
- all outcomes that are not in A
- Mutually Exclusive
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A \cap B=\{\}}
Properties
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 0 \le P(A) \le 1}
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P({}) = 0, P(S) = 1}
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A') = 1-P(A)}
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A \cup B) = P(A) + P(B) - P(A \cap B)}
- If A and B are mutually exclusive, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A \cup B) = P(A) + P(B)}
Example
Probability of stopping at first light is 0.4. Probability of stopping at second light is 0.5. Probability of stopping at at least one light is 0.6:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} P(A) & = 0.4\\ P(B) & = 0.5\\ P(A \cup B) & = 0.6\\ P(A \cap B) & = 0.3\\ P(A \cup B') & = 0.1\end{align}}
Equally Likely Outcomes
If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle N} is number of possible outcomes and Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} is event, then Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A)=\frac{N(A)}{N}}
Conditional Probability
Probability of event Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A} given event Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} has occurred:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A|B) = \frac{P(A \cap B)}{P(B)}}
Lecture 4
Thursday, January 27, 2011
Sample Warm-up Problem
Jane is taking a flight. Chance that she will sit in front row is .4; chance that her flights will be delayed is .3; chance that she willl sit in front row and flight is on time is .2:
(Draw a venn diagram)
We know:
- A: sits in front row = .4
- B: flight is delayed = .3
- A∩B': front and not delayed = .2
We can find:
- P(A ∩ B) = P(A) − P(A∩B') = .2
- P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = .5
- P(A' ∩ B') = P( (A ∪ B)' ) = 1 - P(A ∪ B) = .5
- P(B' | A) = P(B' ∩ A) ÷ P(A) = 0.2 ÷ 0.4 = 0.5
- P(A' | B) = P(A' ∩ B) ÷ P(B) = 0.1 ÷ 0.3 = 1/3
Independent Events
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align}P(A \cap B) &= P(A) \times P(B)\\P(A\cap B\cap \ldots \cap Z) &= P(A) \times P(B) \times \ldots \times P(Z)\end{align}}
B has no effect on A when independent:
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A|B) = P(A)}
- A: student is Male
- B: student is an engineer
- P(A) = .513
- P(B) = .518
- P(A ∩ B) = .414
.513 × .518 ≠ .414 ∴ Not independent.
Mutually Exhaustive
NOT TO BE CONFUSED WITH MUTUALLY EXCLUSIVE
(Mutually Exclusive means that P(A ∩ B) = 0)
Mutually Exhaustive means that P(A ∪ B) = Sample Space
Events that are Mutually Exclusive AND Mutually Exhaustive, then the sample space can be partitioned based on each event.
For any event D that is partitioned by Mutually exhaustive and exclusive events A, B, and C, then
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(D) = P(A \cap D) + P(B \cap D) + P(C \cap D)}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A \cap D) = P(D|A)\times P(A)}
- …which brings us to…
Bayes' Theorem
Suppose Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A_1, \ldots ,A_n} are mutually exclusive and exhaustive events:
Example 1
Suppose a colon cancer test is 95% accurate (i.e. if a patient has colon cancer, the test will detect it 95% of the time)
If there is no cancer, the test will give a false positive 1% of the time.
If 5% of the population has colon cancer, what is the probability that a randomly selected patient does not have cancer given a positive test result.
Events:
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A_1} : Patient does not have cancer
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle A_2 = A_1'} : Patient has cancer
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B} : Test returns positive
A1 and A2 are mutually exclusive and mutually exhaustive, therefore:
We know:
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A_2)=0.05} 5% of population has cancer, so Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A_1) = 1-P(A_2)=0.95}
- Since the test is 95% accurate, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(B|A_2)=0.95}
- Since the test returns a false positive 1% of the time, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(B|A_1)=0.01}
We want to find Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A_1|B)}
Solution
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A_1|B)=\frac{P(B|A_1)P(A_1)}{P(B|A_1)P(A_1) + P(B|A_2)P(A_2)} = \frac{0.01 \times 0.95}{0.01 \times 0.95 + 0.95 \times 0.05}=0.167}
Example 2
Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn’t rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Marie’s wedding?
- Let A be the event that it rains
- Let B be the event that the weatherman predicts it will rain
The two events A and A' are mutually exclusive and exhaustive.
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} P(A) & = 5/365 \\ P(B|A) & = \tfrac{P(A \cap B)}{P(A)} = 0.9 \\ P(B|A') & = \tfrac{P(A' \cap B)}{P(A')} = \tfrac{P(A' \cap B)}{1-P(A)} = 0.1 \\ P(A|B) & = \tfrac{P(B \cap A)}{P(B)} = ? \end{align}}
Using the given information, we can solve for P(A ∩ B) and P(B):
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A \cap B) = P(B|A) \times P(A) = 0.9 \times 5/365}
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(B) = P(A \cap B) + P(A' \cap B) = 0.9 \times 5/365 + 0.1 \times (1-5/365)}
Plug these values into the equation:
- Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle P(A|B) = \frac{0.9 \times 5/365}{0.9 \times 3/365 + 0.1 \times (1-5/365)} \approx 0.111}