Hypothesis Testing Calculator
Step-by-step one-sample z-test, one-sample t-test, two-sample Welch t-test and paired-samples t-test, with effect sizes and a rejection region chart
The example below uses these same controls. Shared inputs stay in the URL fragment; anyone with the link can read them.
Step-by-step hypothesis tests: one-sample z-test, one-sample t-test, two-sample t-test (Welch), paired-samples t-test.
Step 1 — State Hypotheses
H₀: μ = μ₀ vs H₁: μ ≠ μ₀
Step 2 — Test Statistic
t = 1.2500 (SE = 1.6000, df = 24.00)
Step 3 — p-value
p = 0.223351
Step 4 — Compare to α = 0.05
Critical value: ±2.0639 | p = 0.223351 ≥ α = 0.05
Effect size
- Estimated difference (original units)
- 2.0000
- Cohen's d
- 0.2500
Cohen's 0.2, 0.5 and 0.8 benchmarks are conventions, not verdicts: judge practical importance in the measurement units. d is computed from the means and standard deviations, not derived from the p-value, so α and the tail do not change it.
Distribution — rejection region shaded red
Tip: hover to read values, click to pin a point for export
Test Distribution PDF Data Table
| Test statistic | In rejection region? | |
|---|---|---|
| -5.0000 | 0.000053 | yes |
| -4.9500 | 0.000060 | yes |
| -4.8990 | 0.000068 | yes |
| -4.8490 | 0.000077 | yes |
| -4.7990 | 0.000088 | yes |
| -4.7490 | 0.000100 | yes |
| -4.6980 | 0.000114 | yes |
| -4.6480 | 0.000129 | yes |
| -4.5980 | 0.000147 | yes |
| -4.5480 | 0.000167 | yes |
| -4.4970 | 0.000190 | yes |
| -4.4470 | 0.000215 | yes |
| -4.3970 | 0.000245 | yes |
| -4.3470 | 0.000278 | yes |
| -4.2960 | 0.000316 | yes |
| -4.2460 | 0.000358 | yes |
| -4.1960 | 0.000407 | yes |
| -4.1460 | 0.000462 | yes |
| -4.0950 | 0.000524 | yes |
| -4.0450 | 0.000594 | yes |
| -3.9950 | 0.000674 | yes |
| -3.9450 | 0.000764 | yes |
| -3.8940 | 0.000866 | yes |
| -3.8440 | 0.000981 | yes |
| -3.7940 | 0.001111 | yes |
| -3.7440 | 0.001258 | yes |
| -3.6930 | 0.001423 | yes |
| -3.6430 | 0.001609 | yes |
| -3.5930 | 0.001819 | yes |
| -3.5430 | 0.002055 | yes |
| -3.4920 | 0.002320 | yes |
| -3.4420 | 0.002619 | yes |
| -3.3920 | 0.002954 | yes |
| -3.3420 | 0.003329 | yes |
| -3.2910 | 0.003750 | yes |
| -3.2410 | 0.004221 | yes |
| -3.1910 | 0.004748 | yes |
| -3.1410 | 0.005337 | yes |
| -3.0900 | 0.005994 | yes |
| -3.0400 | 0.006727 | yes |
| -2.9900 | 0.007543 | yes |
| -2.9400 | 0.008450 | yes |
| -2.8890 | 0.009458 | yes |
| -2.8390 | 0.010576 | yes |
| -2.7890 | 0.011814 | yes |
| -2.7390 | 0.013185 | yes |
| -2.6880 | 0.014699 | yes |
| -2.6380 | 0.016368 | yes |
| -2.5880 | 0.018208 | yes |
| -2.5380 | 0.020230 | yes |
| -2.4870 | 0.022450 | yes |
| -2.4370 | 0.024883 | yes |
| -2.3870 | 0.027545 | yes |
| -2.3370 | 0.030451 | yes |
| -2.2860 | 0.033619 | yes |
| -2.2360 | 0.037065 | yes |
| -2.1860 | 0.040805 | yes |
| -2.1360 | 0.044858 | yes |
| -2.0850 | 0.049239 | yes |
| -2.0350 | 0.053964 | no |
| -1.9850 | 0.059049 | no |
| -1.9350 | 0.064509 | no |
| -1.8840 | 0.070356 | no |
| -1.8340 | 0.076603 | no |
| -1.7840 | 0.083260 | no |
| -1.7340 | 0.090335 | no |
| -1.6830 | 0.097832 | no |
| -1.6330 | 0.105756 | no |
| -1.5830 | 0.114105 | no |
| -1.5330 | 0.122875 | no |
| -1.4820 | 0.132060 | no |
| -1.4320 | 0.141646 | no |
| -1.3820 | 0.151619 | no |
| -1.3320 | 0.161957 | no |
| -1.2810 | 0.172635 | no |
| -1.2310 | 0.183622 | no |
| -1.1810 | 0.194883 | no |
| -1.1310 | 0.206378 | no |
| -1.0800 | 0.218060 | no |
| -1.0300 | 0.229881 | no |
| -0.9800 | 0.241783 | no |
| -0.9300 | 0.253710 | no |
| -0.8790 | 0.265596 | no |
| -0.8290 | 0.277375 | no |
| -0.7790 | 0.288979 | no |
| -0.7290 | 0.300334 | no |
| -0.6780 | 0.311368 | no |
| -0.6280 | 0.322007 | no |
| -0.5780 | 0.332177 | no |
| -0.5280 | 0.341804 | no |
| -0.4770 | 0.350817 | no |
| -0.4270 | 0.359150 | no |
| -0.3770 | 0.366736 | no |
| -0.3270 | 0.373515 | no |
| -0.2760 | 0.379434 | no |
| -0.2260 | 0.384444 | no |
| -0.1760 | 0.388504 | no |
| -0.1260 | 0.391578 | no |
| -0.0750 | 0.393643 | no |
| -0.0250 | 0.394680 | no |
| 0.0250 | 0.394680 | no |
| 0.0750 | 0.393643 | no |
| 0.1260 | 0.391578 | no |
| 0.1760 | 0.388504 | no |
| 0.2260 | 0.384444 | no |
| 0.2760 | 0.379434 | no |
| 0.3270 | 0.373515 | no |
| 0.3770 | 0.366736 | no |
| 0.4270 | 0.359150 | no |
| 0.4770 | 0.350817 | no |
| 0.5280 | 0.341804 | no |
| 0.5780 | 0.332177 | no |
| 0.6280 | 0.322007 | no |
| 0.6780 | 0.311368 | no |
| 0.7290 | 0.300334 | no |
| 0.7790 | 0.288979 | no |
| 0.8290 | 0.277375 | no |
| 0.8790 | 0.265596 | no |
| 0.9300 | 0.253710 | no |
| 0.9800 | 0.241783 | no |
| 1.0300 | 0.229881 | no |
| 1.0800 | 0.218060 | no |
| 1.1310 | 0.206378 | no |
| 1.1810 | 0.194883 | no |
| 1.2310 | 0.183622 | no |
| 1.2810 | 0.172635 | no |
| 1.3320 | 0.161957 | no |
| 1.3820 | 0.151619 | no |
| 1.4320 | 0.141646 | no |
| 1.4820 | 0.132060 | no |
| 1.5330 | 0.122875 | no |
| 1.5830 | 0.114105 | no |
| 1.6330 | 0.105756 | no |
| 1.6830 | 0.097832 | no |
| 1.7340 | 0.090335 | no |
| 1.7840 | 0.083260 | no |
| 1.8340 | 0.076603 | no |
| 1.8840 | 0.070356 | no |
| 1.9350 | 0.064509 | no |
| 1.9850 | 0.059049 | no |
| 2.0350 | 0.053964 | no |
| 2.0850 | 0.049239 | yes |
| 2.1360 | 0.044858 | yes |
| 2.1860 | 0.040805 | yes |
| 2.2360 | 0.037065 | yes |
| 2.2860 | 0.033619 | yes |
| 2.3370 | 0.030451 | yes |
| 2.3870 | 0.027545 | yes |
| 2.4370 | 0.024883 | yes |
| 2.4870 | 0.022450 | yes |
| 2.5380 | 0.020230 | yes |
| 2.5880 | 0.018208 | yes |
| 2.6380 | 0.016368 | yes |
| 2.6880 | 0.014699 | yes |
| 2.7390 | 0.013185 | yes |
| 2.7890 | 0.011814 | yes |
| 2.8390 | 0.010576 | yes |
| 2.8890 | 0.009458 | yes |
| 2.9400 | 0.008450 | yes |
| 2.9900 | 0.007543 | yes |
| 3.0400 | 0.006727 | yes |
| 3.0900 | 0.005994 | yes |
| 3.1410 | 0.005337 | yes |
| 3.1910 | 0.004748 | yes |
| 3.2410 | 0.004221 | yes |
| 3.2910 | 0.003750 | yes |
| 3.3420 | 0.003329 | yes |
| 3.3920 | 0.002954 | yes |
| 3.4420 | 0.002619 | yes |
| 3.4920 | 0.002320 | yes |
| 3.5430 | 0.002055 | yes |
| 3.5930 | 0.001819 | yes |
| 3.6430 | 0.001609 | yes |
| 3.6930 | 0.001423 | yes |
| 3.7440 | 0.001258 | yes |
| 3.7940 | 0.001111 | yes |
| 3.8440 | 0.000981 | yes |
| 3.8940 | 0.000866 | yes |
| 3.9450 | 0.000764 | yes |
| 3.9950 | 0.000674 | yes |
| 4.0450 | 0.000594 | yes |
| 4.0950 | 0.000524 | yes |
| 4.1460 | 0.000462 | yes |
| 4.1960 | 0.000407 | yes |
| 4.2460 | 0.000358 | yes |
| 4.2960 | 0.000316 | yes |
| 4.3470 | 0.000278 | yes |
| 4.3970 | 0.000245 | yes |
| 4.4470 | 0.000215 | yes |
| 4.4970 | 0.000190 | yes |
| 4.5480 | 0.000167 | yes |
| 4.5980 | 0.000147 | yes |
| 4.6480 | 0.000129 | yes |
| 4.6980 | 0.000114 | yes |
| 4.7490 | 0.000100 | yes |
| 4.7990 | 0.000088 | yes |
| 4.8490 | 0.000077 | yes |
| 4.8990 | 0.000068 | yes |
| 4.9500 | 0.000060 | yes |
| 5.0000 | 0.000053 | yes |
Learn with a worked scenario
One-sample z and t tests, the independent two-sample Welch t test and the paired-samples t test for means, with effect sizes.
Question
One-sample, two-sided t test: mean 52, null mean 50, sample SD 8, n = 25, α = 0.05.
- SE = 8 / √25 = 1.6.
- t = (52 − 50) / 1.6 = 1.25; degrees of freedom = 24.
- The two-sided p-value is about 0.223, above 0.05.
Do not reject this null at 5%; this does not prove the population mean is 50.
Precision: The test statistic, standard error and critical value are shown to 4 decimals, degrees of freedom to 2 and the test's p-value to 6; effect sizes to 4. Intermediate values are not rounded.
Load this example in the calculatorTry a variation
Raise the sample mean from 52 to 54, keeping the SD at 8 and n = 25. What is the t statistic, and does the decision at α = 0.05 change? Predict the answer before you reveal it.
Predict, then reveal
t = (54 − 50) / 1.6 = 2.50 on 24 degrees of freedom: twice 1.25, because the difference from the null doubled while the standard error stayed at 1.6. The two-sided p-value falls to about 0.02, below 0.05, so this null is now rejected at 5%.
| Sample mean | t statistic |
|---|---|
| 50 | 0 |
| 52 | 1.25 |
| 54 | 2.50 |
Check the assumptions
- Observations are independent and the mean-test model is appropriate.
- The one-sample t mode uses a sample SD; z mode requires a known population SD.
- Paired data are not independent groups: use the paired-samples mode, which tests the mean of the within-pair differences.
Common mistake: Choosing a one-sided alternative after inspecting the observed direction.
Method reference: NIST/SEMATECH statistical handbook. These examples illustrate the method; they do not validate every possible input.
How to Use This Calculator
Enter your input values
Fill in all required input fields for the Hypothesis Testing Calculator. Follow the units and input format printed next to each field. Where a unit selector is available, choose the units that match your data.
Review your inputs
Double-check that all values are correct and match the units or format shown for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.
Read the results
The Hypothesis Testing Calculator computes the output in your browser and displays the results, with units clearly labeled, as soon as they are ready — no data sent to a server.
Explore parameter sensitivity
Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.
When to Use This Calculator
- •Use the Hypothesis Testing Calculator to check your hand calculations on homework or exam problems — comparing its result with your own working helps identify arithmetic errors before they propagate.
- •Use it during the early design phase to rapidly iterate on parameters and narrow down feasible configurations before committing time to detailed finite element simulations or full design packages.
- •Use it when reviewing a colleague's calculation or checking a vendor's data sheet for plausibility — a quick sanity check can prevent costly downstream errors.
- •Use it to generate reference data for a technical report or presentation without manual computation, ensuring consistent, reproducible numbers throughout the document.
- •Use it in the field when a quick estimate is needed and a full engineering software package is not available.
About This Calculator
The Hypothesis Testing Calculator is a precision engineering calculation tool designed for students, engineers, and technical professionals. Step-by-step one-sample z-test, one-sample t-test, two-sample Welch t-test and paired-samples t-test, with effect sizes and a rejection region chart All calculations are performed using established engineering formulas from the relevant scientific literature and standards. Follow the units printed beside each field. Where a unit selector is provided, the selected unit is converted internally. Results are computed in your browser without sending data to a server, which keeps your inputs private. This calculator is intended as a supplementary tool for learning and design exploration; always verify results against authoritative references for safety-critical applications.
The Theory Behind It
Hypothesis testing is a framework for using sample data to decide between two competing hypotheses about a population parameter. The null hypothesis H₀ represents a default position (no effect, no difference, parameter equals a specific value); the alternative hypothesis H₁ represents the claim being tested. Testing proceeds by: (1) computing a test statistic from the sample data; (2) determining the p-value (probability of seeing a test statistic at least as extreme as observed, assuming H₀ is true); (3) comparing p-value to a significance level α (typically 0.05 or 0.01); (4) rejecting H₀ if p < α, otherwise failing to reject H₀. The one-sample z-test uses z = (x̄ − μ₀)/(σ/√n); the t-test replaces σ with s and uses t = (x̄ − μ₀)/(s/√n). Two-sample tests compare means of two groups. Type I error (rejecting H₀ when it's true) occurs with probability α. Type II error (failing to reject H₀ when it's false) occurs with probability β, related to statistical power 1 − β. Higher power requires larger samples, larger effect sizes, or more lenient α. Modern best practice is to report effect sizes and confidence intervals, not just p-values, because statistical significance doesn't imply practical significance. The calculator handles z, t, and two-sample Welch tests with p-value computation.
Real-World Applications
- •A/B testing in product development: test whether a new design produces significantly higher conversion rate than the baseline.
- •Manufacturing process comparison: test whether a new process produces parts with significantly different mean dimensions than the old.
- •Clinical trial analysis: test whether a drug has a significant effect on patient outcomes compared to placebo.
- •Quality audit: test whether a supplier's batch meets the specified quality level within statistical bounds.
- •Marketing research: test whether changes in pricing, messaging, or placement cause significant shifts in customer behavior.
Frequently Asked Questions
What's a p-value?
The p-value is the probability of observing a test statistic at least as extreme as the one actually observed, assuming the null hypothesis is true. A small p-value (typically < 0.05) suggests that the observed result is unlikely under H₀, leading us to reject H₀. p-values do NOT give the probability that H₀ is true — that's a common misconception. They give the probability of the data given H₀.
What's a significance level?
α is the threshold for rejecting H₀, usually set to 0.05 (5%) by convention. If p < α, reject H₀. α is the probability of a Type I error (false positive — rejecting a true H₀). Some fields use α = 0.01 for more stringent tests. Multiple testing (running many tests) requires α adjustment (Bonferroni, FDR) to control the family-wise error rate.
What are Type I and Type II errors?
Type I error: rejecting a true null hypothesis (false positive). Occurs with probability α. Type II error: failing to reject a false null hypothesis (false negative). Occurs with probability β. Power = 1 − β = probability of correctly rejecting a false H₀. Higher power is desirable but requires larger sample size, bigger effect, or higher α.
How is an alternative hypothesis stated?
Three forms: two-sided H₁: μ ≠ μ₀ (parameter differs from null value in either direction); one-sided greater H₁: μ > μ₀; one-sided less H₁: μ < μ₀. The choice determines the rejection region location (both tails, right tail, or left tail). Two-sided is default unless a directional prediction is justified in advance.
What if p is close to α?
p just below α (say 0.045) or just above (0.055) are essentially equivalent evidence. Don't treat 0.049 as 'significant' and 0.051 as 'not significant' — they are nearly the same strength of evidence. Report the actual p-value along with effect size and CI, and interpret cautiously. The all-or-nothing interpretation of significance is deprecated in modern statistical practice.
Related Calculators
Normal Distribution Calculator
Compute P(X < x), P(X > x), P(a < X < b), z-scores, and inverse normal with an interactive bell curve
t-Distribution Calculator
Compute p-values (one-tail and two-tail) and critical t-values for Student's t-distribution with any degrees of freedom
Confidence Interval Calculator
Compute confidence intervals using z or t distribution with margin of error, SE, and visual interval bar
ANOVA Calculator
One-way ANOVA for 2–5 groups: SSB, SSW, MSB, MSW, F-statistic, p-value, and pairwise post-hoc comparisons
Linear Regression Calculator
Simple linear regression with slope, intercept, R², adjusted R², residuals, predictions, and scatter/residual plots
Chi-Square Calculator
Chi-square test of independence and goodness-of-fit with cell contribution table, df, and p-value
References & Further Reading
Add the live Hypothesis Testing Calculator to your site. Free to embed, with a link back to MegaCalc.