Z Test Calculator

Run one-sample Z tests for a mean with known population standard deviation or a single population proportion

Example Results

1 examples

Run a one-sample mean Z test

Test whether a sample mean of 105 differs from a hypothesized mean of 100 with known population standard deviation 15

{
  "result": {
    "zStatistic": 2.6667,
    "pValue": 0.0077,
    "rejectNull": true
  }
}
View input parameters
{ "testType": "mean", "sampleMean": 105, "hypothesizedMean": 100, "populationStandardDeviation": 15, "sampleSize": 64, "successCount": 60, "trialCount": 100, "hypothesizedProportion": 0.5, "alternative": "two-sided", "alpha": 0.05, "decimalPlaces": 4 }

Key Facts

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

Overview

The Z Test Calculator is a statistical utility designed to perform one-sample Z tests for either a population mean or a population proportion. By inputting your sample statistics and known population parameters, the tool instantly calculates the Z-statistic, P-value, and determines whether to reject the null hypothesis based on your chosen significance level (alpha). It is ideal for researchers, analysts, and quality control professionals who need to evaluate sample data against established population metrics.

When to Use

  • When you need to compare a sample mean to a known population mean and the population standard deviation is already known.
  • When evaluating whether a sample proportion significantly differs from a hypothesized population proportion.
  • When conducting hypothesis testing with large sample sizes where the normal distribution can be assumed.

How It Works

  • Select the test type: choose 'Mean' for continuous data or 'Proportion' for categorical success/failure data.
  • Enter your sample statistics, such as the sample mean and size, along with the hypothesized population parameters.
  • Set your alternative hypothesis (two-sided, greater, or less) and the desired alpha level (e.g., 0.05).
  • The calculator computes the Z-statistic and P-value, outputting a clear JSON result indicating whether to reject the null hypothesis.

Use Cases

Quality control managers testing if a new manufacturing batch's average weight differs from the historical population mean.
Marketers determining if the conversion rate of a new landing page is significantly higher than the industry standard proportion.
Researchers verifying if survey results from a specific demographic deviate from known national census proportions.

Examples

1. Evaluating Manufacturing Quality

Quality Assurance Engineer
Background
A factory produces cables with a known historical standard deviation of 15mm. A recent batch of 64 cables yielded an average length of 105mm.
Problem
Determine if the new batch's mean length significantly differs from the target length of 100mm.
How to Use
Select 'Mean' as the test type. Enter 105 for Sample Mean, 100 for Hypothesized Mean, 15 for Population Standard Deviation, and 64 for Sample Size.
Example Config
{
  "testType": "mean",
  "sampleMean": 105,
  "hypothesizedMean": 100,
  "populationStandardDeviation": 15,
  "sampleSize": 64,
  "alternative": "two-sided",
  "alpha": 0.05
}
Outcome
The calculator outputs a Z-statistic of 2.6667 and a P-value of 0.0077. Since the P-value is less than 0.05, 'rejectNull' is true, indicating the batch is significantly different from the target.

2. Analyzing Marketing Conversion Rates

Digital Marketer
Background
An e-commerce site historically converts at 50% (0.5). A new checkout flow was tested on 100 users, resulting in 60 successful purchases.
Problem
Test if the new checkout flow's conversion rate is significantly greater than the historical 50%.
How to Use
Select 'Proportion' as the test type. Enter 60 for Success Count, 100 for Trial Count, and 0.5 for Hypothesized Proportion. Set the Alternative Hypothesis to 'Greater Than'.
Example Config
{
  "testType": "proportion",
  "successCount": 60,
  "trialCount": 100,
  "hypothesizedProportion": 0.5,
  "alternative": "greater",
  "alpha": 0.05
}
Outcome
The tool calculates the Z-statistic and P-value for the proportion test, revealing whether the 60% success rate is a statistically significant improvement over the 50% baseline.

Try with Samples

barcode

Related Hubs

FAQ

What is the difference between a Z-test and a T-test?

A Z-test is used when the population standard deviation is known or the sample size is very large. A T-test is used when the population standard deviation is unknown and must be estimated from the sample.

What does the alpha value represent?

Alpha is the significance level, representing the probability of rejecting the null hypothesis when it is actually true. A common default is 0.05 (5%).

Can I perform a one-sided Z-test?

Yes, you can select 'Greater Than' or 'Less Than' in the Alternative Hypothesis dropdown to run a one-sided test.

What inputs are required for a proportion Z-test?

You need the success count, total trial count, and the hypothesized population proportion.

What does 'rejectNull: true' mean in the output?

It means the calculated P-value is less than your specified alpha level, indicating statistically significant evidence against the null hypothesis.

API Documentation

Request Endpoint

POST /en/api/tools/z-test-calculator

Request Parameters

Parameter Name Type Required Description
testType select No -
sampleMean number No -
hypothesizedMean number No -
populationStandardDeviation number No -
sampleSize number No -
successCount number No -
trialCount number No -
hypothesizedProportion 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-z-test-calculator": {
      "name": "z-test-calculator",
      "description": "Run one-sample Z tests for a mean with known population standard deviation or a single population proportion",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=z-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]