Advanced Statistics
Variables: Qualitative (info) Ordinal (with order) / Nominal (without order)
Quantitative (nr.) Discrete (1,2,3) / Continuous (1,…,2)
Variance = deviation2 MSE = σε2 = SSE/dfE
2-sided P = 2P(t≥|𝑻𝑮|) right RR = [tα,df , ∞) 2RR = |𝒕|>tα/2. df
𝝈
Central Limit Theory y~N(µy ,σ) ȳ~N(µy , )
√𝒏
F-test always Rightsided!
I Preliminaries & Interference: t-procedures
One sample t-test
ȳ−µ ȳ−µ
H0: µ=x Ha: µ</≠/>x t = 𝑆𝐸(ȳ) = 𝑠/ t ~ tdf=n–1
√𝑛
TS larger/smaller under Ha left/right/2sided RR = [RR;∞) TS in RR (P<α): Ha proven
2 independent t-tests 2 EAS, 1 variable
y1 & y2 ~ N(µ, σ) σ12 = σ22 (Levene’s test) y indepent
(ȳ1−ȳ2)−𝐷0 (𝑛1−1)𝑠12 +(𝑛2−1)𝑠22
H0: µ1-µ2=0 Ha: µ1-µ2</≠/>0 t= sp = √ t ~ tdf=n1+n2-2
1 1 𝑛1+𝑛2−2
𝑠𝑝√ +
𝑛1 𝑛2
σ12 ≠ σ22 BLZ 19 STAT2
Paired t-test 1 EAS, 2 variables
đ
H0: µd = D0 = 0 t= t ~ tdf=n–1
𝑆𝐸(đ)
Confidence Interval (1-α)%-CI = ȳ ± tα/2, df · SE(ȳ) Higher n accurate interval
(SPSS: µ ± test value) Higher 1-α wider interval
, II Sample size calculations & Wilcoxon tests
Errors Type I false positive, incorrectly reject H0 max. α
Type II false negative, incorrectly not reject H0 β
H0 true & H0 not rejected: 1-α Ha true & H0 rejected: 1-β
Power= chance to reject H0, when H0 isn’t true = 0,99, β=0,01
𝜶 𝟐
𝝈𝟐 (𝒛𝜶+𝒛𝜷)𝟐 𝝈𝟐 (𝒛 +𝒛𝜷)
𝟐
Sample size calculations n= ∆𝟐
(1-sided) n= ∆𝟐
(2-sided) ∆= ȳ-µ or EM
𝛼 𝛼2
𝑡 (𝑑𝑓, ) 𝑠2
2
𝜎 2 (𝑧 )
2 2
Paired: CI n= 𝐸𝑀 2
= 𝐸𝑀 2
𝛼2
𝜎 2 (𝑧 )
2
Construct CI for µ1-µ2: n1=n2=2 𝐸𝑀 2
𝛼 2
𝜎 2 (𝑧𝛼+𝑧𝛽)2 𝜎 2 (𝑧 +𝑧𝛽)
2
Testing for µ1-µ2: n= ∆2
(1-sided) n= ∆2
(2-sided)
Two non-parametric tests (Wilcoxon)
I Rank-sum test same distribution, but systematically lower/higher values
H0: distribution of the observations in each population is the same
Ha: population 1 has systematically higher/lower/different values than population 2
TS: W= sum of ranks of sample nr. 1 OR 2 (SPSS uses smallest)
W ~ Wilcoxon rank-sum distribution (n1,n2)
II Signed rank test
H0: distribution of differences d is symmetrical around D0
Ha: differences d tend to be smaller than/larger than/unequal to D0
TS: T+ or T- = ∑ 𝑟𝑎𝑛𝑘𝑠 |+/−𝑑𝑖| di=(xi-yi)-D0
T ~ Wilcoxon signed rank distribution T- left tail T+ right tail
III Binomial & Fisher test
Discrete response variable 1 population = Binomial 2 populations = Fisher
Binomial outcomes: 1 or 0 / success or no success / yes or no
H0: π = … Ha: π </≠/> …
^π = y/n π = proportion of successes y= nr of successes ^π = ẍ π = µx
y ~ Bin(n,π) SE(^π) = √π(1 − π)/n ∆= E(y) = nπ Var(y)= nπ(1-π) = max at π=1/2
𝛼
(𝑧 )2 𝜋(1−𝜋)
CI: ^π ± zα/2 √π(1 − π)/n n= 2
𝐸𝑀 2
Fisher π1-π2 ^π1-^π2 = (y1/n1)-(y2/n2) y1,2= nr of successes N=n1+n2
𝜋1(1−𝜋1) 𝜋2(1−𝜋2)
y ~ HyperGeometric (N,n1,y1+y2) SE(^π1-^π2)= √ +
𝑛1 𝑛2
CI: ^π1-^π2 ± zα/2 SE(^π1-^π2) only if nπ > 5 & n(1-π) > 5 !!
IV Chi-Square tests
Chi-Square multinomial distribution (π1, π2, …, πk)
H0: π1= 0.50, π2= 0.25, π3= 0.10, π4= 0.15 Ha: πi ≠ πi0, for some i=1,…,k
(𝒏𝒊−𝑬𝒊)𝟐
TS: χ2 = ∑𝒌𝒊=𝟏 Ei = nπi0 = Expected N (SPSS) χ2 ~ χ2 k-1 RR is right sided
𝑬𝒊
2 nominal variables: 2 random: independence only 1 random: homogeneity
i = r = rows = x-category j = c = column = y-category
H0: πij = πi · πj i=1,…,r j=1,…,c Ha: At least one equality does not hold = association between x & y
(𝑶𝒊𝒋−𝑬𝒊𝒋)𝟐
TS: χ2 = ∑𝒓𝒊=𝟏 ∑𝒄𝒋=𝟏 ^𝑬𝒊𝒋
^Eij ≥ 1 & 80% ^Eij’s ≥ 5 !! χ2 ~ χ2 (r-1)(c-1)
𝑛𝑖. · 𝑛.𝑗
^Eij = n·^πi.·^π.j = Oij =observed =count ^Eij =expected =expected count
𝑛