However, don’t worry because even when your data fails certain assumptions, there is often a solution to overcome this (e.g., transforming your data or using another statistical test instead).
In fact, do not be surprised if your data fails one or more of these assumptions since this is fairly typical when working with real-world data rather than textbook examples, which often only show you how to carry out an independent t-test when everything goes well. When moving on to assumptions #4, #5 and #6, we suggest testing them in this order because it represents an order where, if a violation to the assumption is not correctable, you will no longer be able to use an independent t-test. If you do not have independence of observations, it is likely you have "related groups", which means you will need to use a dependent t-test instead of the independent t-test.įortunately, you can check assumptions #4, #5 and #6 using Stata. For example, there must be different participants in each group with no participant being in more than one group.
However, if you only have one group and wish to compare this to a known or hypothesized value, you could run a one-sample t-test. Alternatively, if you have more than two unrelated groups, you could use a one-way ANOVA. Note: If your independent variable has related groups, you will need to use a paired t-test instead.
However, before we introduce you to this procedure, you need to understand the different assumptions that your data must meet in order for an independent t-test to give you a valid result.
In this guide, we show you how to carry out an independent t-test using Stata, as well as interpret and report the results from this test. Note: In Stata 12, you will see that the independent t-test is referred to as the "two-group mean-comparison test", whereas in Stata 13, it is referred to as the "t test (mean-comparison test)". Alternately, an independent t-test could be used to understand whether there is a difference in salary based on educational level (i.e., your dependent variable would be "salary" and your independent variable would be "educational level", which has two groups: "undergraduate degree" and "postgraduate degree"). Specifically, you use an independent t-test to determine whether the mean difference between two groups is statistically significantly different to zero.įor example, an independent t-test could be used to test whether revision time amongst college students differed based on gender (i.e., your dependent variable would be "revision time", measured in minutes or hours, and your independent variable would be "gender", which has two groups: "male" and "female"). The independent t-test, also referred to as an independent-samples t-test, independent-measures t-test or unpaired t-test, is used to determine whether the mean of a dependent variable (e.g., weight, anxiety level, salary, reaction time, etc.) is the same in two unrelated, independent groups (e.g., males vs females, employed vs unemployed, under 21 year olds vs those 21 years and older, etc.). Independent t-test using Stata Introduction