How to Test the Difference of Two Samples

After obtaining two samples, it is standard procedure to observe the differences between the samples. However, to avoid subjective measures, researchers use statistical methods to objectively test for differences across the samples. If the samples differ in an important way, we say that the difference is "significant." The process of determining the statistical significance of differences between means is called "statistical hypothesis testing."

Things You'll Need

  • t-Table
Show More

Instructions

    • 1

      Compute the means of each sample. For one sample, add up all the data points and divide by the number of data points. This is the mean for that sample. Do this again for the other sample. Call these means "xm" and "ym," respectively.

    • 2

      Calculate the difference between the means. Use the formula "xm -- ym." Call the result "diff."

    • 3

      Determine the standard deviation for each sample. Start with one of the samples. Subtract the mean from each data point of that sample. Square the resulting numbers. Sum the resulting squares. Divide this number by the number of data points for that sample. Take the square root. This is the standard deviation. Repeat this process for the other sample. Call these two numbers "xs" and "ys," respectively.

    • 4

      Compute the pooled standard deviation. Let "xn" equal the number of data points in the first sample and "yn" equal the number of data points in the second sample. The pooled standard variance is given by the formula "[(xn -- 1)xs^2 + (yn -- 1)ys^2]/(xn + yn - 2)." Take the square root of this variance to yield the pooled standard deviation. Call this number "sp."

    • 5

      Calculate the standard error. Add the inverses of the number of data points: "xn^-1 + yn^-1." Take the square root of this number. Multiply the result by "sp" to yield the standard error. Call the standard error "se."

    • 6

      Find the t-statistic. This t-statistic is computed with the formula "diff/se."

    • 7

      Compare the t-statistic to the t-statistics listed in a t-table. To use the t-table, you need to know the degrees of freedom for your test, which is "xn + yn -- 2." Compare your t-statistic to the one listed in the table to yield a p-value. The standard procedure is to conclude that there is a significant difference between the two samples if the p-value is less than 0.05.

Learnify Hub © www.0685.com All Rights Reserved