<<

Bivariate Analysis

Variable 1 2 LEVELS >2 LEVELS CONTINUOUS Variable 2 2 LEVELS X2 X2 t-test chi square test chi square test

>2 LEVELS X2 X2 ANOVA chi square test chi square test (F-test) CONTINUOUS t-test ANOVA -Correlation (F-test) -Simple linear Regression

Comparison of : F-test

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

Comparison of means: F-test

ƒ One way F-Test (SPSS output): Example 1

Descriptives weight 95% Confidence Interval for N Mean Std. Deviation Std. Error Lower Bound Upper Bound Minimum Maximum 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 Total 1975 64.52 14.360 .323 63.89 65.15 39 135

ANOVA

weight Sum of 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

ƒ This is the p-value for the F-test (testing of the null hypothesis of whether the mean of weight for A = mean of weight for B = mean of weight for C).

ƒ If this p-value is > 0.05 then accept null hypothesis and conclude that the means of the 3 groups are equal.

ƒ If the p-value is < 0.05 then reject null hypothesis (accept the alternative) and conclude that at least two means are different.

ANOVA

weight Sum of 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

ANOVA

weight Sum of 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

ƒ Since p-value is < 0.05 then reject null hypothesis (accept the alternative) and conclude that at least two means are different.

BUT which of the means are different???

Comparison of means: F-test

ƒ If we want to know exactly what 2 means are different: need to ask for Post Hoc Test

Post Hoc Tests

Multiple Comparisons

Dependent Variable: weight Bonferroni

Mean Difference 95% Confidence Interval (I) university (J) university (I-J) Std. Error Sig. Lower Bound Upper Bound 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 B 4.279* .862 .000 2.21 6.34 *. The mean difference is significant at the .05 level. Comparison of means: F-test

ƒ A p-value < 0.05 (*) identifies significance between 2 groups: In this example differences in average of weight are between B and C. Post Hoc Tests

Multiple Comparisons

Dependent Variable: weight Bonferroni

Mean Difference 95% Confidence Interval (I) university (J) university (I-J) Std. Error Sig. Lower Bound Upper Bound 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 B 4.279* .862 .000 2.21 6.34 *. The mean difference is significant at the .05 level.

Comparison of means: F-test

Example 1:

ƒ Research question: 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 = 13.293; p<0.05

ƒ Conclusion: There is a significant relationship between weight and type of university. Based on the post Hoc test, differences in average of weight are between B and C.

Comparison of means: F-test

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

Descriptives height 95% Confidence Interval for Mean 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 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 Total 1971 170.04 9.917 .223 169.60 170.48 58 202

ANOVA

height Sum of 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

ƒ Post Hoc Tests (SPSS output): Example 2

Multiple Comparisons

Dependent Variable: height Bonferroni

Mean Difference 95% Confidence Interval (I) university (J) university (I-J) Std. Error Sig. Lower Bound Upper Bound A B 1.158 .639 .211 -.37 2.69 C -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 B 2.328* .599 .000 .89 3.76 *. The mean difference is significant at the .05 level.

Comparison of means: F-test

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

Descriptives height 95% Confidence Interval for Mean 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 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 Total 1971 170.04 9.917 .223 169.60 170.48 58 202

ƒ Research question: Is there an association between height and type of university?

Comparison of means: F-test

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

Descriptives height 95% Confidence Interval for Mean 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 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 Total 1971 170.04 9.917 .223 169.60 170.48 58 202

ƒ Ho: Average height A = Average height B = Average height C

ƒ Ha: At least two averages are different Comparison of means: F-test

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

ANOVA height Sum of 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

ƒ Value of statistical test: 8.140

ƒ P-value: 0.000

Comparison of means: F-test

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

Multiple Comparisons

Dependent Variable: height Bonferroni

Mean Difference 95% Confidence Interval (I) university (J) university (I-J) Std. Error Sig. Lower Bound Upper Bound A B 1.158 .639 .211 -.37 2.69 C -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 B 2.328* .599 .000 .89 3.76 *. The mean difference is significant at the .05 level.

ƒ There is a difference in average of height between B and C.

Comparison of means: F-test

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

ANOVA height Sum of 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

ƒ Conclusion: There is a significant relationship between height and type of university. Based on the post Hoc test, differences in average of height are between B and C. SPSS commands for F-test

Example 1 † Analyze „ Compare Means

† One way ANOVA ƒ select weight as the dependent variable ƒ select university as the factor

† Go to options- chose descriptive

† Go to Post Hoc- Select Bonferroni for equal variance assumed

SPSS commands for F-test

Example 2 † Analyze „ Compare Means

† One way ANOVA ƒ select height as the dependent variable ƒ select university as the factor

† Go to options- chose

† Go to Post Hoc- Select Bonferroni for equal variance assumed

T-TEST: CI VS. P-VALUE Hypothesis Testing (P-Value) & Confidence Interval (CI)

In hypothesis testing (p-value): ƒ Decision of whether to accept or not the null hypothesis

In confidence interval: ƒ Estimation of the parameter ƒ Decision of whether to accept or not the null hypothesis

P-value & Confidence interval

ƒ Example 1: T-test

Group Statistics

Std. Error gender N Mean Std. Deviation Mean weight male 804 75.92 12.843 .453 female 1135 56.47 8.923 .265

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 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

ƒ Example 1: T-test

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 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 determining the difference in the means of weight for males & females, in the population.

ƒ Interpretation of 95% Confidence Interval: Difference in the means of the two samples in this example is 19.4; In the population, we are 95% confident that the difference in the means of weight for males and females is between 18.4 & 20.5. CI: Decision on null hypothesis

ƒ Example 1: T-test

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 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: Decision of whether to accept or not the null hypothesis. Ž If the CI includes the value of the null hypothesis then accept 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

ƒ Ho : μ males = μ females μ males - μ females = 0

ƒ Ha : μ males ≠ μ females μ males - μ females ≠ 0

ƒ IF the confidence interval includes zero (for this example) then accept null hypothesis. ƒ IF the confidence interval does not include zero, then, reject the null hypothesis and accept the alternative.

CI: Decision on null hypothesis

ƒ Example 1: T-test

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 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

ƒ Decision of whether to accept or not the null hypothesis:

The 95% CI = 18.4 - 20.5; does not include zero; hence reject the null hypothesis and 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.