Stat 328-Excel-4 0
Stat 328-Excel-4 0
This example teaches you how to perform an F-Test in Excel. The F-Test is used to
test the null hypothesis that the variances of two populations are equal.
Below you can find the study hours of 6 female students and 5 male students.
Note: can't find the Data Analysis button? Click here to load the Analysis ToolPak
add-in.
2. Select F-Test Two-Sample for Variances and click OK.
1
3. Click in the Variable 1 Range box and select the range A2:A7.
4. Click in the Variable 2 Range box and select the range B2:B6.
5. Click in the Output Range box and select cell E1.
6. Click OK.
Result:
2
Important: be sure that the variance of Variable 1 is higher than the variance of
Variable 2. This is the case, 160 > 21.7. If not, swap your data. As a result, Excel
calculates the correct F value, which is the ratio of Variance 1 to Variance 2 (F =
160 / 21.7 = 7.373).
Conclusion: if F > F Critical one-tail, we reject the null hypothesis. This is the case,
7.373 > 6.256. Therefore, we reject the null hypothesis. The variances of the two
populations are unequal.
4- t-Test
This example teaches you how to perform a t-Test in Excel. The t-Test is used to
test the null hypothesis that the means of two populations are equal.
Below you can find the study hours of 6 female students and 5 male students.
H0: μ1 -μ2 =0
H1: μ1 - μ2 ≠ 0
3
Note: can't find the Data Analysis button? Click here to load the Analysis ToolPak
add-in.
3. Select t-Test: Two-Sample Assuming Unequal Variances and click OK.
4. Click in the Variable 1 Range box and select the range A2:A7.
5. Click in the Variable 2 Range box and select the range B2:B6.
6. Click in the Hypothesized Mean Difference box and type 0 (H0: μ1 - μ2 = 0).
7. Click in the Output Range box and select cell E1.
8. Click OK.
4
Result:
Conclusion:
We do a two-tail test (inequality). lf t Stat < -t Critical two-tail or t Stat > t Critical
two-tail, we reject the null hypothesis. This is not the case, -2.365 < 1.473 < 2.365.
Therefore, we do not reject the null hypothesis. The observed difference between the
sample means (33 - 24.8) is not convincing enough to say that the average number
of study hours between female and male students differ significantly.
5
5- Paired Sample t Test
In paired sample hypothesis testing, a sample from the population is chosen and two
measurements for each element in the sample are taken. Each set of measurements
is considered a sample. Unlike the hypothesis testing studied so far, the two samples
are not independent of one another. Paired samples are also called matched
samples or repeated measures.
Example:
A clinic provides a program to help their clients lose weight and asks a consumer
agency to investigate the effectiveness of the program. The agency takes a sample
of 15 people, weighing each person in the sample before the program begins and 3
months later to produce the table below.
6
Solution
Let x = the difference in weight 3 months after the program starts. The null
hypothesis is:
We use the Excel’s t-Test: Paired Two Sample for Means data analysis tool or the T
Test. The output from the Excel data analysis tool is shown below:
Note that the mean differences are the same, but the standard deviation for the paired
sample case is lower, which results in a higher t-stat and a lower p-value. This is
generally true.
Observation: Since the two sample paired data case is equivalent to the one sample
case.