How to Perform a Two Sample T Test

Determine a null and alternate hypothesis., Determine a confidence interval., Assign each population to one of two data sets., Determine the n1 and n2 values., Determine the degrees of freedom., Determine the means of the two sample sets., Determine...

12 Steps 2 min read Medium

Step-by-Step Guide

  1. Step 1: Determine a null and alternate hypothesis.

    In general, the null hypothesis will state that the two populations being tested have no statistically significant difference.

    The alternate hypothesis will state that there is one present.
  2. Step 2: Determine a confidence interval.

    We will call this the alpha (α) level.

    The typical value is
    0.05.

    This means that there is 95% confidence that the conclusion of this test will be valid. , These values will need to be distinct when using the equation. , These are equal to the two sample sizes, or the number of data points in each population. , We will call this the k value.

    On the t-distribution table below, this value is referred to as df.

    To calculate this value, add both of the n values together and subtract
    2. , We will call these x̄1 and x̄2.

    This is calculated by adding all of the data points in each sample set together, then dividing by the number of data points in the set (the corresponding n value). , We will call these the S-values.

    This is a number that describes how much the data varies inside its own sample set.

    Use the following formula. ,,, If the calculated t-statistic is greater than the critical t-value, the test concludes that there is a statistically significant difference between the two populations.

    Therefore, you reject the null hypothesis that there is no statistically significant difference between the two populations.

    In any other case, there is no statistically significant difference between the two populations.

    The test fails to reject the null hypothesis. ,
  3. Step 3: Assign each population to one of two data sets.

  4. Step 4: Determine the n1 and n2 values.

  5. Step 5: Determine the degrees of freedom.

  6. Step 6: Determine the means of the two sample sets.

  7. Step 7: Determine the variances of each data set.

  8. Step 8: Compute the t-statistic using the following formula.

  9. Step 9: On the t-distribution table

  10. Step 10: use the alpha and k values to find the critical t-value.

  11. Step 11: Compare the critical t-value and the calculated t-statistic.

  12. Step 12: Use the following example problem to practice the equations given above.

Detailed Guide

In general, the null hypothesis will state that the two populations being tested have no statistically significant difference.

The alternate hypothesis will state that there is one present.

We will call this the alpha (α) level.

The typical value is
0.05.

This means that there is 95% confidence that the conclusion of this test will be valid. , These values will need to be distinct when using the equation. , These are equal to the two sample sizes, or the number of data points in each population. , We will call this the k value.

On the t-distribution table below, this value is referred to as df.

To calculate this value, add both of the n values together and subtract
2. , We will call these x̄1 and x̄2.

This is calculated by adding all of the data points in each sample set together, then dividing by the number of data points in the set (the corresponding n value). , We will call these the S-values.

This is a number that describes how much the data varies inside its own sample set.

Use the following formula. ,,, If the calculated t-statistic is greater than the critical t-value, the test concludes that there is a statistically significant difference between the two populations.

Therefore, you reject the null hypothesis that there is no statistically significant difference between the two populations.

In any other case, there is no statistically significant difference between the two populations.

The test fails to reject the null hypothesis. ,

About the Author

J

Jason Rivera

Writer and educator with a focus on practical pet care knowledge.

50 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: