Locked lesson.
About this lesson
T-Tests compare the mean of two data samples to each other.
Exercise files
Download this lesson’s related exercise files.
T Tests Exercise.xlsx10.6 KB T Tests Exercise Solution.docx
238.4 KB
Quick reference
T-Tests
T Tests compare the mean of two data samples to each other.
When to use
T Tests are used to show differences between data sets. When the means are statistically different it can indicate cause-and-effect relationships. Also, the tests are often used in a before/after analysis to demonstrate the effectiveness of an improvement.
Instructions
T Tests are among the easiest hypothesis tests to perform. The test determines the mean of the sample and compares it to the mean of another sample. The hypothesis statements for T Tests are:
H0: x̄1 = x̄2
Ha: x̄1≠ x̄2
There are two types of T Tests that compare means between data samples:
- Two-sample T Tests compare the means between two data samples. Before that test is done, a test for equal variances should be done using the F Test and the correct variant of the Two-sample T Test used.
- Excel:
- Data Analysis > T Test: Two Sample Assuming Equal Variance (or unequal based upon the result of the F Test)
- Enter the data range for each sample
- Minitab:
- Stat > Basic Stats > 2-sample T
- Indicate the format of the data
- Select the data column(s)
- Select the Option button to indicate equal variances (default is unequal variances) and to change the relationship to greater than or less than
- Excel:
- Paired T Tests compare the means of two data sets. In this case, these data sets have identical numbers of data points and the points are linked or paired between the data sets. This pairing is based on the order of the data items in each set.
- Excel:
- Data Analysis > T Test: Paired Two Samples for Means
- Enter the data range for each sample.
- Minitab:
- Stat > Basic Stats > Paired T
- Select the data columns
- Select the Option button to change the relationship to greater than or less than
- Excel:
There are several reasons for pairing the data. One reason is to do before/after testing with process resources to show levels of improvement. Another reason is to conduct a controlled test where paired items are exposed to the same conditions. The items are identical except for the feature being investigated. The third reason is when two different items are linked or paired together and then both are simultaneously exposed to identical conditions to determine the different types of reactions.
Hints & tips
- When using a greater than or less than Alternative Hypothesis, be sure to enter the data ranges in the correct order for the P Value to be correctly stated.
- Use the F Test to determine if there are equal variances in order to do the correct T Test.
- 00:04 Hi, I'm Ray Sheen the next set of tests are probably the most commonly used
- 00:09 hypothesis tests on Lean Six Sigma projects.
- 00:13 These T-tests are a simple way for
- 00:15 determining if there is a difference between two data sets.
- 00:20 >> I'll start again with the hypothesis test decision tree.
- 00:23 We are working with normal, discrete and continuous data.
- 00:27 There are two T-tests to discuss the two sample T-test and the paired T-test.
- 00:32 I'll start with the most widely used T-test that is the Two Sample T-test.
- 00:37 This test is used to determine if the mean from two samples
- 00:40 are statistically different.
- 00:42 If not, the sample sets can be combined and treated as one population, but
- 00:46 if different, the difference may lead to an understanding of the root cause or
- 00:51 causes of the problem under investigation.
- 00:54 It's also used to demonstrate whether a change has been effective.
- 00:58 So the null hypothesis for
- 00:59 this test is that the mean of one sample equals the mean of the other sample.
- 01:04 And the alternative hypothesis is that they are different.
- 01:07 As with some of the other tests, you could choose to write the alternative
- 01:11 hypothesis so that one was greater than or less than the other.
- 01:16 The actual mathematics of the test will change depending upon whether the two
- 01:21 samples have equal variance.
- 01:23 So the F-test will need to have been done first in order to make the correct
- 01:27 selection.
- 01:28 If you don't do the F-test, assume unequal variance.
- 01:32 The p-value may not be quite as precise, but it will err on the safe side.
- 01:37 In Excel, go to the data analysis menu on the data ribbon.
- 01:40 Then select either t-Test Two Sample Assuming Equal Variance or
- 01:45 t-Test Two Sample Assuming Unequal Variance.
- 01:49 The data entry is the same that we have done on most of the other tests.
- 01:54 In Minitab, select the pull-down menu, Stat, then Basic Statistics,
- 01:58 and then 2-Sample t.
- 02:01 Enter the data in the same manner as which you've entered other test data.
- 02:05 You can select the Options button and then select the item for equal variances.
- 02:10 Otherwise, Minitab will assume unequal variances.
- 02:13 With both Excel and Minitab you get results with a p-value that you can use to
- 02:18 either reject the null hypothesis or fail to reject the null hypothesis.
- 02:23 Next, I would like to discuss the Paired T-Tes.
- 02:26 The Paired T-Test is a special case test.
- 02:29 Determines if two samples that are linked or paired together have similar means.
- 02:34 Pairing requires that every data item in one set is paired with
- 02:38 a unique data item in the other set, a one to one pairing.
- 02:43 In Lean Six Sigma program, this is often done as before and after tests.
- 02:48 So, an obvious characteristic of the paired data samples,
- 02:52 is that they must have exactly the same number of items in each sample.
- 02:55 Also, when recorded in the sample,
- 02:58 the paired item must be in the same order to ensure that the pairing is correct.
- 03:03 The hypothesis is similar to the Two Sample t-Test.
- 03:06 The null hypothesis is that the means from the two samples are the same, and
- 03:11 the alternative hypothesis is that they are not the same.
- 03:15 In Excel, this test is done by selecting the Data Analysis menu from the Data
- 03:19 ribbon, and then selecting t-Test Paired Two-Samples for Mean.
- 03:24 Then enter the data ranges as we have with other Excel tests.
- 03:27 In Minitab select the Stat pull down menu,
- 03:30 then select Basic Statistics and select Paired t-Test.
- 03:35 Again enter data columns in the same way as you have with other tests.
- 03:39 And you can select greater than or less than comparison from the option panel in
- 03:43 the same manner in which you've done it on the other tests.
- 03:47 Let's spend a moment and consider why we would use pairing.
- 03:51 One condition that I've already mentioned is the before after test.
- 03:55 In this case, items in a data set are tested to establish a baseline value,
- 04:00 then the improvement or other changes are made.
- 04:04 Now all the items are tested again to determine if the mean value has changed in
- 04:09 a statistically significant manner.
- 04:12 An example could be an average time for each operator to complete a unit of
- 04:16 production before and after the new inspection equipment was installed.
- 04:22 Another condition is the controlled test.
- 04:25 In this case, some items in the dataset are the control and
- 04:28 some are exposed to the improvement.
- 04:31 All items go through the same process at the same time.
- 04:34 The performance of the control items is compared to the improved items.
- 04:39 An example of this would be,
- 04:40 to use two different cleaning processes on different portions of the same carpet.
- 04:46 A third condition is matched subjects.
- 04:48 In this case, items under investigation is already a pair,
- 04:52 such as a package and label.
- 04:55 Although the items may be different in some important characteristic,
- 04:58 they both go through the same conditions or process.
- 05:01 And the results are then compared.
- 05:03 This is often used in behavioral testing with husbands and wives.
- 05:07 If for some reason you need to do this test by hand, and not with Excel or
- 05:12 Minitab functions, let's look at what would be needed.
- 05:16 Like the Z test the T test converts the sample means into standard
- 05:19 deviation units.
- 05:21 Whether it's a Z or T test, you take the test statistic and use the lookup table to
- 05:25 determine whether the statistic is greater than or less than the table value.
- 05:30 If the sample size is less than 30, use the T table and
- 05:34 if the sample size is greater than 30, use the Z table.
- 05:38 To find the value in the table, use the alpha value for your analysis and
- 05:42 your degrees of freedom.
- 05:44 The degrees of freedom is the number of items in the sample- 1.
- 05:49 The t statistic for two samples is the mean of one minus the mean of the other
- 05:53 divided by the square root of the variance of one over the sample size
- 05:58 plus the variance of the other over its sample size.
- 06:02 The t statistic for the paired two sample T test is the mean of the differences
- 06:07 between the pairs divided by the standard deviation of the differences over
- 06:11 the square root of the number of items in the sample.
- 06:16 >> Whether it's a Two Sample T-Test or the Paired T-test, you'll likely find
- 06:21 that these tests are the ones that you most frequently use in the analyze phase.
Lesson notes are only available for subscribers.
PMI, PMP, CAPM and PMBOK are registered marks of the Project Management Institute, Inc.