Cheat Sheet Page 2

advertisement
Usage
Standard Error &
Rule of Thumb
p-value
Assumptions
Check whether two
Assume two groups A & B
group means are
have similar SSD
different
not too different in size
Probability that test is as extreme or > extreme than
observed data
if 𝑛 > 30, 0.2 < 𝑝 < 0.8
Gaussian distribution
Normal
Distribution
Sign Test
Used to test that the
difference median is
zero between two
variables
Decide whether group
means are different
(Proportion)
t-test
(Means)
πœ’ 2 and
contingency
tables
Test independence
between two variables
Assume 𝑛 independent pairs
of observations
Assume 𝑛 independent
measurements following a
Gaussian distribution.
Assume each group same
SD.
There’s no one-sided or
two-sided test for πœ’ 2
(Independence)
Spearman’s 𝜌
ranking
Calculations
SE =
SSD
√𝑛
=√
𝑝(1 − 𝑝)
𝑛
P(π‘π‘œπ‘–π‘› 𝑖𝑠 π‘“π‘Žπ‘–π‘Ÿ π‘Žπ‘“π‘‘π‘’π‘Ÿ 9𝐻)
= P(𝑑 = 9, 𝑑 = 10, 𝑑 = 1, 𝑑 = 0)
10
1
10
1
=
+
+
+
= 0.021
1024 1024 1024 1024
π‘Š − 𝑛𝑝
𝑍=
√𝑛𝑝(1 − 𝑝)
𝑛
𝑃(π‘Š = π‘˜) = ( ) π‘π‘˜ (1 − 𝑝)𝑛−π‘˜
π‘˜
H0: No difference between the two
H1: The two are different
𝑑=
SM𝐴 − SM𝐡
√SE𝐴2 + SE𝐡2
πœ’2 = ∑
,
𝑑𝑓 = 2𝑛 − 2
(π‘‚π‘Ÿπ‘–π‘”π‘–π‘›π‘Žπ‘™ − 𝐸π‘₯𝑝𝑒𝑐𝑑𝑒𝑑)2
𝐸π‘₯𝑝𝑒𝑐𝑑𝑒𝑑
𝑑𝑓 = (π‘Ÿπ‘œπ‘€π‘  − 1)(π‘π‘œπ‘™ − 1)
Check for correlation
between two variables
Assume 𝑛 independent pairs
of observations
(Correlation)
6 ∑ 𝐷𝑖 2
𝜌 =1−
𝑛(𝑛2 − 1)
𝑑𝑓 = 𝑛 − 2
Sample Mean, π‘₯ =
π‘₯1 + π‘₯2 + β‹― + π‘₯𝑛
𝑛
SSD = √
(π‘₯1 − π‘₯)2 + (π‘₯2 − π‘₯)2 + β‹― + (π‘₯𝑛 − π‘₯)2
𝑛−1
SSD is standard deviation of ONE individual from the sample mean
SE is the standard deviation of the sample mean from the population
Interpretations
Example
Strong indication that two group means are different if the intervals
SM𝐴 ± 1.5 × SE𝐴 and SM𝐡 ± 1.5 × SE𝐡
do not overlap
One-sided: Only interested in bias towards H
Two-sided: coin is biased
1
1
H1: P(H) > > P(T)
H1: P(H) ≠ ≠ P(T)
2
2
Given: 𝑋1 ~𝑁(π‘š1 , 𝑠1 ) & 𝑋2~𝑁(π‘š2 , 𝑠2 ) independent
𝑋1 + 𝑋2 ~𝑁(π‘š1 +
π‘š2 , √𝑠12
+
𝑠22 )
Let 𝑋~𝑁(102.6,18.5). What is P(𝑋 ≤ 120)
P(𝑋 ≤ 120) = P(𝑁(102.6,18.5) ≤ 120)
= P(𝑁(0,18.5) ≤ 17.4)
= P(𝑁(0,1) ≤ 0.940) ≈ 0.8264
1 20 20
20
P(W ≥ 14) = ( ) (( ) + ( ) + β‹― )
2
14
15
After introducing airbags, no. of casualties in
accidents dropped in 14 among 20 countries
and gone up in other 6
When given SM, SSD, and n, t-test can be used to decide
whether the two means are different. If SSD are different, ttest is not as accurate
It was observed that the average PSI on rainy
days is lower than the average PSI on sunny
days
To find
Observed
F
M
N 68
64 132
Y
82 130 212
150 194 344
Before 35
38
3
4
After
76
56
8
4
𝐷𝑖
-5
0
25
0
𝐷𝑖2
Expected
F
M
N 57.56
74.4
132
Y 92.44 119.56 212
150
194
344
43
33
45
52
32
42
6
2
7
8
1
5
58
63
36
48
55
75
5
6
1
2
3
7
1
-4
6
6
-2
-2
1
16
36
36
4
4
The proportion of Samsung versus Apple
smartphones owners in Singapore is different
than as compared to Malaysia.
Do taller students have a higher CAP?
Download