Sei sulla pagina 1di 7

Comparison of means: F-test

ANOVA Example 1:
Research question: Among university students, is the
average weight of students in university A different than
that in university B and that in university C? Is there an
association between weight and type of university?

Ho : Average weight A = Average weight B = Average weight C


Ha : At least two averages are different

Statistical test: F-test = (Analysis of Variance)= ANOVA

Bivariate Analysis Comparison of means: F-test


One way F-Test (SPSS output): Example 1
Variable 1
Descriptives
2 LEVELS >2 LEVELS CONTINUOUS weight
95% Confidence Interval for
Mean
Variable 2

2 LEVELS X2 X2 t-test N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum

chi square test chi square test


A 290 65.59 13.297 .781 64.06 67.13 41 125
B 1340 63.46 14.201 .388 62.70 64.22 39 135
C 345 67.74 15.299 .824 66.12 69.36 42 115
>2 LEVELS X2 X2 ANOVA Total 1975 64.52 14.360 .323 63.89 65.15 39 135

chi square test chi square test (F-test)


ANOVA
CONTINUOUS t-test ANOVA -Correlation weight

(F-test) -Simple linear Sum of

Regression
Squares df Mean Square F Sig.
Between Groups 5414.963 2 2707.482 13.293 .000
Within Groups 401651.5 1972 203.677
Total 407066.5 1974
Comparison of means: F-test Comparison of means: F-test
This is the p-value for the F-test (testing of the null
If we want to know exactly what 2 means are different:
hypothesis of whether the mean of weight for A = mean of
need to ask for Post Hoc Test
weight for B = mean of weight for C).

If this p-value is > 0.05 then accept null hypothesis and Post Hoc Tests
conclude that the means of the 3 groups are equal. Multiple Comparisons

Dependent Variable: weight


Bonferroni
If the p-value is < 0.05 then reject null hypothesis (accept
the alternative) and conclude that at least two means are Mean
Difference 95% Confidence Interval

different. (I) university


A
(J) university
B
(I-J)
2.135
Std. Error
.924
Sig.
.063
Lower Bound Upper Bound
-.08 4.35
C -2.144 1.137 .178 -4.87 .58
ANOVA B A -2.135 .924 .063 -4.35 .08
C -4.279* .862 .000 -6.34 -2.21
weight C A 2.144 1.137 .178 -.58 4.87
Sum of B 4.279* .862 .000 2.21 6.34
Squares df Mean Square F Sig. *. The mean difference is significant at the .05 level.
Between Groups 5414.963 2 2707.482 13.293 .000
Within Groups 401651.5 1972 203.677
Total 407066.5 1974

Comparison of means: F-test Comparison of means: F-test


ANOVA A p-value < 0.05 (*) identifies significance between 2
weight
groups: In this example differences in average of weight are
Sum of between B and C.
Squares df Mean Square F Sig.
Between Groups 5414.963 2 2707.482 13.293 .000 Post Hoc Tests
Within Groups 401651.5 1972 203.677
Multiple Comparisons
Total 407066.5 1974
Dependent Variable: weight
Bonferroni

Since p-value is < 0.05 then reject null hypothesis (accept Mean
the alternative) and conclude that at least two means are (I) university (J) university
Difference
(I-J) Std. Error Sig.
95% Confidence Interval
Lower Bound Upper Bound
different. A B 2.135 .924 .063 -.08 4.35
C -2.144 1.137 .178 -4.87 .58
B A -2.135 .924 .063 -4.35 .08
C -4.279* .862 .000 -6.34 -2.21
C A 2.144 1.137 .178 -.58 4.87
BUT which of the B 4.279* .862 .000 2.21 6.34
*. The mean difference is significant at the .05 level.
means are different???
Comparison of means: F-test Comparison of means: F-test
Example 1: Post Hoc Tests (SPSS output): Example 2

Research question: Is there an association between weight Multiple Comparisons


and type of university? Dependent Variable: height
Bonferroni

Ho : Average weight A = Average weight B = Average weight C Mean


Ha : At least two averages are different (I) university (J) university
Difference
(I-J) Std. Error Sig.
95% Confidence Interval
Lower Bound Upper Bound
A B 1.158 .639 .211 -.37 2.69
C
Statistical test: F-test = 13.293; p<0.05
-1.171 .789 .413 -3.06 .72
B A -1.158 .639 .211 -2.69 .37
C -2.328* .599 .000 -3.76 -.89
C A 1.171 .789 .413 -.72 3.06
Conclusion: There is a significant relationship between weight B 2.328* .599 .000 .89 3.76
and type of university. Based on the post Hoc test, differences *. The mean difference is significant at the .05 level.
in average of weight are between B and C.

Comparison of means: F-test Comparison of means: F-test


One way F-Test (SPSS output): Example 2 One way F-Test (SPSS output): Example 2

Descriptives Descriptives

height height
95% Confidence Interval for 95% Confidence Interval for
Mean Mean
N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum
A 291 170.63 12.197 .715 169.22 172.03 72 194 A 291 170.63 12.197 .715 169.22 172.03 72 194
B 1339 169.47 9.446 .258 168.96 169.97 58 202 B 1339 169.47 9.446 .258 168.96 169.97 58 202
C 341 171.80 9.336 .506 170.80 172.79 150 201 C 341 171.80 9.336 .506 170.80 172.79 150 201
Total 1971 170.04 9.917 .223 169.60 170.48 58 202 Total 1971 170.04 9.917 .223 169.60 170.48 58 202

ANOVA

height Research question: Is there an association between height


Sum of and type of university?
Squares df Mean Square F Sig.
Between Groups 1589.713 2 794.856 8.140 .000
Within Groups 192172.9 1968 97.649
Total 193762.6 1970
Comparison of means: F-test Comparison of means: F-test
One way F-Test (SPSS output): Example 2 One way F-Test (SPSS output): Example 2
Multiple Comparisons
Descriptives Dependent Variable: height
Bonferroni
height
95% Confidence Interval for
Mean Mean
Difference 95% Confidence Interval
N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum (I) university (J) university (I-J) Std. Error Sig. Lower Bound Upper Bound
A 291 170.63 12.197 .715 169.22 172.03 72 194 A B 1.158 .639 .211 -.37 2.69
B 1339 169.47 9.446 .258 168.96 169.97 58 202 C -1.171 .789 .413 -3.06 .72
C 341 171.80 9.336 .506 170.80 172.79 150 201 B A -1.158 .639 .211 -2.69 .37
Total 1971 170.04 9.917 .223 169.60 170.48 58 202 C -2.328* .599 .000 -3.76 -.89
C A 1.171 .789 .413 -.72 3.06
B 2.328* .599 .000 .89 3.76
Ho: Average height A = Average height B = Average height C *. The mean difference is significant at the .05 level.

Ha : At least two averages are different There is a difference in average of height between B and C.

Comparison of means: F-test Comparison of means: F-test


One way F-Test (SPSS output): Example 2 One way F-Test (SPSS output): Example 2

ANOVA ANOVA

height height
Sum of Sum of
Squares df Mean Square F Sig. Squares df Mean Square F Sig.
Between Groups 1589.713 2 794.856 8.140 .000 Between Groups 1589.713 2 794.856 8.140 .000
Within Groups 192172.9 1968 97.649 Within Groups 192172.9 1968 97.649
Total 193762.6 1970 Total 193762.6 1970

Value of statistical test: 8.140 Conclusion: There is a significant relationship between


height and type of university. Based on the post Hoc test,
P-value: differences in average of height are between B and C.
0.000
Hypothesis Testing (P-Value) &
SPSS commands for F-test Confidence Interval (CI)
Example 1
In hypothesis testing (p-value):
Analyze
Compare Means Decision of whether to accept or not the
One way ANOVA null hypothesis
select weight as the dependent variable
select university as the factor
In confidence interval:
Go to options- chose descriptive statistics
Go to Post Hoc- Select Bonferroni for equal Estimation of the parameter
variance assumed Decision of whether to accept or not the
null hypothesis

SPSS commands for F-test P-value & Confidence interval


Example 2 Example 1: T-test
Analyze
Group Statistics
Compare Means
One way ANOVA gender N Mean Std. Deviation
Std. Error
Mean
select height as the dependent variable weight male 804 75.92 12.843 .453
select university as the factor female 1135 56.47 8.923 .265

Go to options- chose descriptive statistics Independent Samples Test

Go to Post Hoc- Select Bonferroni for equal Levene's Test for

variance assumed Equality of Variances t-test for Equality of Means


95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
weight Equal variances
132.258 .000 39.337 1937 .000 19.444 .494 18.475 20.414
assumed
Equal variances
37.059 1335.508 .000 19.444 .525 18.415 20.473
not assumed
CI: Estimation of the parameter CI: Decision on null hypothesis
Example 1: T-test
Independent Samples Test Ho : males = females males - females =0
Levene's Test for
Equality of Variances t-test for Equality of Means
95% Confidence

Ha : - 0
Interval of the

males females males females


Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
weight Equal variances
132.258 .000 39.337 1937 .000 19.444 .494 18.475 20.414
assumed
Equal variances
37.059 1335.508 .000 19.444 .525 18.415 20.473
not assumed

Confidence Interval: Estimation of the parameter is IF the confidence interval includes zero (for this
determining the difference in the means of weight for males &
females, in the population. example) then accept null hypothesis.
IF the confidence interval does not include zero,
Interpretation of 95% Confidence Interval: Difference in
the means of the two samples in this example is 19.4; In the then, reject the null hypothesis and accept the
population, we are 95% confident that the difference in the alternative.
means of weight for males and females is between 18.4 & 20.5.

CI: Decision on null hypothesis CI: Decision on null hypothesis


Example 1: T-test Example 1: T-test
Independent Samples Test
Independent Samples Test
Levene's Test for
Levene's Test for Equality of Variances t-test for Equality of Means
Equality of Variances t-test for Equality of Means 95% Confidence
95% Confidence Interval of the
Interval of the Difference
Mean Std. Error
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper weight Equal variances
weight Equal variances 132.258 .000 39.337 1937 .000 19.444 .494 18.475 20.414
132.258 .000 39.337 1937 .000 19.444 .494 18.475 20.414 assumed
assumed
Equal variances
Equal variances 37.059 1335.508 .000 19.444 .525 18.415 20.473
37.059 1335.508 .000 19.444 .525 18.415 20.473 not assumed
not assumed

Confidence Interval: Decision of whether to accept or not Decision of whether to accept or not the null hypothesis:
the null hypothesis.
The 95% CI = 18.4 - 20.5; does not include zero; hence reject
If the CI includes the value of the null hypothesis then accept
the null hypothesis and accept the alternative.
null hypothesis
If the CI does not include the value of the null hypothesis
then, reject the null hypothesis & accept the alternative.
CI: Decision on null hypothesis
Example 2: T-test
By looking at the 95% CI; would your decision be to accept
or reject the null hypothesis? Explain.
Group Statistics

Std. Error
gradf N Mean Std. Deviation Mean
weight undergraduate 1703 64.34 14.473 .351
graduate 248 65.62 13.517 .858

Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
weight Equal variances
.130 .718 -1.315 1949 .189 -1.283 .976 -3.197 .630
assumed
Equal variances
-1.384 335.007 .167 -1.283 .927 -3.107 .540
not assumed

CI: Decision on null hypothesis


Example 2: T-test
By looking at the 95% CI; would your decision be to accept
or reject the null hypothesis? Explain.
Independent Samples Test

Levene's Test for


Equality of Variances t-test for Equality of Means
95% Confidence
Interval of the
Mean Std. Error Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
weight Equal variances
.130 .718 -1.315 1949 .189 -1.283 .976 -3.197 .630
assumed
Equal variances
-1.384 335.007 .167 -1.283 .927 -3.107 .540
not assumed

The 95% CI = -3.197 0.630; It does include zero; hence


accept the null hypothesis.

Potrebbero piacerti anche