How to Calculate T-Test Statistics

••• Jupiterimages/Polka Dot/Getty Images

When you gather data or perform an experiment, you usually want to demonstrate that there's a connection between a change in one parameter and a change in another. For example, spaghetti dinners may lead to more trips to the dry cleaners. Statistical tools help you figure out if the data you collect is meaningful. Specifically, the T-test can help you decide if there's a significant difference between two sets of data. For example, one group of data can be trips to the dry cleaner for people who don't eat spaghetti, and the other can be dry cleaner visits for people who eat spaghetti. Two different T-tests work in different circumstances, first for completely independent data, second for data groups that are connected in some way.

Independent Samples

    Create a section on your worksheet for summary statistics for your independent samples. Calculate the sum, the n-value (or sample size), and the mean of the scores for each of the independent samples. Label each calculation with "sum," "n" and "mean," respectively.

    Calculate the degrees of freedom for each of the independent samples. Degrees of freedom is usually represented by "n-1" or your sample size minus one. Write the degrees of freedom calculation in the summary statistics section.

    Calculate the variance and standard deviation for each of the samples. Write these calculations in the summary statistics section for each sample.

    Add the degrees of freedom of both samples and place this next to a line with the label "Degrees of Freedom Total" or "df-total."

    Multiply the degrees of freedom of each sample by the variance of each sample. Add the two numbers and divide the total by the "Degrees of Freedom Total." Write this calculated number on a line with the label "Pooled Variance."

    Divide the "Pooled Variance" by the "n" of one of the samples. Repeat this calculation for the other sample. Add the two resulting numbers. Take the square root of this number and place this calculation on a line labeled "Standard Error of the Difference."

    Subtract the smaller sample mean from the larger sample mean. Divide this difference by the "Standard Error of the Difference" and write this calculation down as your "t-obtained" or "t-value."

Dependent Samples

    Subtract the second score from the first score for each pair in your data set. Place each of these "difference" scores in a column labeled "Difference." Add the "Difference" columns to calculate a total and label the result as "D."

    Square each of the "Difference" scores and place each squared result in a column labeled "D-squared." Add the "D-squared" columns to calculate a total.

    Multiply the number of paired scores ("n") by the "D-squared" column total. Subtract the square of the total "D" from this result. Divide this difference by "n minus one." Calculate the square root of this number and label the resulting number as "divisor."

    Divide the total "D" by the "divisor" to find the t-value statistic for the dependent-samples t-test.


    • Compare the obtained t-value statistic to the "critical t-value" found in your distribution t-table chart to determine whether you should reject the null hypothesis or accept the alternative hypothesis.


About the Author

Matthew Schieltz has been a freelance web writer since August 2006, and has experience writing a variety of informational articles, how-to guides, website and e-book content for organizations such as Demand Studios. Schieltz holds a Bachelor of Arts in psychology from Wright State University in Dayton, Ohio. He plans to pursue graduate school in clinical psychology.

Photo Credits

  • Jupiterimages/Polka Dot/Getty Images