Paired t Test Calculator

Run paired-sample t tests from before and after values or precomputed paired differences

Example Results

1 examples

Compare before and after measurements

Run a paired t test for repeated measurements from the same subjects

{
  "result": {
    "tStatistic": 17,
    "pValue": 0,
    "degreesOfFreedom": 5,
    "rejectNull": true
  }
}
View input parameters
{ "beforeValues": "72, 75, 70, 68, 74, 71", "afterValues": "75, 78, 73, 70, 77, 74", "differenceValues": "", "hypothesizedMeanDifference": 0, "alternative": "two-sided", "alpha": 0.05, "decimalPlaces": 4 }

Key Facts

Category
Math, Date & Finance
Input Types
textarea, number, select
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

The Paired t Test Calculator allows you to quickly determine if there is a statistically significant difference between two related groups of data. By entering before and after measurements or precomputed paired differences, you can instantly calculate the t-statistic, p-value, and degrees of freedom to test your hypothesis with precision.

When to Use

  • Comparing pre-test and post-test scores for the same subjects to measure the effect of an intervention.
  • Evaluating the effectiveness of a treatment or medication on a single group of patients over time.
  • Analyzing matched pairs of data, such as measurements taken from twins or bilateral body parts.

How It Works

  • Enter your paired data sets into the Before Values and After Values fields, or provide direct differences if you have already calculated them.
  • Set your hypothesized mean difference, choose the alternative hypothesis (two-sided, greater, or less), and define your alpha significance level.
  • Specify the number of decimal places for the output.
  • Run the calculation to generate the t-statistic, p-value, degrees of freedom, and a clear true/false indicator of whether to reject the null hypothesis.

Use Cases

Medical researchers comparing patient blood pressure readings before and after administering a new medication.
Educators analyzing student test scores before and after a specific training module to measure learning outcomes.
Fitness coaches tracking the performance metrics of athletes at the beginning and end of a training program.

Examples

1. Evaluating a Training Program

Educator
Background
A teacher wants to know if a new 4-week reading program significantly improved the test scores of 6 students.
Problem
Needs to calculate if the score difference before and after the program is statistically significant.
How to Use
Enter the initial scores in Before Values and the final scores in After Values, keeping the default two-sided hypothesis and 0.05 alpha.
Example Config
{"beforeValues": "72, 75, 70, 68, 74, 71", "afterValues": "75, 78, 73, 70, 77, 74", "alternative": "two-sided", "alpha": 0.05}
Outcome
The calculator outputs the t-statistic, p-value, and degrees of freedom, indicating whether the null hypothesis is rejected and confirming the program's effectiveness.

2. Analyzing Precomputed Differences

Data Analyst
Background
An analyst already has the calculated difference in processing times for 5 servers before and after a software update.
Problem
Needs to run a paired t-test without the raw before and after data to see if processing time decreased.
How to Use
Leave the before and after fields blank, paste the difference values directly into the Difference Values field, and set the alternative hypothesis to 'Less Than'.
Example Config
{"differenceValues": "-2.1, -1.5, -2.8, -0.9, -1.2", "alternative": "less", "alpha": 0.01}
Outcome
The tool calculates the p-value based solely on the differences, confirming if the update significantly reduced processing time at a 99% confidence level.

Try with Samples

barcode

Related Hubs

FAQ

What is a paired t-test?

A paired t-test is a statistical procedure used to determine whether the mean difference between two sets of observations is zero. It is typically used when the same subjects are measured twice (e.g., before and after a treatment).

Do I need to enter both before and after values?

No. You can either enter the raw before and after values, or you can skip those fields and directly enter your data into the Difference Values field if you have already computed the differences.

What does the alpha value represent?

The alpha value (defaulting to 0.05) is the significance level of your test. It represents the probability of rejecting the null hypothesis when it is actually true.

Can I perform a one-sided test?

Yes. You can change the Alternative Hypothesis setting from 'Two-Sided' to 'Greater Than' or 'Less Than' to perform a one-sided (one-tailed) test.

How should I format my input data?

Enter your numerical values separated by commas, spaces, or newlines in the text areas. If using before and after values, ensure both datasets contain the exact same number of observations.

API Documentation

Request Endpoint

POST /en/api/tools/paired-t-test-calculator

Request Parameters

Parameter Name Type Required Description
beforeValues textarea No -
afterValues textarea No -
differenceValues textarea No -
hypothesizedMeanDifference number No -
alternative select No -
alpha number No -
decimalPlaces number No -

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-paired-t-test-calculator": {
      "name": "paired-t-test-calculator",
      "description": "Run paired-sample t tests from before and after values or precomputed paired differences",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=paired-t-test-calculator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]