oneway anova ppt

Upload: vikas-k-chauhan

Post on 19-Oct-2015

70 views

Category:

Documents


4 download

DESCRIPTION

Major points about ppt.

TRANSCRIPT

  • One-Way ANOVAOne-Way Analysis of Variance

  • One-Way ANOVAThe one-way analysis of variance is used

    to test the claim that two or more population means are equal< The one-way ANOVA uses an F statistic and is

    therefore often called the ANOVA F This is an extension of the two independent

    samples t-test In fact, with only two groups the t-test and

    one-way ANOVA are equivalent and willalways give the same p-value

  • t-tests vs ANOVA

    The difference between the t-test andthe ANOVA F is that the t-test works inthe same units as the original scoresand the ANOVA F works in squaredunits

    Thus, with only two groups: F = t2

  • The Logic and the Process of Analysis of Variance

    The purpose of ANOVA is much thesame as the t tests presented in thepreceding chapters

    The goal is to determine whether the mean differences that are obtained forthe sample data are sufficiently large tojustify a conclusion that there are meandifferences between the populationsfrom which the samples were obtained

  • Multiple t-tests versus ANOVA The difference between the ANOVA F

    and the t tests is that ANOVA can beused in situations where there are twoor more means being compared,whereas the t tests are limited tosituations where only two means areinvolved

    Analysis of variance is necessary toprotect researchers from excessive riskof a Type I error in situations where astudy is comparing more than twopopulation means.

  • Multiple t-tests vs ANOVA,contd

    Comparing more than two groups with t-tests would require a series of t tests toevaluate all of the mean differences. < Remember, a t test can compare only 2

    means at a time Although each t test can be done with a

    specific -level (risk of Type I error), the-levels accumulate over a series oftests so that the final experimentwise-level can be quite large

  • Multiple t-tests vs ANOVA,contd

    ANOVA allows researcher to evaluateall of the mean differences in a singlehypothesis test using a single -leveland, thereby, keeps the risk of a Type Ierror under control no matter how manymeans are being compared

    However, what if we just compared eachof the groups in a pairwise mannerusing a testwise -level (i.e., -level foreach test) of:< / (number of tests)

  • Multiple t-tests vs ANOVA -Example

    An instructor wants to see if studentstest scores differ depending on wherethey sit in the room (left side, middle,right side)

    Would you recommend that wecompare all of the tests simultaneouslywith an ANOVA F at =.05, or comparethe groups in a pairwise manner (e.g., Lvs M, L vs R, M vs R) at =.05/3 = .017?

  • One-way Independent Groups ANOVA

    Although ANOVA can be used in avariety of different research situations,this chapter discusses only independentgroups designs involving only oneindependent variable

    In other words, each of the groups has aseparate (and unrelated) sample ofsubjects

  • Variables in a One-Way ANOVAThe response (or dependent) variable is the

    variable youre comparing the groups on(e.g., anxiety)

    The factor (on independent) variable is thecategorical variable being used to definethe groups< We will assume k samples (groups)< The k samples are the levels of the factor

    The one-way is because each value is classified in exactly one way (i.e. there isonly one factor variable

  • Assumptions of the One-WayANOVA

    Assumptions< The data are randomly sampled< The variances of the populations are equal< The distribution of scores in each population are

    normal in shapeWe will come back to these assumptions

    after going through the steps for theANOVA

  • Null and Alternate Hypotheses The null hypothesis is that the means are all

    equal Ho: 1 = 2 = ... = k For example, with three groups: Ho: 1 = 2 = 3

    The alternative hypothesis is that at least one of the means is different from another In other words, Ho: 1 2 ... k would not be an

    acceptable way to write the alternate hypothesis (thisslightly contradicts Gravetter & Wallnau, buttecnically there is no way to test this specificalternative hypothesis with a one-way ANOVA)

  • One-Way ANOVA ExampleA classroom is divided into three sections:

    left, middle, and rightThe instructor wants to see if the students

    differ in test scores depending on wherethey sit in the room

    Ho: L = M = ... = RH1: The test scores are not the same for all

    sections

  • One-Way ANOVAA random sample of the students in each

    section was takenThe test scores were recorded:< Left: 82, 83, 97, 93, 55, 67, 53< Middle: 83, 78, 68, 61, 77, 54, 69, 51, 63< Right: 38, 59, 55, 66, 45, 52, 52, 61

  • One-Way ANOVAThe summary statistics for the grades of eachsection are shown in the table below

    8.9610.9517.63St. Dev80.29119.86310.90Variance

    53.5067.1175.71Mean

    897Sample sizeRightMiddleLeftSection

  • One-Way ANOVA

    Variation< Variation is the sum of the squares of the

    deviations between a value and the mean of thevalue

    < Sum of Squares (SS) is the term used torepresent this variation

  • One-Way ANOVA - Total SSAre all of the values identical?< No, so there is some variation in the data< This is called the total variation< Denoted SStotal for the total Sum of Squares(variation)< Sum of Squares is another name for variation

  • One-Way ANOVA - BetweenGroup SS

    Are all of the sample means identical?< No, so there is some variation between the

    groups< This is called the between group variation< Sometimes called the variation due to the factor< Denoted SSB for Sum of Squares (variation)

    between the groups

  • One-Way ANOVA - WithinGroup SS

    Are each of the values within each group identical?< No, there is some variation within the groups< This is called the within group variation< Sometimes called the error variation< Denoted SSW for Sum of Squares (variation)

    within the groups

  • One-Way ANOVA - Sources ofVariation

    Therefore, there are two sources ofvariation< the variation between the groups, SSB

    In other words, the variation due to the factor< the variation within the groups, SSW,

    In other words, the variation that cant be explained bythe factor (error variation)

    < Note that the sum of the between group andwithin group SS equals the total SS SST = SSB + SSW

  • One-Way ANOVA Here is the basic one-way ANOVA table

    Total

    Within

    BetweenSource SS df MS pF

  • One-Way ANOVA Total Sums of Squares, SST< The total variation in the scores regardless of group< Note that the sum of the scores for each group is

    denoted T1 ... Tk (TL = 530, TM = 604, TR = 428)< The sum of all the scores in the study is G = T = 1562

  • One-Way ANOVA Within Group Variation, SSW< The Within Group Variation represents the variation

    within the groups (if that was not obvious ...) < Note that the SS within each group for our example

    are: SSL = 1865.43, SSM = 958.89, SSR = 562.00

  • One-Way ANOVA Between Group Variation, SSB

    The between group variation is the variation among thesample means

    Each individual variation is weighted by the sample size

  • One-Way ANOVA After filling in the sum of squares, we have

    Total

    Within

    BetweenSource

    5287.83

    3386.32

    1901.52SS df MS pF

  • One-Way ANOVA - Degrees ofFreedom

    Degrees of Freedom, df< A degree of freedom occurs for each value that can

    vary before the rest of the values are predetermined< For example, if you had six numbers that had an

    average of 40, you would know that the total had to be 240. Five of the six numbers could be anything, but once the first five are known, the last one is fixed so thesum is 240. The df would be 6-1=5

    < The df is often one less than the number of values

  • One-Way ANOVA - Degrees ofFreedom

    The between group df is one less than the number of groups< We have three groups, so dfB = 2

    The within group df is the sum of the individual dfs of each group< The sample sizes are 7, 9, and 8< dfW = 6 + 8 + 7 = 21< Alternatively, dfW = N - k = 24 - 3 = 21

    The total df is one less than the sample size< dfT = 24 % 1 = 23

  • One-Way ANOVA Filling in the degrees of freedom gives this

    Total

    Within

    BetweenSource

    5287.83

    3386.32

    1901.52SS df MS pF

    2

    21

    23

  • One-Way ANOVA - MS Variances

    The variances are also called the Mean of the Squares and abbreviated by MS, often with an accompanying variable MSB or MSW

    They are an average squared deviation from the mean and are found by dividing the variation by the degrees offreedom

    MS = SS / df

    VariationVariancedf

    =

  • One-Way ANOVA - MSMSB= 1901.52 / 2= 950.76MSW= 3386.32 / 21= 161.25MST= 5287.83 / 23= 229.91< Notice that the MS(Total) is NOT the sum of

    MS(Between) and MS(Within).< This works for the SS(Total), but not the mean

    square MS(Total)< The MS(Total) is often not presented in an

    ANOVA summary table

  • One-Way ANOVA SummaryTable

    Completing the MS gives

    Total

    Within

    BetweenSource

    5287.83

    3386.32

    1901.52SS

    23

    21

    2df

    229.91

    161.25

    950.76MS pF

  • One-Way ANOVAF test statistic< An F test statistic is the ratio of two sample

    variances< Specifically, F is the ratio of the MSB to MSW

    In other words, how variability in there in the groupmeans relative to the variability within each group

    < F = MSB / MSWFor our data, F = 950.76 / 161.25 = 5.90

  • One-Way ANOVA Adding F to the table

    Total

    Within

    BetweenSource

    5287.83

    3386.32

    1901.52SS

    23

    21

    2df

    229.91

    161.25

    950.76MS pF

    5.90

  • One-Way ANOVA The F test is always a one-tailed test< In other words, since F is a ratio of two

    variances it can never be less than 0< Further small values of F indicate small

    differences between the means whereas largevalues of F indicate large differences betweenthe means

    The F test statistic has an F distribution with dfB and dfW degrees of freedom

  • One-way ANOVA - Decisionabout the Null Hypothesis

    Fcrit with =.05, dfB = 2, and dfW = 21 is3.47

    Therefore since our Fobtained (5.90) isgreater than our Fcrit we reject the nullhypothesis

    We conclude that test scores are notthe same for people who sit in the left,middle and right

  • One-way ANOVA - Decisionabout the Null Hypothesis with

    a p-value If we were using SPSS we would have

    obtained a p-valueHere is an example output:< Df SS MS F p < Section 2 1901.5 950.8 5.8961 0.009284< Within 21 3386.3 161.3

    Therefore since p < (.05), reject thenull hypothesis

  • One-Way ANOVA Completing the table with the p-value

    Total

    Within

    BetweenSource

    5287.83

    3386.32

    1901.52SS

    23

    21

    2df

    229.91

    161.25

    950.76MS pF

    5.90 .009

  • One-Way ANOVA There is enough evidence to support the

    claim that there is a difference in the mean scores of the left, middle, and right sectionsof the class.

    However, there are still a few importantpoints to consider:< What about effect sizes??< How do we know which sections differ in terms

    of mean test scores??< What about assumption violations?

    1: One-Way ANOVA 2: One-Way ANOVA 3: t-tests vs ANOVA 4: The Logic and the Process of Analysis of Variance 5: Multiple t-tests versus ANOVA 6: Multiple t-tests vs ANOVA, contd 7: Multiple t-tests vs ANOVA, contd 8: Multiple t-tests vs ANOVA -Example 9: One-way Independent Groups ANOVA 10: Variables in a One-Way ANOVA 11: Assumptions of the One-Way ANOVA 12: Null and Alternate Hypotheses 13: One-Way ANOVA Example 14: One-Way ANOVA 15: One-Way ANOVA 16: One-Way ANOVA 17: One-Way ANOVA - Total SS 18: One-Way ANOVA - Between Group SS 19: One-Way ANOVA - Within Group SS 20: One-Way ANOVA - Sources of Variation 21: One-Way ANOVA 22: One-Way ANOVA 23: One-Way ANOVA 24: One-Way ANOVA 25: One-Way ANOVA 26: One-Way ANOVA - Degrees of Freedom 27: One-Way ANOVA - Degrees of Freedom 28: One-Way ANOVA 29: One-Way ANOVA - MS 30: One-Way ANOVA - MS 31: One-Way ANOVA Summary Table 32: One-Way ANOVA 33: One-Way ANOVA 34: One-Way ANOVA 35: One-way ANOVA - Decision about the Null Hypothesis 36: One-way ANOVA - Decision about the Null Hypothesis with a p-value 37: One-Way ANOVA 38: One-Way ANOVA