You are on page 1of 6

T-test

Definition

A t-test is an inferential statistic used to determine if there is a significant difference between


the means of two groups and how they are related. T-tests are used when the data sets follow
a normal distribution and have unknown variances.

The t-test is a test used for hypothesis testing in statistics and uses the t-statistic, the t-
distribution values, and the degrees of freedom to determine statistical significance.

● A t-test is an inferential statistic used to determine if there is a statistically significant


difference between the means of two variables.
● The t-test is a test used for hypothesis testing in statistics.
● Calculating a t-test requires three fundamental data values including the difference
between the mean values from each data set, the standard deviation of each group, and
the number of data values.
● T-tests can be dependent or independent.

T-Test Formula

Calculating a t-test requires three fundamental data values. They include the difference
between the mean values from each data set, or the mean difference, the standard deviation
of each group, and the number of data values of each group.

This comparison helps to determine the effect of chance on the difference, and whether the
difference is outside that chance range. The t-test questions whether the difference between
the groups represents a true difference in the study or merely a random difference.

The t-test produces two values as its output: t-value and degrees of freedom. The t-value, or t-
score, is a ratio of the difference between the mean of the two sample sets and the variation
that exists within the sample sets.
The numerator value is the difference between the mean of the two sample sets. The
denominator is the variation that exists within the sample sets and is a measurement of the
dispersion or variability.
This calculated t-value is then compared against a value obtained from a critical value table
called the T-distribution table. Higher values of the t-score indicate that a large difference
exists between the two sample sets. The smaller the t-value, the more similarity exists
between the two sample sets.

Degrees of freedom refer to the values in a study that has the freedom to vary and are
essential for assessing the importance and the validity of the null hypothesis. Computation of
these values usually depends upon the number of data records available in the sample set.

T-Test Assumptions

● The first assumption made regarding t-tests concerns the scale of measurement. The
assumption for a t-test is that the scale of measurement applied to the data collected
follows a continuous or ordinal scale, such as the scores for an IQ test.
● The second assumption made is that of a simple random sample, that the data is
collected from a representative, randomly selected portion of the total population.
● The third assumption is the data, when plotted, results in a normal distribution, bell-
shaped distribution curve. When a normal distribution is assumed, one can specify a
level of probability (alpha level, level of significance, p) as a criterion for acceptance.
In most cases, a 5% value can be assumed.
● The fourth assumption is a reasonably large sample size is used. A larger sample size
means the distribution of results should approach a normal bell-shaped curve.
● The final assumption is homogeneity of variance. Homogeneous, or equal, variance
exists when the standard deviations of samples are approximately equal.

Application

A t test is appropriate to use when a small, random sample has been collected from some
statistical “population” and want to compare the mean from your sample to another value.
The value for comparison could be a fixed value (e.g., 10) or the mean of a second sample.
Two sample t test

There are several kinds of two sample t tests, with the two main categories being paired and
unpaired (independent) samples.

Paired samples t test

In a paired samples t test, also called dependent samples t test, there are two samples of data,
and each observation in one sample is “paired” with an observation in the second sample.
The most common example is when measurements are taken on each subject before and after
a treatment. A paired t test example research question is, “Is there a statistical difference
between the average red blood cell counts before and after a treatment?”

Unpaired samples t test

Unpaired samples t test, also called independent samples t test, is appropriate when you have
two sample groups that aren’t correlated with one another. A pharma example is testing a
treatment group against a control group of different subjects. Compare that with a paired
sample, which might be recording the same subjects before and after a treatment.

With unpaired t tests, in addition to choosing your level of significance and a one or two
tailed test, you need to determine whether or not to assume that the variances between the
groups are the same or not. If you assume equal variances, then you can “pool” the
calculation of the standard error between the two samples. Otherwise, the standard choice is
Welch’s t test which corrects for unequal variances. This choice affects the calculation of the
test statistic and the power of the test, which is the test’s sensitivity to detect statistical
significance.

Steps to run Independent sample t test on SPSS

1. Click Analyze > Compare Means > Independent-Samples T Test. The Independent-
Samples T Test dialogue box will appear.
2. Transfer the dependent variable into the Test Variable(s): box, and transfer the
independent variable into the Grouping Variable: box, by highlighting the relevant
variables and pressing the right arrow Button buttons.
3. Click on the Define Options Button button. The Define Groups dialogue box will
appear.
4. Enter "1" into the Group 1: box and enter "2" into the Group 2: box.
5. Click the Continue Button button.
6. If you need to change the confidence level limits or change how to exclude cases,
click the Options Button button.
7. Click the Continue Button button. You will be returned to the Independent-Samples T
Test dialogue box.
8. Click the Continue Button button.

The steps for interpreting the SPSS output for a independent-sample t-test

1. In the Group Statistics table, there are several important pieces of information about
each independent group in the "grouping" variable including the size of each group
(N) and their respective means (Mean) and standard deviations (Std. Deviation).
Disregard the Std. Error Mean values for practical purposes.
2. Under the t-test for Equality of Means column heading, look at the p-value under the
Sig. (2-tailed) column.
3. If the p-value is LESS THAN .05, then researchers have a statistically significant
difference between the two independent groups on the outcome.
4. If the p-value is MORE THAN .05, then researchers do NOT have a statistically
significant difference between the two independent groups on the outcome.
5. Look back up at the Group Statistics table. The p-value must be interpreted within the
context of your means and standard deviations. For example, one would say, "There
was a statistically significant difference between 'Group 1' (Mean and standard
deviation) and 'Group 2' (Mean and standard deviation), p = .01."
One sample t test

The one sample t test, also referred to as a single sample t test, is a statistical hypothesis test
used to determine whether the mean calculated from sample data collected from a single
group is different from a designated value specified by the researcher. This designated value
does not come from the data itself, but is an external value chosen for scientific reasons.
Often, this designated value is a mean previously established in a population, a standard
value of interest, or a mean concluded from other studies. Like all hypothesis testing, the one
sample t test determines if there is enough evidence to reject the null hypothesis (H0) in favor
of an alternative hypothesis (H1). The null hypothesis for a one sample t test can be stated as:
"The population mean equals the specified mean value." The alternative hypothesis for a one
sample t test can be stated as: "The population mean is different from the specified mean
value."

Formula: T = (X̄ – μ) / S/√n

X̄ : Calculated mean of the sample μ:

Hypothetical mean that we are testing against s:


The standard deviation of the sample n: The

number of observations in the sample.

Steps to run One sample t test on SPSS

1. From the SPSS menu, choose Analyze – Compare means – One-Sample T-Test.
2. A new window will appear.
3. From the left box transfer variable to Test Variable(s).
4. In the Test Value box, write the true mean.
5. Click OK.
6. The results of One sample t-test will appear in the output window.

The steps for interpreting the SPSS output for a one-sample t-test

1. In the One-Sample Statistics table, the observed mean and standard deviation are
presented.
2. In the One-Sample Test table, look under the Sig. (2-tailed) column for the p-value
that is interpreted.
3. If the p-value is less than .05, then the observed mean is significantly different than
what researchers hypothesized or expected.
4. If the p-value is more than .05, then the observed mean is not significantly different
from what researchers hypothesized or expected.

You might also like