1
1 2 Outlines Probability Basic definitions: Randomization - - PowerPoint PPT Presentation
1 2 Outlines Probability Basic definitions: Randomization - - PowerPoint PPT Presentation
1 2 Outlines Probability Basic definitions: Randomization experiment Sample spaces Elementary outcomes Basic operationsconditional probability Bayes Theorem Randomness 3 Things may happen randomly, for examples
Outlines
- Probability
- Basic definitions:
Randomization experiment Sample spaces Elementary outcomes
- Basic operations—conditional probability
- Bayes Theorem
2
Randomness
Things may happen randomly, for examples
- Comparison of treatment effects in clinical trials
- Calculation of the risk of breast cancer
Probability
- Study of randomness
- Language of uncertainty
3
Study of randomness
Random Experiment : is the process of
- bserving the outcome of a chance event.
4
4
Basic Definitions
A random experiment for which the outcome
cannot be predicted with certainty
But all possible outcomes can be identified
prior to its performance
And it may be repeated under the same
conditions
5
5
Basic Definitions
Elementary outcomes: are all possible results
- f the random experiment.
Sample space: is the set or collection of all the
elementary outcomes : {Head , Tail}
6
6
Another ex.: Throw a single dice
7
7
Another ex.: Throw a single die
8
Sample space?
8
Another ex.: Throw a pair of dice
9
Sample space?
9
Another ex.: Throw a pair of dice
10
Sample space?
10
Another ex.: Throw a pair of dice
11
Sample space?
11
Probability theory
For a random experiment with n elementary outcomes
O1, O2, ... On, we assign a numerical weight or probability to each outcome.
P(Oi )= the likelihood of the occurrence of an event Toss a fair coin: P(H)=P(T)=0.5 Throw one die: P(die=5)=1/6 Throw two dice: P(Black 5, white 2)=1/36
12
12
Properties of probability
Let Ω be the sample space for a probability measure P
- 0 ≤ P(Oi) ≤ 1, probability is number between 0
and 1; it is non-negative
- P(O1)+ P(O2)+...+P(On)= P(Ω) = 1
- A null set, denoted as ∅, has no elements and P(∅)
= 0
13
13
Basic Operations
14
An Event is a set of elementary outcomes. The probability of an event is the sum of the probabilities of the elementary outcomes in the set. For the dice example
15
Event
Event description Event’s elementary outcomes probability A: dice add to 3 B:dice add to 6 C:White die shows 1 D: Black die shows 1
15
An Event is a set of elementary outcomes. The probability of an event is the sum of the probabilities of the elementary outcomes in the set. For the dice example:
16
Event
Event description Event’s elementary outcomes probability A: dice add to 3 {(1,2), (2,1)} B:dice add to 6 {(1,5),(2,4),(3,3),(4,2),(5,1)} C:White die shows 1 {(1,1),(1,2),(1,3),(1,4),(1,5),(1,6)} D: Black die shows 1 {(1,1),(2,1),(3,1),(4,1),(5,1),(6,1)}
2 ( ) 36 P A = 5 ( ) 36 P B = 6 ( ) 36 P C = 6 ( ) 36 P D = 16
Let Ω denote the set comprised of the totality of all
elements in our space of interest
- If A ⊂ Ω , Ā (complement of A) is the set of all
elements of which do not belong to A
17
Basic definition
17
Ω
A Ā
For two events A and B,
- A or B( A ∪ B) : The event A or the event B occurs
(or both do)
- A and B (A ∩ B) : The event A and the event B both
- ccur
- Not A (Ā) : The event A does not occur
18
Combining events using logical
- perations
18
Let A = {1, 2, 3} and B = {3, 4, 5}
- A ∩ B =
- A ∪ B =
Let Ω = {1, 2, 3, 4, 5, 6, 7, 8, ...}: the positive integers, and let
A = {2, 4, 6, 8, . . .}
- Ā =
A = {1, 2, 3} and B = {1, 2, 3, 4}
- Does A ⊂ B?
19
Example
Let C is the event White die is1 and D is the event Black die is
1 P(C)= P(D)= P(C ∩D)= P(C ∪D)=
20
Example
20
Let C is the event White die is1 and D is the event Black die is
1 P(C)= P(D)= P(C ∩D)= P(C ∪D)=
21
Example
21
P(C ∪D)= P(C) + P(D)- P(C ∩D)
P(C)=1/6 P(D)=1/6 P(C ∩D)= 1/36 P(C ∪D)=11/36
22
Addition Rule
22
If the overlap of event A and B is empty, i.e. P(A ∩B)= 0 or A
∩B = Ø , in this case, we say event A and B are mutually exclusive. A: the dice add to 3 B: the dice add to 6
23
Mutually exclusive
23
If A and B are mutually exclusive, then P(A ∪B)= P(A) + P(B)
24
Special Addition Rule
24
Subtraction Rule
P(Ā) = 1 – P(A) A: a double 1 is not thrown P(A)= ?
25
25
Subtraction Rule
P(Ā) = 1 – P(A) A: a double-1 is not thrown P(Ā)=1/36
So P(A)=1- 1/36 = 35/36
26
26
Conditional Probability
Questions:
- 1. Throw a pair of dice. What’s the probability that the faces
sum to 3 (event A)? P(A)=?
27
27
Conditional Probability
Questions:
- 1. Sample space of A
has 36 outcomes. P(A)=
28
28
Conditional Probability
Questions:
- 1. Sample space of A
has 36 outcomes. P(A)=2/36=1/18
29
29
Conditional Probability
Questions:
- 1. Throw a pair of dice. What’s the probability that the faces
sum to 3 (event A)? P(A)= 2/36=1/18
- 2. Suppose we throw the white die before the black die. The
white die comes up 1(event C). What’s the probability of A now? P(A|C)=? : Conditional Probability that event A will occur given event C has already occurred.
30
30
Conditional Probability
Given event C is happened, the sample space is reduced. Reduced sample space of C has 6 outcomes.
31
31
Conditional Probability
Given event C is happened, the sample space is reduced. Reduced sample space of C has 6 outcomes. A: the faces sum to 3 P(A|C)=
32
Event A∩C
32
Conditional Probability
Given event C is happened, the sample space is reduced. Reduced sample space of C has 6 outcomes. A: the faces sum to 3 P(A|C)=1/6
33
Event A∩C
33
Conditional Probability
A: the faces sum to 3 P(A|C)=1/6
34
Event A∩C P(A∩C)=1/36 ( ) ( | ) ( ) P A C P A C P C ∩ =
34
Event C, P(C)=1/6
Conditional Probability
The Conditional Probability of E given F is Fact 1: Fact 2: When E and F are mutually exclusive
35
( ) ( | ) ( ) P E F P E F P F = ( | ) 1 P E E = ( | ) P E F =
35
Multiplication Rule
36
( ) ( | ) ( ) ( | ) ( ) P E F P E F P F P F E P E = =
Independence
When
When P(E)=P(E|F) or equivalently P(F)=P(F|E), E and F are independent When E and F are independent
Special Multiplication Rule
( ) ( ) ( ) P E F P E P F =
36
37 Independence
When
Event E and F are independent
( ) ( ) ( ) P E F P E P F = ( | ) ( ) P E F P E = ( | ) ( ) P F E P F =
EX.
1.
Event C is white die comes up 1; event D is Black die comes up 1. Please show C and D are independent
2.
Event F is the sum of the two dice is 3. Show C and F are not independent
37
Addition Rule Special Addition Rule: when E and F are mutually
exclusive
Subtraction Rule Multiplication Rule Special Multiplication rule: when E and F are indep.
38
Summary
( ) ( | ) ( ) ( | ) ( ) P E F P E F P F P F E P E = =
P(Ā) = 1 – P(A)
( ) ( ) ( ) P E F P E P F =
P(C ∪D)= P(C) + P(D)- P(C ∩D) P(C ∪D)= P(C) + P(D)
38
Suppose a rare disease affects one out of every 1000 people in a population. And suppose that there is a good but not perfect test for this disease
If a person has the disease, the test comes back positive 99% of the time
About 2 % of uninfected patients also test positive Q: If your just tested positive, what are your chances of having the disease?
39
Case of the false positive
39
A: Patient has the disease B: Patient tests positive P(A)= P(B|A)=
P(B|Not A)= Q: P(A|B)=
40
Case of the false positive
40
A: Patient has the disease B: Patient tests positive P(A)=0.001 P(B|A)=0.99
P(B|Not A)=0.02 Q: P(A|B)=?
41
Case of the false positive
41
A: Patient has the disease B: Patient tests positive P(A)=0.001 P(B|A)=0.99
P(B|Not A)=0.02 Q: by conditional probability
42
Case of the false positive
42
( ) ( | ) ( ) P A B P A B P B ∩ =
A: Patient has the disease B: Patient tests positive P(A)=0.001 P(B|A)=0.99
P(B|Not A)=0.02 Q: By multiplication rule
43
Case of the false positive
43
( ) ( | ) ( ) ( | ) ( ) ( ) P A B P B A P A P A B P B P B ∩ = =
A: Patient has the disease B: Patient tests positive P(A)=0.001 P(B|A)=0.99
P(B|Not A)=0.02 Q: ??
44
Case of the false positive
44
( ) ( | ) ( ) ( | ) ( ) ( ) P A B P B A P A P A B P B P B ∩ = =
Total probability rule
45
A: Disease status B: Test results The sample space can be divided into four mutually exclusive events
A not A B B ∩A B ∩ not A not B not B∩A not B ∩ not A
( ) ( ) ( ) ( | ) ( ) ( | ) ( ) P B P B A P B A P B A P A P B A P A = + = +
45
Bayes Theorem
46
( ) ( | ) ( | ) ( | ) ( ) ( | ) ( ) P A P B A P A B P B A P A P B A P A = +
46
A: Patient has the disease B: Patient tests positive P(A)=0.001 P(B|A)=0.99
P(B|Not A)=0.02 Q:
47
Case of the false positive
47
( ) ( | ) ( | ) ( | ) ( ) ( | ) ( ) 0.001*0.99 0.00099 0.99*0.001 0.02*0.999 0.02097 0.0472 P A P B A P A B P B A P A P B A P A = + = = + =
One exercise
48
48
A1 A2
Ω
For two events A1 and A2, please shade the area for
- A1 ∩ Ā2