Non-parametric Tests
e.g., Chi-Square
When to use various statistics
ParametricParametric Interval or ratio dataInterval or ratio data
Name parametric tests Name parametric tests we covered Tuesdaywe covered Tuesday
Non-parametricNon-parametric Ordinal and nominal Ordinal and nominal
datadata
To compare two groups on Mean Scores use t-test.
For more than 2 groups use Analysis of Variance (ANOVA)
Can’t get a mean from nominal or ordinal data.
Chi Square tests the difference in Frequency Distributions of two or more groups.
Chi-Square X2
Chi Square tests the difference in Chi Square tests the difference in frequency distributions of two or more frequency distributions of two or more groups. groups.
Test of Significance Test of Significance of two nominal variables or of two nominal variables or of a nominal variable & an ordinal variableof a nominal variable & an ordinal variable Used with a cross tabulation table Used with a cross tabulation table
Chi-Square
ected
ectedobserved
exp
)exp(2
Chi-Square =
Logic of Chi-Square Analysis
If the observed values are different enough If the observed values are different enough from the expected values, you reject the null from the expected values, you reject the null hypothesishypothesis
If the observed values and the expected values If the observed values and the expected values are similar, you fail to reject the null hypothesisare similar, you fail to reject the null hypothesis
Example: Work & Pregnancy The impact of working on pregnancyThe impact of working on pregnancy
Ha: Working during pregnancy increases the risk of miscarriage
H0: Working during pregnancy has NO impact on the risk of miscarriage
Example: Work & Pregnancy
Suppose in general population 5 in 100 Suppose in general population 5 in 100 pregnancy results in miscarriagepregnancy results in miscarriage
Probability(Probability(pp) = .05 or 5%) = .05 or 5%
Example: Work & Pregnancy
1000Total
950(95%)
No
50(5%)
Yes
Total (n=1000)
Mis
carr
iage
Example: Work & Pregnancy
500
No Work (n=500)
100
950 (95%)
50 (5%)
Total (n=1000)
500Total
No
Yes
Work (n=500)
Mis
carr
iage
H0: Working during pregnancy has NO impact on the risk of miscarriage
?
Example: Work & Pregnancy
500
475 (95%)
25 (5%)
No Work (n=500)
100
950 (95%)
50 (5%)
Total (n=1000)
500Total
475 (95%)No
25 (5%)Yes Miscarriage
Work (n=500)
Mis
carr
iage
If NULL hypothesis TRUE, both work & no work groups would have same probability of miscarriage. EXPECTED values:
Example: Work & Pregnancy
500
490 (98%)
10 (2%)
No Work (n=500)
100
950 (95%)
50 (5%)
Total (n=1000)
500Total
460 (92%)No
40 (8%)Yes Miscarriage
Work (n=500)
Mis
carr
iage
The actual values in your data = OBSERVED VALUES
Frequency of Sleep BehaviorBy Classroom Seating Location
p=.001
Front Center Back0
20
40
60
80
100Percent
Never Occasionally Often
p = .001
Frequency of Class ParticipationBy Classroom Seating Location
p=.002
Front Center Back0
10
20
30
40
50
60
70
80Percent
Never Occasionally Always
Tourist Expenditure:
Mainlander vs. Japanese
40%
10%
40%
50%
20%
40%
0%
10%
20%
30%
40%
50%
$100 or
less
$101 -
$500
$500+
Mainland
J apanese
Chi-Square x2 = 7.34, df = 2, p<.001
ExcelNot at all Some A lot
Males 12 10 8Females 6 6 18
0
2
4
6
8
10
12
14
16
18
Not at all Some A lot
Do You Like Vegetables?
Males
Females
Finished Chart
02468
1012141618
# of Subjects
Not at all Some A lot
Chi-Square = 6.85, p<.05
Do You Like Vegetables?
Males
Females
The Stats for ChartGender * Do you like veggies? Crosstabulation
12 10 8 30
40.0% 33.3% 26.7% 100.0%
66.7% 62.5% 30.8% 50.0%
20.0% 16.7% 13.3% 50.0%
6 6 18 30
20.0% 20.0% 60.0% 100.0%
33.3% 37.5% 69.2% 50.0%
10.0% 10.0% 30.0% 50.0%
18 16 26 60
30.0% 26.7% 43.3% 100.0%
100.0% 100.0% 100.0% 100.0%
30.0% 26.7% 43.3% 100.0%
Count
% within Gender
% within Do youlike veggies?
% of Total
Count
% within Gender
% within Do youlike veggies?
% of Total
Count
% within Gender
% within Do youlike veggies?
% of Total
Male
Female
Gender
Total
Not at all Some A lot
Do you like veggies?
Total
Chi-Square Tests
6.846a 2 .033
6.997 2 .030
5.863 1 .015
60
Pearson Chi-Square
Likelihood Ratio
Linear-by-LinearAssociation
N of Valid Cases
Value dfAsymp. Sig.
(2-sided)
0 cells (.0%) have expected count less than 5. Theminimum expected count is 8.00.
a.
Use SPSS Crosstabs (for nominal and ordinal data)
Click…. AnalyzeClick…. Analyze Descriptive statisticsDescriptive statistics CrosstabsCrosstabs Highlight variables for rowHighlight variables for row Highlight variable for columnHighlight variable for column Click statistics, click chi-square or Click statistics, click chi-square or
correlationcorrelation Etc.Etc.
Both chi square (non-parametric test) and t-test (parametric test)…
Examines if observed difference between Examines if observed difference between groups in your data is true differencegroups in your data is true difference
True difference = difference that exists in True difference = difference that exists in the populationthe population
HH00 says there is no difference in the says there is no difference in the population population
Which values are compared?
Chi-Square
t-test
Frequencies in each cell
Mean and Standard Deviation of each group
If H0 is true…Chi-Square
t-test
The values in the frequency table will look like Expected Values
The distribution of both groups will look like Population Distribution
Chi- square: If H0 is true…Males = Females (No difference)
70%
30%
Female TotalMale
70%70%NO
30%30%YES
t-test: If H0 is true …Total
Female
Male
Mean
# of cases
Test score
t-test: If H0 is NOT true …Total
Female
Male
# of cases
Test score
Mean Mean Mean
t-test: If H0 is NOT true …Total
Female
Male
# of cases
Test scoreMean Mean