Welcome!
In this tutorial I’m going to briefly discuss methods used in comparing 2 population means,
and also conduct an equal variances t-test.
Samples from the two populations could either be independent (that is, unrelated),
or dependent. That is related, repeated or correlated.
If the samples are independent, and the population variances are known, we conduct a z test.
If the population variances are unknown, we conduct a t-test.
If there is no significant difference between the population variances,
we conduct an equal variances t-test.
If the population variances differ significantly, we conduct an unequal variances t-test.
For the dependent samples, we conduct a matched-pairs t–test.
In testing if there is a difference between 2 means, for independent samples,
the null hypothesis will state that the means are equal,
which we also write as µ1 - µ2 = 0.
And the alternative will be that the difference between the means is not equal to 0.
These are for 2-tailed tests.
For one-tailed tests , here are the hypotheses for the left-tailed test,
and here they are for the right tailed test.
For testing if a difference exists in dependent t-tests,
the null hypothesis for a 2-tailed test will be that the population mean difference, µd, is equal to 0.
And the alternative will be that the mean difference is not equal to 0.
Here are the hypotheses for the left-tailed test,
and here they are for the right tailed test.
Let’s now conduct a hypothesis test.
Here we want to test if full-time students
spend more time per week studying stats than part-time students.
Since the data here consists of 2 unrelated groups, and the population standard deviations
(or variances) are not known, an independent t-test is appropriate.
If we let µF and µP represent the population mean study time for full-time and part-time
students respectively, then the alternative hypothesis will be µF > µP or µF - µP > 0.
The null hypothesis will then be that µF - µP ≤ 0.
Next I’m going to launch Excel to generate the statistics for the test.
Here in Excel, click the Data tab, and click Data Analysis.
If you scroll to the bottom here, you will find the four tests for comparing 2 means.
In our case, the samples are independent, so we cannot conduct a Matched Pairs test.
Because the population standard deviations (or variances) are unknown, we cannot conduct
a z-test either. To decide whether to conduct an equal or unequal
variances t-test, we usually conduct an F-test for 2 sample variances here.
Select Full-time for variable 1, Part-time for variable 2. Check labels
and click ok.
The one-tailed p-value here is usually multiplied by 2 to obtain a 2 tailed p-value. And it
is large enough to tell us there is no significant difference in population variances.
That aside, we can also see here that the variances are
very close. So we conduct an equal variances t test.
Click Data > Data Analysis, Select
t-Test: Two-Sample Assuming Equal Variances and click OK.
For Variable 1 range, I’m going to select Full-time
And for Variable 2, Part-time. For Hypothesized mean difference, I’m going
to input 0 or just leave it blank. Note that if we’re testing whether that
difference is more than 5, for example, we just enter 5 here.
I’m going to check labels because I selected the labels.
And then click OK.
And here’s the output on a different sheet.
Here is the cleaned up output from Excel. For the critical or rejection region,
we have a significance level alpha of 0.05. And this is a one-tailed test, so we use the
one-tail tailed critical value here. It is a right-tailed test, so we reject the
null hypothesis if the t statistic is greater than positive 1.691
The test statistic is, t = .587
We can now make a decision on whether or not to reject the null hypothesis.
The test statistic 0.587 is not greater than 1.691
So we do not reject the null hypothesis. We can also see that the one-tailed p-value
here is greater than 0.05, telling us again not to reject the null hypothesis. As a result,
we cannot support the alternative. That is, there is not enough evidence to conclude
that full-time students spend more time studying stats than part-time students.
And that concludes the test. Thanks for watching.