• Home
  • Chemistry
  • Astronomy
  • Energy
  • Nature
  • Biology
  • Physics
  • Electronics
  • Calculating T‑Test Statistics: A Step‑by‑Step Guide

    By Matthew Schieltz – Updated Aug 30, 2022

    When you collect data or run an experiment, you often need to determine whether a change in one variable is linked to a change in another. T‑tests are the standard statistical tools for testing whether the difference between two groups is significant, beyond what might be expected by random chance.

    Independent Samples

    Step 1

    Create a summary‑statistics table for each group. Calculate and record the sum, sample size (n), and mean. Label each row as sum, n, and mean.

    Step 2

    Compute the degrees of freedom for each group: df = n – 1. Write this value beside the corresponding summary statistics.

    Step 3

    Determine the variance and standard deviation for each group and add these to the table.

    Step 4

    Sum the degrees of freedom from both groups and record this as df‑total.

    Step 5

    Calculate the pooled variance:

    1. Multiply each group’s df by its variance.
    2. Add the two products.
    3. Divide the sum by df‑total.
    Write the result as pooled variance.

    Step 6

    Compute the standard error of the difference:

    1. Divide the pooled variance by each group’s n.
    2. Add the two quotients.
    3. Take the square root of the sum.
    Label this value standard error of the difference.

    Step 7

    Find the t‑value:

    1. Subtract the smaller mean from the larger mean.
    2. Divide this difference by the standard error of the difference.
    Record the result as t‑obtained or t‑value.

    Dependent Samples

    Step 1

    For each paired observation, subtract the second score from the first and place the result in a column titled Difference. Sum all differences to obtain D.

    Step 2

    Square each difference, store in a column D‑squared, and sum these to get ΣD².

    Step 3

    Compute the divisor:

    1. Multiply the number of pairs (n) by ΣD².
    2. Subtract D² from this product.
    3. Divide the result by (n – 1).
    4. Take the square root of the quotient.
    Label the final value divisor.

    Step 4

    Divide D by the divisor to obtain the t‑value for the paired‑samples t‑test.

    TL;DR

    Compare the calculated t‑value with the critical t‑value from a t‑distribution table. If the absolute t‑value exceeds the critical value, reject the null hypothesis; otherwise, do not reject it.

    For further reading, see Wikipedia – T‑test.

    Science Discoveries © www.scienceaq.com