hypothesis testing in excel

Upload: newton28182

Post on 03-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Hypothesis Testing in Excel

    1/10

    Hypothesis Testing in Excel

    The first step is to get the data for the two groups you want organized so that theobservations from one group are together and the observations for the second group are

    together. They dont have to be in separate columns, but this is one way to do it. They

    would just be sorted in one column so that the observations from the first group are alltogether and so that the observations from the second group are all together.

    Then, choose Tools/DataAnalysis/tTest! Two "ample Assuming #ne$ual %ariances

    This is what & generally choose if & have no reason for believing that the variances from

    the two groups are e$ual.

  • 8/12/2019 Hypothesis Testing in Excel

    2/10

    Then, complete the tTest bo' by highlighting the appropriate areas, indicating whether

    labels are included and specifying an output range.

    The (ypothesized )ean Difference refers to the difference that you are testing forbetween the mean for the first group and the mean for the second group. &f, as woul

    dusually be the case, you are testing whether or not the two groups have e$ual means, the(ypothesized )ean difference would be zero.

    Also, the window as*s for Alpha, or the probability of a Type + error. This is used to

    generate critical values in the output and isnt all that important as you will also begetting pvalues with your output.

  • 8/12/2019 Hypothesis Testing in Excel

    3/10

    The output loo*s li*e this

  • 8/12/2019 Hypothesis Testing in Excel

    4/10

    The mean, variance and number of observations are given for each group.

    The t"tat is given.

    The pvalues and critical values are given for one and two tailed tests. &f these are small,

    the means are significantly different. That is, you can reject the null hypothesis ofe$uality in favor of the alternative hypothesis that!

    +. the means are une$ual, in the case of a twotailed test

    or

    . the mean of - is greater than the mean of A, in the case of a onetailed test.

    ote that the second of these ta*es the form that it does because the sample mean for -was greater than the sample mean for A. iven the data above, you would never rejectthe one sided null hypothesis that the mean of - was greater than or e$ual to the mean of

    -.

    (eres another e'ample where the null hypotheses wouldnt be rejected!

  • 8/12/2019 Hypothesis Testing in Excel

    5/10

    &n this version, the mean are so close that the null hypothesis that the mean for A is e$ual

    to the mean for - cant be rejected, as indicated by the pvalues of 0.10+12 and 0.304

    for the one and twotailed tests, respectively.

    Looking at Residuals from Regressions in Excel

    To loo* at regression residuals in 5'cel, first do a regression and specify that you want to

    save the residuals

  • 8/12/2019 Hypothesis Testing in Excel

    6/10

    -elow the summary output from the regression will be a column with the residuals

  • 8/12/2019 Hypothesis Testing in Excel

    7/10

    6ou can then do a scatterplot of the residuals against the e'planatory variable7s8 by

    copying the column of residuals to a column ne't to the e'planatory variable of your

    choice

  • 8/12/2019 Hypothesis Testing in Excel

    8/10

    and simply doing a scatterplot by choosing &nsert/9hart/:6"catter

  • 8/12/2019 Hypothesis Testing in Excel

    9/10

  • 8/12/2019 Hypothesis Testing in Excel

    10/10

    &deally, thee will be no pattern in the scatterplot7s8. &n this case there is, so & would try to

    add another e'planatory variable 7maybe :8 to the regression and do it again.