Download An Event

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Chapter 3: Basic Probability
Concepts
• Probability:
• is a measure (or number) used to measure the chance
of the occurrence of some event. This number is
between 0 and 1.
• An experiment:
• is some procedure (or process) that we do.
• Sample Space:
• The set of all possible outcomes of an experiment is
called the sample space (or Universal set) and is
denoted by 
An Event:
.
is a subset of the sample space
·   is an event (impossible event)
·  
is an event (sure event)
Example:
Experiment: Selecting a ball from a box containing
6 balls numbered 1,2,3,4,5 and 6.
This experiment has 6 possible outcomes
  1, 2, 3, 4, 5, 6
·
Consider the following events:
E1: getting an event number  2, 4, 6   
E2: getting a number less than 4   1, 2, 3   
E3 =getting 1 or 3  1, 3   
E4 =getting an odd number  1, 3, 5   
n  no. of outcomes (elements) in 
nEi   no. of outcomes (elements) in Ei
Notation
Equally likely outcomes:
The outcomes of an experiment are equally likely if the
occurrences of the outcomes have the same chance.
Probability of an event:
·
If the experiment has N equally likely
outcomes, then the probability of the event E is:
n E  n E  no. of outcomes in E
PE  


n 
N
no. of outcomes in 
Example: In the ball experiment in the previous
example, suppose the ball is selected randomly.
  1, 2, 3, 4, 5, 6 ; n   6
E1  2, 4, 6
; nE1   3
E 2  1, 2, 3
E3  1, 3
;
;
n E 2   3
n  E3   2
The outcomes are equally likely.
3
PE1   ,
6
3
PE 2   ,
6
2
PE3   ,
6
Some Operations on Events:
Let A and B be two events defined on
Union:

A B
A·  B Consists of all outcomes in A or in B
or in both A and B.
A
· B Occurs if A occurs,
or B occurs, or both A and B occur.

Intersection:
A B

A ·B
Consists of all outcomes in
both A and B.
A B
Occurs if both A and B occur .
Complement:
Ac
·
Ac is the complement of A.
·
Ac consists of all outcomes of 
but are not in A.
·
Ac occurs if A does not.
Ac
A
Example:
Experiment: Selecting a ball from a box containing 6 balls
numbered 1, 2, 3, 4, 5, and 6 randomly.
Define the following events:
E1   2, 4, 6
= getting an even number.
E 2   1, 2, 3 = getting a number < 4.
E3  1, 3
= getting 1 or 3.
E4   1, 3, 5 = getting an odd number.
(1)
E1  E2   1, 2, 3, 4, 6 
= getting an even no. or a no. less than 4.
nE1  E2  5
PE1  E2  

n
6
( 2 ) E1  E4   1, 2, 3, 4, 5, 6   
= getting an even no. or an odd no.
nE1  E4  6
PE1  E4  
 1
n
6
Note:
E1  E 4  
E1 and E4 are called exhaustive events.
( 3 ) E1  E2   2 
= getting an even no. and a no.less than 4.
nE1  E2  1
PE1  E2  

n
6
( 4 ) E1  E4  
= getting an even no. and an odd no.
nE1  E4  n  0
PE1  E4  

 0
n
6
6
Note: E1  E 4  
E1 and E4 are called disjoint (or mutually exclusive) events.
( 5 ) E1c = not getting an even no. = {1, 3, 5}
= getting an odd no.
= E4
Notes:
1. The event A1 , A2 , …, An are exhaustive events if
A1  A2    An  
2. The events A and B are disjoint (or mutually exclusive) if
A B 
In this case :
(i)
P A  B   0
(ii) P A  B   P A  PB 
3.
A  Ac   , A and Ac are exhaustive events.
A  Ac   , A and Ac are disjoint events.
4. nAc   n  n A
PAc  1  P A
General Probability Rules:0  P A  1
1.
2.
P  1
3.
P   0
4.
PA   1  P A
5.
For any events A and B
c
P A  B   P A  PB   P A  B 
6.
7.
For disjoint events A and B
P A  B   P A  PB 
For disjoint events E1 , E2 , … , En
PE1  E 2    E n   PE1   PE 2     PE n 
2.3. Probability applied to health data:Example 3.1:
630 patients are classified as follows : (Simple frequency
table)
Blood
Type
O
(E1)
A
(E2)
B
(E3)
AB
(E4)
Total
No. of
patient
s
284
258
63
25
630
· Experiment: Selecting a patient at random and observe
his/her blood type.
· This experiment has 630 equally likely outcomes
n   630
Define the events :
E1 = The blood type of the selected patient is O
E2 = The blood type of the selected patient is A
E3 = The blood type of the selected patient is B
E4 = The blood type of the selected patient is AB
n(E1) = 284,
n(E2) = 258,
n(E3) = 63 ,
n(E4) = 25 .
258
63 ,
25
284
,
,
P E 2  
PE1  
PE 3  
PE 4  
630
630
630
630
E 2  E 4  the blood type of the selected patients is A or AB
 nE2  E4  258  25 283


 0.4492

n 
630
630

or
P( E2  E4 )  
 PE   PE   258  25  283  0.4492
2
4

630 630 630

(since E 2  E 4   )
Notes:
1. E1 ,E2 ,E3 ,E4 are mutually disjoint, Ei  E j   i  j 
2. E1 ,E2 ,E3 ,E4 are exhaustive events, .E1  E 2  E3  E 4  
Example 3.2:
Smoking Habit
Daily
(B1)
Occasionally
(B2)
Not at all
(B3)
Total
20 - 29 (A1)
31
9
7
47
30 - 39 (A2)
110
30
49
189
40 - 49 (A3)
29
21
29
79
50+
6
0
18
24
176
60
103
339
Total
(A4)
Experiment: Selecting a physician at random
n   339 equally likely outcomes
Events:
· A3 = the selected
physician
n A
79 is aged 40 - 49
3
P A3  

 0.2330
n 339
· B2 = the selected physician smokes occasionally
nB2  60
PB2  

 0.1770
n 339
·A3  B2  the selected physician is aged 40-49 and
smokes occasionally.
n A3  B2  21
P A3  B2  

 0.06195
n
339
the selected physician is aged
A3  B2 ·
40-49 or smokes occasionally (or both)
P A3  B2   P A3   PB2   P A3  B2 
79
60
21



339 339 339
 0.233  0.177  0.06195   0.3481
·A4c

the selected physician is not 50 years or older.
P A4c   1  P A4 
n A4 
24
 1
 1
 0.9292
n 
339
A2 
· A3 
the selected physician is aged 30-49 or is
aged 40-49
= the selected physician is aged 30-49
n A2  A3  189  79 286



 0.7906
 P A2  A3  
n 
339
339

 or

189 79

 0.7906
P A2  A3   P A2   P A3  
339 339

( Since A2  A3   )
3.3. (Percentage/100) as probabilities and
the use of venn diagrams:
nE 
P E  

n
n   ??
unknown
nE   ??
unknown
%E   Percentage of elements of E relative
,,
to the elements of
, n 
nE 
%E  
 100%
n
, is known.
Example 3.3: (p.72)
A population of pregnant women with:
·
10% of the pregnant women delivered prematurely.
· 25% of the pregnant women used some sort of
medication.
· 5% of the pregnant women delivered prematurely and
used some sort of medication.
Experiment : Selecting a woman randomly from this
population.
Define the events:
· D = The selected woman delivered prematurely.
·
M = The selected women used some sort of
medication.
D
M
The selected woman delivered prematurely and
used some sort of medication.
%D   10%
%M   25%
 PD  
%D  10%

 0.1
100% 100%
PM  
%M  25%

 0.25
100% 100%
PD  M  
%D  M 
5%

 0.05
100%
100%
%D  M   5%
A Venn diagram:
PD   0.1
PM   0.25
PD  M   0.05
PD c  M   0.2
PD  M c   0.05
PD c  M c   0.70
PD  M   0.30
Probability given by a Venn diagram
A Two-way table:
M
Mc
Total
D
0.05
0.05
0.10
Dc
0.20
0.70
0.90
Total
0.25
0.75
1.00
Probabilities given by a two-way table.
Calculating probabilities of some events:
Mc = The selected woman did not use medication
PM c   1  PM   1  0.25  0.75
Dc  M c  the selected woman din
prematurely and did not use medication.

not
deliver

P D c  M c  1  P  D  M   ??
D  M  the selected woman delivered prematurely
or used some medication.
PD  M   PD   M   PD  M 
 0.1  0.25  0.05  0.3
 PDc  M c   1  PD  M   1  0.3  0.7
Note:
From the Venn diagram, it is clear that:
PD  PD  M   PD  M c 
PM   PD  M   PD c  M

PD  M c   PD  PD  M 
PDc  M   PM   PD  M 
PD c  M c   1  PD  M 
3.4. Conditional Probability:
·
The conditional probability of the event A given the
event B is defined by:
P A  B 
P A | B  
; P B   0
P B 
·
P(A | B) = the probability of the event A if we know
that the event B has occurred.
P A  B 
Note:
P A | B  
P B 
n A  B  / n

nB  / n
 P A | B  
n A  B 
nB 
P A  B   PB P A | B  

P A  B   P APB | A 
Smoking Habbit
Example:
Age 20-29 A1)
multiplication rules
Daily Occasionally Not at all
(B1)
(B2)
(B3)
31
9
7
Total
47
30-39 (A2)
110
30
49
189
40-49 (A3)
29
21
29
79
50+ (A4)
6
0
18
24
176
60
103
339
For calculating P A | B  , we can use
P A | B  
P A  B 
n A  B 
or P A | B  
PB 
nB 
Using the restricted table directly
176
PB1  
 0.519
339
PB1  A2 
PB1 | A2  
P A2 

0.324484
 0.5820
0.557522
n( B1  A2 ) 110
P B1  A2  
 0.324484
=
n(  )
339
n( A2 ) 189

 0.557522
P A2  
339
n()
OR
nB1  A2 
PB1 | A2  
n A2 
110

 0.5820
189
Notice that P B1  < PB1 | A2  !! … What does this mean?
Independent Events
There are 3 cases
(1) P  A | B   P  A
which means that knowing B increases the probability of
occurrence of A .
(2) P  A | B   P  A
which means that knowing B decreases the probability of
occurrence of A .
(3)
P  A | B   P  A
which means that knowing B has no effect on the
probability of occurrence of A .
B
A
In this case A is independent of B.
Independent Events:
Two events A and B are independent if one of the following
conditions is satisfied:
( i ) P  A | B   P  A
 (ii ) P  B | A  P  B 
 (iii ) P  B  A  P  A P  B 
(multiplication rule)
Example:
In the previous , A2 and B1 are not independent because:
also
PB1   0.5192  PB1 | A2   0.5820
PB1  A2   0.32448  PB1 P A2   0.28945
Combinations:
•Notation: n factorial is denoted by n! and is defined by:
n! nn  1n  221
for n  1
0! 1
Example: 5! = (5) (4) (3) (2) (1) = 120
• Combinations:
The number of different ways for selecting r objects from
 n  is given by:
n distinct objects is denoted by
and
 
r
 n
n!
  
;
 r  r ! n  r !
r  0, 1, 2, , n
 n
  is read as “ n “ choose “ r ”.
r
n
   1
n
n
   1
0
 n  n 
   

r  n  r
n
r
n-r
Example 3.9:
If we have 10 equal–priority operations and only 4
operating rooms, in how many ways can we choose the 4
patients to be operated on first?
Answer:
The number of different ways for selecting 4 patients from
10 patients is
10 

10!
10!
10  98  21
  


 4  4! 10  4! 4! 6! 4321 654321
 210
(different ways)
Related documents