Professional Documents
Culture Documents
email:denisleung@smu.edu.sg
phone: 68280396
TA’s
Essentials
Projects vs Homework
Assessments
Projects (40%)
– 2 projects with presentation 20% each
– Each project’s grade includes 8% individual assessment
(quizzes)
Exam (50%)
– Closed book but one 2-sided A-4 “cheat sheet” is allowed
Timeline of classes
Class time
1.5 hrs
if needed Break
1.45 hrs
Q&A
3 hrs
STAT 151 Class 1 Slide 5
Preliminaries Randomness and Probability Probability axioms and rules
University of Michigan Panel Study of Income Dynamics on 753 white married women in
the US (1975-76):
Woman Workforce status Hrs worked #kids Age Education Hourly wage Husband’s Experience
(1=Yes, 0=No) < 6 yrs (yrs) rate wage rate (yrs)
1 1 1610 1 32 12 3.3540 4.0288 14
2 1 1656 0 30 12 1.3889 8.4416 5
3 1 1980 1 35 12 4.5455 3.5807 15
4 1 456 0 34 12 1.0965 3.5417 6
5 1 1568 1 31 14 4.5918 10.0000 7
6 1 2032 0 54 12 4.7421 6.7106 33
7 1 1440 0 37 16 8.3333 3.4277 11
8 1 1020 0 54 12 7.8431 2.5485 35
.. .. .. .. .. .. .. .. ..
. . . . . . . . .
750 0 0 2 31 12 0.0000 4.8638 14
751 0 0 0 43 12 0.0000 1.0898 4
752 0 0 0 60 12 0.0000 12.4400 15
753 0 0 0 39 9 0.0000 6.0897 12
Yrs education 5 6 7 8 9 10 11 12 13 14 15 16 17
n 4 6 8 30 25 44 43 381 44 51 14 57 46
Graphical summary
200
150
Frequency
100
50
0 5 10 15 20 25
Wage
(b) Sample median - “middle” observation when data are ranked from lowest to highest.
If n = odd, sample median= middle value. If n = even, sample median = the
average of the two middle values
1,1,2,2, 2,3 ,3,4,4,5
2+3
= 2.5
2
3+4 1+2
IQR = − = 3.5 − 1.5 = 2
2 }
| {z 2 }
| {z
top 25% bottom 25%
Randomness
Pandemic data
Treatment outcome from n = 100 patients in a pandemic:
1 = “recovered” and 0 = “not recovered”
1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 1
1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0
0 1 0 1 1 0 1 0 0 1 1 1 1 0 1 0 1 1 1 0
1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1
1 0 1 1 1 1 0 0 1 1 1 1 0 1 0 0 1 0 1 1
Outcome 0 1
n 40 60
Why did some patients recovered and others not? pattern of 1 and
0’s not easy to predict – random
Probability helps to explain randomness
Toss 1 2 3 4 5 6 7 8 9 ···
Outcome H T H T T H T H T ···
1.0
0.8
Proportion of heads
0.6
probability = 0.5
0.4
0.2
0.0
Number of tosses
Draws
1 2 3 4 5 6 7 8 9 ...
1 ...
2
4
3 5
Probability
3 2
5 5
Interested in Event A:
Complementary events
Marbles in urn: 1 2 3 4 5
Chance of = 1 − chance of
3 2
⇒ P(Ā) = 1 − P(A) = 1 − =
5 5
Example
P(A and B) = 0
Partition rule
For any A, P(A) can be written as the sum of the probabilities of its
disjoint subsets, eg.,
Conditional probability
Conditional probability is a useful quantification of how the assessment
of chance changed due to new information: “If A happened, what is the
chance of B?”
?
A={ is drawn}
B ={ is drawn}
1 2
2 P(B) =
4 5
3 5 2
P(B|A) =
4
;
STAT 151 Class 1 Slide 22
Preliminaries Randomness and Probability Probability axioms and rules
Example
Marbles in urn: 1 2 3 4 5
2 3 6
P( and ) = P( | )P( )= =
4 5 20
3 2 6
= P( | )P( )= =
4 5 20
P(AB) P(AB)
P(A|B) = and P(B|A) =
P(B) P(A)
Independence
=P(A)
z }| {
(iii) P(AB) = P(A|B) P(B) = P(A)P(B)
We can use (i), (ii) or (iii) for any two independent events A and B
A = { is drawn}
?
B = { is drawn}
2
P(B) =
1 5
2 2
4 P(B|A) =
5
3 5 P(AB) = P(B|A)P(A) = P(B)P(A)
2 3 6
= × =
5 5 25
;
Urn
Odd
Green
1
1 2
2
4 3
3 5
5
4
Probability tree
Probability tree is useful for studying combinations of events. Branches of a tree are
conditional probabilities.
Example
Drawing two marbles from urn without replacement:
2 1
P( ∩ )= 5 · 4
1
4 = P( | )
Draw 2
3 2 3
2 4 P( ∩ )= 5 · 4
5
= P( | )
Draw 1
3 2
P( ∩ )= 5 · 4
3
5 2
4 = P( | )
Draw 2
2 3 2
4 P( ∩ )= 5 · 4
= P( | )
Example
Testing for an infectious disease.
1 9 9
T P(D ∩ T ) = 100 · 10 = 1000
9
10 = P(T |D)
Test
T̄
D
1 1 1 1
1 10 P(D ∩ T̄ ) = 100 · 10 = 1000
100
= P(T̄ |D)
Disease
D̄ P(D̄ ∩ T ) = 99
· 1
= 99
T 100 10 1000
99
100 1
10 = P(T |D̄)
Test
T̄
9 99 9 891
10 P(D̄ ∩ T̄ ) = 100 · 10 = 1000
= P(T̄ |D̄)
What is P(D|T ) or P(D̄|T̄ )?
STAT 151 Class 1 Slide 29
Preliminaries Randomness and Probability Probability axioms and rules
In general,
P(B|A)P(A)
P(A|B) =
P(B)
STAT 151 Class 1 Slide 30
Preliminaries Randomness and Probability Probability axioms and rules
9
P(DT ) 1000 9
P(D|T ) = = =
P(T ) 9 99 108
+
1000 1000