STAT 211 Topic 2

From Notes
Jump to navigation Jump to search

Lecture 3

Lecture Notes

« previous | Tuesday, January 25, 2010 | next »


Probability

Sample Space

All possible outcomes of an experiment:

EX flipping a coin: S={H,T}
EX rolling a die: S={1,2,3,4,5,6}

Event

Any subset of outcomes contained in sample space

EX flipping a coin: E={H},{T},{H,T},...

Set Theory

For two events A and B

Union (AB)
all outcomes that are in A, B, or both
Intersection(AB)
all outcomes that are in A and B
Complement (A)
all outcomes that are not in A
Mutually Exclusive
AB={}

Properties

  • 0P(A)1
  • P()=0,P(S)=1
  • P(A)=1P(A)
  • P(AB)=P(A)+P(B)P(AB)
  • If A and B are mutually exclusive, P(AB)=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:

P(A)=0.4P(B)=0.5P(AB)=0.6P(AB)=0.3P(AB)=0.1


Equally Likely Outcomes

If N is number of possible outcomes and A is event, then P(A)=N(A)N

Conditional Probability

Probability of event A given event B has occurred:

P(A|B)=P(AB)P(B)

Lecture 4

Lecture 4 Notes

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:

  1. P(A ∩ B) = P(A) − P(A∩B') = .2
  2. P(A ∪ B) = P(A) + P(B) − P(A ∩ B) = .5
  3. P(A' ∩ B') = P( (A ∪ B)' ) = 1 - P(A ∪ B) = .5
  4. P(B' | A) = P(B' ∩ A) ÷ P(A) = 0.2 ÷ 0.4 = 0.5
  5. P(A' | B) = P(A' ∩ B) ÷ P(B) = 0.1 ÷ 0.3 = 1/3


Independent Events

P(AB)=P(A)×P(B)P(ABZ)=P(A)×P(B)××P(Z)

B has no effect on A when independent:

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

P(D)=P(AD)+P(BD)+P(CD)

P(AD)=P(D|A)×P(A)

…which brings us to…

Bayes' Theorem

Suppose A1,,An are mutually exclusive and exhaustive events:

P(Ai|B)=P(AiB)P(B)=P(B|Ai)P(Ai)j=1nP(B|Aj)P(Aj)

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:

A1: Patient does not have cancer
A2=A1: Patient has cancer
B: Test returns positive

A1 and A2 are mutually exclusive and mutually exhaustive, therefore:

We know:

P(A2)=0.05 5% of population has cancer, so P(A1)=1P(A2)=0.95
Since the test is 95% accurate, P(B|A2)=0.95
Since the test returns a false positive 1% of the time, P(B|A1)=0.01

We want to find P(A1|B)


Solution

P(A1|B)=P(B|A1)P(A1)P(B|A1)P(A1)+P(B|A2)P(A2)=0.01×0.950.01×0.95+0.95×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
Mutually Exhaustive and Exclusive Events

The two events A and A' are mutually exclusive and exhaustive.

P(A)=5/365P(B|A)=P(AB)P(A)=0.9P(B|A)=P(AB)P(A)=P(AB)1P(A)=0.1P(A|B)=P(BA)P(B)=?

Using the given information, we can solve for P(AB) and P(B):

P(AB)=P(B|A)×P(A)=0.9×5/365
P(B)=P(AB)+P(AB)=0.9×5/365+0.1×(15/365)

Plug these values into the equation:

P(A|B)=0.9×5/3650.9×3/365+0.1×(15/365)0.111