Successfully reported this slideshow.
Upcoming SlideShare
×

Anova (Statistics)

3,536 views

Published on

• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Anova (Statistics)

1. 1. ANOVAAnalysis of Variance Ibrahim bin Abdullah ibrahim.lecturer@gmail.com www.facebook.com/ibrahim.abdullah
2. 2. Types of samples and appropriate testing:1 sample •Use 1-sample t-test2 samples •Use 2 samples t-test3 samples •Use ANOVA
3. 3. ANOVA can be:• 1-way  1 independent variable• 2-way  2 independent variable• 3,4,etc-way  3,4,etc independent variable
4. 4. In ANOVA, whatever the type, there is always only 1 Dependent VariableANOVA is UNIVARIATE (1 Dependent Variable). If there are more than 1 Dependent Variables, use MANOVA
5. 5. It can be further classified: INDEPENDENT ANOVA 1-WAY ANOVA REPEATED MEASURE ANOVA
6. 6. INDEPENDENT ANOVA REPEATED 2-WAY ANOVA MEASURE ANOVA MIXED ANOVASo, they are called 2-way independent Anova, 2-way mixed Anova, etc
7. 7. Specky Students taking blueberryWe are testing the Non-speckyeffect of blueberry on the eye sight. Specky Students NOT taking blueberry Non-specky We can do t-test TWICE to test the samples. However, doing thatwill increase α (type 1 error ie. we tend to reject Ho when Ho should not be rejected). Instead of doing t-test repeatedly, we must do ANOVA
8. 8. One-wayIndependent ANOVA INDEPENDENT ANOVA First part of this chapter deals with 1-way1-WAY ANOVA Independent Anova REPEATED MEASURE ANOVA Later we will look at 1-way Repeated
9. 9. One-way Independent ANOVA Assumptions that MUST be fulfilled: 1. Normality (any one of three) W-S1.2.3. W-S or K-S (p ≥ 0.05) Analyze Descriptive Explore Skewness test (within S 2SE)4. Plot5.  Normality s  Coefficient of variation: 100 30% x 2. Homogeneity of variance Levene’s test (p ≥ 0.05)
10. 10. One-way Independent ANOVAHypotheses:1. Ho μ1 = μ2 = μ3 ….. μi2. HA At least one pair of means is not equal (it can be μ1≠μ2 = μ3 etc)
11. 11. One-way Independent ANOVAIf p < 0.05 (significant, ie Ho rejected), then must do Post Hoc test (multiple pairwise comparison test) Post Hoc Tests Tukey Dunnette Bonferroni Test Test TestIf homogenous, No If not homogenous, For repeated measure control Has control On the other hand if not significant, test stops
12. 12. One-way Independent ANOVAA study is carried out to determine if there is difference in theknowledge of Vision and Mission of the university among studentsof first year, second year and third year of The Management andScience University (MSU) Knowledge Score on Vision and Mission of MSU Student Yr1 60 55 45 50 55 60 70 45 35 35 Student Yr2 65 60 70 75 70 78 79 80 81 82 85 Student Yr3 60 60 60 60 70 70 70 70 75 70 Hypotheses: Ho: μ1 = μ2 = μ3 HA: At least one pair of means is not equal (it can be μ1≠μ2 = μ3 etc) Transfer the data into PASW.Remember, since this is an independent test, all samples are recorded in similar column.
13. 13. One-way Independent ANOVA Variable view
14. 14. One-way Independent ANOVA Transfer the data from the test conducted in “Data View” Since this is an independent test, same column (in this example labeled “year”) used for all samples In repeated measure test we use different column for every variable
15. 15. ANALYSIS 1 Normality test
16. 16. One-way Independent ANOVA Descriptives MSU Year MENU Knowledge Year 1 Mean Statistic 51.000 Std. Error 3.5590 95% Confidence Interval Lower 42.949 1. Analyze for Mean Bound 2. Descriptive Statistics Upper 59.051 3. Explore Bound 4. Dependent = score 5% Trimmed Mean 50.833 5. Factor = year Median 52.500 6. Plots Variance 126.667 7.  Normality plot Std. Deviation 11.2546 Minimum 35.0 Maximum 70.0 Case Processing Summary Range 35.0 MSU Year Cases Interquartile Range 17.5 Skewness -.018 .687 Valid Missing Total Kurtosis -.563 1.334 Year 2 Mean 75.000 2.3549 N Percent N Percent N Percent 95% Confidence Interval Lower 69.753 for Mean BoundKnowledge Year 1 10 100.0% 0 .0% 10 100.0% Upper 80.247 dimension1 Year 2 11 100.0% 0 .0% 11 100.0% Bound 5% Trimmed Mean 75.278 Year 3 10 100.0% 0 .0% 10 100.0% Median 78.000 Variance 61.000 Tests of Normality Std. Deviation 7.8102 MSU Year Kolmogorov-Smirnova Shapiro-Wilk Minimum 60.0 Maximum 85.0 Statistic df Sig. Statistic df Sig. Range 25.0Knowledge Year 1 .139 10 .200* .952 10 .695 Interquartile Range 11.0 Year 2 dimension1 .195 11 .200* .931 11 .424 Skewness -.731 .661 Year 3 .327 10 .003 .770 10 .006 Kurtosis -.396 1.279a. Lilliefors Significance Correction Year 3 Mean 66.500 1.8333 95% Confidence Interval Lower 62.353*. This is a lower bound of the true significance. for Mean Bound Upper 70.647 Bound 5% Trimmed Mean 66.389 S-W test showed that Year 1 and Year 2 Median 70.000 were normal but Year 3 was not Variance 33.611 Std. Deviation 5.7975 So, check Year 3 skewness: Minimum 60.0 •Skewness -.192 .687 Maximum 75.0 It showed normal. So we can use ANOVA Range 15.0 Interquartile Range 10.0 Skewness -.192 .687 Kurtosis -1.806 1.334
17. 17. ANALYSIS 2 The ANOVA test
18. 18. One-way Independent ANOVA MENU1. Analyze2. Compare means3. One-way ANOVA If we have control, under Post Hoc choose4. Dependent = score Dunnette only5. Factor = year6. Post Hoc If p > 0.05, use Tukey7.  Tukey If p < 0.05, use Dunnette’s T38.  Dunnette’s T39. Option Remember, we look at Post Hoc only if we10.  Descriptive reject Ho (ie there is at least a pair of means11.  Homogeneity not equal) Test of Homogeneity of Variances Knowledge Levene Statistic df1 df2 Sig. 2.022 2 28 .151 P > 0.05, so homogeneity is assumed Knowledge MSU Year Subset for alpha = 0.05 Homogenous subset N 1 2 See there are group 1 (Year 1) and group 2 (Year 3 and Year 2) Tukey HSDa,b Year 1 10 51.000 So, Year 2 and Year 3 are not significant, Year 3 10 66.500 but both are significant when compared to Year 1 dimension1 Year 2 11 75.000 Sig. 1.000 .079 μ1 ≠ μ2 = μ3 (ie at least one pair of means is not equal) Means for groups in homogeneous subsets are displayed. a. Uses Harmonic Mean Sample Size = 10.313. b. The group sizes are unequal. The harmonic mean of the group sizes is used. Type I error levels are not guaranteed.
19. 19. ANALYSIS 3 GLM (General Linear Model) testThe general linear model incorporates a number of different statistical models: ANOVA, ANCOVA, MANOVA, MANCOVA, ordinary linear regression, t-test and F-test. GLM is therefore a more general concept, compared to ANOVA.
20. 20. One-way Independent ANOVA MENU 11. Analyze2. General Linear Model3. Univariate 2 Plots Click year to Horizontal Axis first, then click Add
21. 21. One-way Independent ANOVA3 5 SavePost Hoc Cook’s distance shows the outliers. The value should be less than 1. Value of more than 1 means outlier (that can be removed). See Cook’s distance at DATA VIEW under COO_14Options Estimate of effect size will returns “Partial ETA Squared”. Value of 0.14 or more means high. Effect size is NOT influenced by sample number (as opposed to p value, which can be influenced by sample size) If p is high (not significant, ie rejecting Ho), look at Observed Power (B). If B is high (0.8 ie. 80% or more), then confirm to reject Ho. If B is low, probably means that the low sample size used in the test results in rejection of Ho. Ho can still be accepted, instead of rejected – refer to type II error
22. 22. One-way Independent ANOVA Estimated Marginal Means This refers to unweighted means. This is MSU Year important when comparing the means of Dependent Variable:Knowledge unequal sample sizes (as in ANOVA), where MSU Year 95% Confidence Interval you take into consideration each mean in porportion to its sample size. Unequal Lower Upper sample size can occur eg. due to drop-out Mean Std. Error Bound Bound of participants which can destroy the Year 1 51.000 2.707 45.454 56.546 random assignment of subjects to Year 2 75.000 2.581 69.712 80.288 conditions, a critical feature of the dimension1 experimental design Year 3 66.500 2.707 60.954 72.046Estimates of Effect Size (Partial ETA Squared) and Observed Power Tests of Between-Subjects Effects Dependent Variable:Knowledge Source Type III Sum of Partial Eta Noncent. Observed Squares df Mean Square F Sig. Squared Parameter Powerb Corrected Model 3075.242a 2 1537.621 20.976 .000 .600 41.952 1.000 Intercept 127380.859 1 127380.859 1737.717 .000 .984 1737.717 1.000 year 3075.242 2 1537.621 20.976 .000 .600 41.952 1.000 Error 2052.500 28 73.304 Total 134160.000 31 Corrected Total 5127.742 30 a. R Squared = .600 (Adjusted R Squared = .571) b. Computed using alpha = .05
23. 23. One-way Independent ANOVA Cook’s Distance
24. 24. One-way Independent ANOVA Profile PlotThe profile plot can be included in the thesis result
25. 25. One-wayRepeat Measure ANOVA INDEPENDENT ANOVA We have looked at 1-way1-WAY ANOVA Independent Anova REPEATED MEASURE ANOVA Now, we look at 1-way Repeated
26. 26. One-way Repeat Measure ANOVAIn Repeat Measure, we repeat the test on the SAMEsample but at DIFFERENT time intervals.The data for different time or day must be put inDIFFERENT COLUMNS of PASW Variable View.In this test, we are not concerned about homogeneity.Rather we are concerned about sphericity (Maunchly’sSphericity Test). The value, W>0.05 showedsphericity.[If W>0.05, read Sphericity row. If W<0.05, read Greenhouse row]For pairwise comparison (Post Hoc), we do not useTukey or Dunnette but Bonferroni Test.
27. 27. One-way Repeat Measure ANOVA A study is carried out to determine if there is difference in the knowledge of Vision and Mission of the university on different days among students of first year of The Management and Science University (MSU) Knowledge Score on Vision and Mission of MSU Sunday 60 55 45 50 55 60 70 45 35 35 65 Monday 60 55 45 50 55 82 85 60 60 60 60 Friday 85 60 60 60 60 70 70 70 70 75 70 Hypotheses: Ho: μ1 = μ2 = μ3 HA: At least one pair of means is not equal (it can be μ1≠μ2 = μ3 etc) Transfer the data into PASW.Remember, since this is repeated measure test, all samples are recorded in different columns.
28. 28. One-way Repeat Measure ANOVA Variable view
29. 29. One-way Repeat Measure ANOVA Transfer the data from the test conducted in “Data View”In repeated measure test we use different column for every variable
30. 30. One-way Repeat Measure ANOVA MENU1. Analyze2. General Linear Model3. Repeated Measures4. Factor5. Number of levels = 36. Define7. (Move all knowledge to right)8. Option9.  Compare main effects10. (See picture on right, Select Bonferroni)11.  Descriptive12.  Estimates13.  Observed power14. Save15.  Cook’s distance16. Plots17. Move factor1 to Horizontal Axis18. Add19. Continue
31. 31. One-way Repeat Measure ANOVA Mauchlys Test of Sphericityb Measure:MEASURE_1 Within Subjects Effect Epsilona Approx. Chi- Greenhouse-Look at Mauchly’s W Mauchlys W Square df Sig. Geisser Huynh-Feldt Lower-bound dimension1 factor1 .961 .359 2 .835 .962 1.000 .500 Tests the null hypothesis that the error covariance matrix of the orthonormalized transformed dependent variables is proportional toIn this example, W = 0.961 an identity matrix. a. May be used to adjust the degrees of freedom for the averaged tests of significance. Corrected tests are displayed in the Tests ofSince W > 0.05, we will read Within-Subjects Effects table. b. Design: InterceptSphericity, not Greenhouse Within Subjects Design: factor1 Tests of Within-Subjects Effects Measure:MEASURE_1 Source Type III Sum Partial Eta Noncent. Observed of Squares df Mean Square F Sig. Squared Parameter Powera W > 0.05 factor1 Sphericity Assumed 1397.515 2 698.758 9.347 .001 .483 18.694 .957 W < 0.05 Greenhouse-Geisser 1397.515 1.925 726.116 9.347 .002 .483 17.990 .951 Huynh-Feldt 1397.515 2.000 698.758 9.347 .001 .483 18.694 .957 Lower-bound 1397.515 1.000 1397.515 9.347 .012 .483 9.347 .787 Error(factor1) Sphericity Assumed 1495.152 20 74.758 Greenhouse-Geisser 1495.152 19.246 77.685 See that the Observed Power is high Huynh-Feldt 1495.152 20.000 74.758 Lower-bound 1495.152 10.000 149.515 a. Computed using alpha = .05[If W>0.05, read Sphericity row. If W<0.05, read Greenhouse row]
32. 32. One-way Repeat Measure ANOVA Pairwise Comparisons Measure:MEASURE_1 (I) factor1 (J) factor1 95% Confidence IntervalPairwise Comparisons here Mean Difference Std. for Differencea Lower Upper is Bonferroni test (I-J) Error Sig.a Bound Bound 1 2 -8.818 3.508 .092 -18.886 1.2501 and 2 are not significant (p=0.092) dimension2 3 -15.909* 4.035 .008 -27.490 -4.328 2 1 8.818 3.508 .092 -1.250 18.8861 and 3 are significant (p=0.08) dimension1 dimension2 3 -7.091 3.491 .209 -17.112 2.930 3 1 15.909* 4.035 .008 4.328 27.490So we reject Ho because at least one pair of dimension2 2 7.091 3.491 .209 -2.930 17.112means is not equal Based on estimated marginal means a. Adjustment for multiple comparisons: Bonferroni. *. The mean difference is significant at the .05 level.
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}