Вы находитесь на странице: 1из 10

# Hypothesis Testing in Excel The first step is to get the data for the two groups you want

organized so that the observations 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 all together and so that the observations from the second group are all together.

Then, choose Tools/DataAnalysis/t Test! 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.

Then, complete the t Test 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 for between 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 be getting p values with your output.

## The output loo*s li*e this

The mean, variance and number of observations are given for each group. The t "tat is given. The p values 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 of e\$uality in favor of the alternative hypothesis that! +. the means are une\$ual, in the case of a two tailed test or ,. the mean of - is greater than the mean of A, in the case of a one tailed 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 reject the 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!

&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 p values of 0.10+12 and 0.30,4 for the one and two tailed 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

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

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

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

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