tables and non parametric tests
DESCRIPTION
Tables and Non Parametric Tests. Lecture 5. Compare Means Menu. Compare Means Output. ”Service package”. ”Important package”. But What if Data are NOT Normal?. Non-normal Data. Binomial data. Really non-normal data. Log-normal data. Transform Data. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/1.jpg)
Tables and Non Parametric Tests
Tables and Non Parametric Tests
Lecture 5
![Page 2: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/2.jpg)
Compare Means Menu
![Page 3: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/3.jpg)
Compare Means OutputGroup Statistics
10 2,40 1,275 ,403
10 2,85 1,247 ,394
Group1
2
ObservationN Mean Std. Deviation
Std. ErrorMean
Independent Samples Test
,004 ,949 -,793 18 ,438 -,447 ,564 -1,632 ,738
-,793 17,991 ,438 -,447 ,564 -1,632 ,738
Equal variancesassumed
Equal variancesnot assumed
ObservationF Sig.
Levene's Test forEquality of Variances
t df Sig. (2-tailed)Mean
DifferenceStd. ErrorDifference Lower Upper
95% ConfidenceInterval of the
Difference
t-test for Equality of Means
”Service package””Service package”
”Important package””Important package”
![Page 4: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/4.jpg)
![Page 5: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/5.jpg)
Non-normal Data
0 5 10 15
Observed Value
0
3
6
9
12
15
Exp
ect
ed
No
rmal
Va
lue
Normal Q-Q Plot of Not Normal
-10 0 10 20
Observed Value
-10
0
10
20
Ex
pe
cte
d N
orm
al V
alu
e
Normal Q-Q Plot of Not Normal Either
Log-normal dataLog-normal data
Transform DataTransform Data
Compare the means of the transformed (normal) data
Compare the means of the transformed (normal) data
Binomial dataBinomial data
Really non-normal data
Really non-normal data
![Page 6: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/6.jpg)
Binomial Data
Are the proportions of Turks in Aalborg and Århus the same?
Non-Turks
Turks
Aalborg 465 35
Århus 358 42
![Page 7: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/7.jpg)
Are the proportions significantly different?
Non-Turks
Turks
Aalborg 465 35
Århus 358 42
7.0%7.0%
10.5%10.5%
Compare 3.5% (= 10.5 – 7.0%)
with suitable SE.
Compare 3.5% (= 10.5 – 7.0%)
with suitable SE.
![Page 8: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/8.jpg)
Another Approach
Non-Turks
Turks
Aalborg 465 35
Århus 358 42
Non-Turks
Turks
Aalborg 457 43
Århus 366 34
ObservedObserved ExpectedExpected
In total 77 turks in a 900 sample, i.e. 8.6%
In total 77 turks in a 900 sample, i.e. 8.6%
We expect 34 turks in
Århus (8.6% of 400) We expect 34 turks in
Århus (8.6% of 400)
![Page 9: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/9.jpg)
Same proportion in Aalborg and Århus?
Non-Turks
Turks
Aalborg 465 35
Århus 358 42
Non-Turks
Turks
Aalborg 457 43
Århus 366 34
ObservedObserved ExpectedExpected
Observed and expected should be
close
Observed and expected should be
close
![Page 10: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/10.jpg)
How to do it in SPSS
…or data could be organized in 900 rows
…or data could be organized in 900 rows
![Page 11: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/11.jpg)
Cross-Tabs
City * Etnicity Crosstabulation
Count
465 35 500
358 42 400
823 77 900
Aalborg
Århus
City
Total
Non-Turk Turk
Etnicity
Total
![Page 12: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/12.jpg)
Tricks
![Page 13: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/13.jpg)
City * Etnicity Crosstabulation
465 35 500
457,2 42,8 500,0
93,0% 7,0% 100,0%
358 42 400
365,8 34,2 400,0
89,5% 10,5% 100,0%
823 77 900
823,0 77,0 900,0
91,4% 8,6% 100,0%
Count
Expected Count
% within City
Count
Expected Count
% within City
Count
Expected Count
% within City
Aalborg
Århus
City
Total
Non-Turk Turk
Etnicity
Total
Output
Chi-Square Tests
3,480b 1 ,062
3,047 1 ,081
3,454 1 ,063
,072 ,041
3,476 1 ,062
900
Pearson Chi-Square
Continuity Correctiona
Likelihood Ratio
Fisher's Exact Test
Linear-by-LinearAssociation
N of Valid Cases
Value dfAsymp. Sig.
(2-sided)Exact Sig.(2-sided)
Exact Sig.(1-sided)
Computed only for a 2x2 tablea.
0 cells (,0%) have expected count less than 5. The minimum expected count is34,22.
b.
Expected values
Expected values
ProportionsProportions
P-valueP-value
Test Statistic
Test Statistic
![Page 14: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/14.jpg)
Binomial
One-SampleOne-Sample Two-SampleTwo-Sample K-SampleK-Sample
Is proportion equal to 10%
Proportions in Aalborg and
Århus are equal
Proportions in Aalborg, Randers, Vester Hjermislev
and Århus are equal
Cross-Tabs handles two or
more cities (categories)
Cross-Tabs handles two or
more cities (categories)
1. Calculate proportion and 95% CI
2. Is 10% in the CI?
1. Calculate proportion and 95% CI
2. Is 10% in the CI?
…or use SPSS as I will show
later
…or use SPSS as I will show
later
![Page 15: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/15.jpg)
Non-Normal Data
1,00 1,50 2,00 2,50 3,00 3,50 4,00 4,50 5,00
0 5 10 15 20
Observations
Ranks
![Page 16: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/16.jpg)
Statistics on Ranks
Rank
1 4
2 6
3 7
5 10
8 12
9 13
11 16
14 17
15 19
18 20
Mean Ranks should be close
if the two distributions are located similarly
Mean Ranks should be close
if the two distributions are located similarly
8.6 12.4
![Page 17: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/17.jpg)
How to do it in SPSS
![Page 18: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/18.jpg)
![Page 19: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/19.jpg)
OutputDescriptive Statistics
210 3,2366 1,11176 1,10 4,50 2,0000 3,6000 4,2000
210 1,59 ,493 1 2 1,00 2,00 2,00
Observation
City
N Mean Std. Deviation Minimum Maximum 25th 50th (Median) 75th
Percentiles
Ranks
86 93,31 8025,00
124 113,95 14130,00
210
CityAalborg
Århus
Total
ObservationN Mean Rank Sum of Ranks
Test Statisticsa
4284,000
8025,000
-2,426
,015
Mann-Whitney U
Wilcoxon W
Z
Asymp. Sig. (2-tailed)
Observation
Grouping Variable: Citya.
Mann-Whitney Test ”Service package””Service package”
”Interesting package”
”Interesting package”
”Important package””Important package”
![Page 20: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/20.jpg)
One-Sample (Symmetry or Location)
Kiama Blowhole Data
• Highly skew distribution
• Average approx 40 sec
• Rarely above 100 sec
Median equal to 40 sec?
Only above 100 sec in 1% of the eruptions?
Normal distributed ?
![Page 21: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/21.jpg)
Normal distributed?
![Page 22: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/22.jpg)
OutputOne-Sample Kolmogorov-Smirnov Test
64
39,83
33,751
,173
,173
-,165
1,382
,044
N
Mean
Std. Deviation
Normal Parameters a,b
Absolute
Positive
Negative
Most ExtremeDifferences
Kolmogorov-Smirnov Z
Asymp. Sig. (2-tailed)
TimeintervalbetweenKiama
Blowholeeruptions
Test distribution is Normal.a.
Calculated from data.b.
One-Sample Kolmogorov-Smirnov Test 2
64
7
169
,464
,464
-,016
3,708
,000
N
Minimum
Maximum
Uniform Parametersa,b
Absolute
Positive
Negative
Most ExtremeDifferences
Kolmogorov-Smirnov Z
Asymp. Sig. (2-tailed)
TimeintervalbetweenKiama
Blowholeeruptions
Test distribution is Uniform.a.
Calculated from data.b.
Data are
Not Normal
Not Uniform
But QQ-plots are better!!
But QQ-plots are better!!
![Page 23: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/23.jpg)
Location of medianMedian equal to 40
sec?
Only above 100 sec in 1% of the eruptions?
![Page 24: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/24.jpg)
Median equal to 40 sec?
![Page 25: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/25.jpg)
Output
Descriptive Statistics
64 39,83 33,751 7 169 14,25 28,00 60,00Timeintervalbetween KiamaBlowhole eruptions
N Mean Std. Deviation Minimum Maximum 25th 50th (Median) 75th
Percentiles
NPar Tests
Binomial Test
<= 40 41 ,64 ,50 ,033a
> 40 23 ,36
64 1,00
Group 1
Group 2
Total
Timeintervalbetween KiamaBlowhole eruptions
Category NObserved
Prop. Test Prop.Asymp. Sig.
(2-tailed)
Based on Z Approximation.a.
NOPE!Median equal to 40 sec?
![Page 26: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/26.jpg)
Only above 100 sec in 1% of the eruptions?
Binomial Test
<= 100 62 ,97 ,01 ,000a
> 100 2 ,03
64 1,00
Group 1
Group 2
Total
Timeintervalbetween KiamaBlowhole eruptions
Category NObserved
Prop. Test Prop.Asymp. Sig.
(1-tailed)
Based on Z Approximation.a.
![Page 27: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/27.jpg)
K samples test
![Page 28: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/28.jpg)
Output
Ranks
86 85,87
124 119,11
115 268,00
325
CityAalborg
Århus
Randers
Total
NumberN Mean Rank
Kruskal-Wallis Test
Test Statisticsa,b
229,298
2
,000
Chi-Square
df
Asymp. Sig.
Number
Kruskal Wallis Testa.
Grouping Variable: Cityb.
”Important package””Important package”
”Service package””Service package”
![Page 29: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/29.jpg)
Overview (normal samples)
One sampleOne sample
Two samples (paired)Two samples (paired)
K samplesK samples
Two samples (unpaired)Two samples (unpaired)
![Page 30: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/30.jpg)
Overview (binomial samples)
One sampleOne sample
Two samples (paired)Two samples (paired)
K samplesK samples
Two samples (unpaired)Two samples (unpaired)
![Page 31: Tables and Non Parametric Tests](https://reader031.vdocuments.net/reader031/viewer/2022031910/568132a7550346895d994997/html5/thumbnails/31.jpg)
Overview (non normal samples)
One sampleOne sample
Two samples (paired)Two samples (paired)
K samplesK samples
Two samples (unpaired)Two samples (unpaired)