Hypothesis Test Calculator: Two-Sample t-Test, Chi-Square Test and One-Proportion z-Test with p-Values
Run the common hypothesis tests from your summary figures.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Choose the test and the significance level.
Enter the means, standard deviations and sizes, or the observed and expected counts, or the successes and the sample size.
The calculator gives the test statistic, the degrees of freedom, the p-value and a plain statement of the conclusion.
Formulas used
- t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}
- \chi^2 = \sum\frac{(O - E)^2}{E}
- z = \frac{\hat{p} - p_0}{\sqrt{p_0(1 - p_0)/n}}
Worked example
With the default numbers in the calculator above:
- Difference between the sample means: 5.00
- Standard error of the difference: 2.26
- Test statistic t: 2.21
- Degrees of freedom (Welch-Satterthwaite): 30.96
- Two-tailed p-value: 0.034687
- Confidence interval for the difference in means (at the level 1 minus the significance): 0.38 to 9.62
- Effect size (Cohen's d): 0.76 (about 0.2 small, 0.5 medium, 0.8 large)
Change the numbers in the calculator to see the full working, every step, for your own case.
A second worked example
A different case, with these numbers: Which test? Chi-square goodness of fit (counts against expected).
- Expected counts: equal expected counts of 20.00: 20.00, 20.00, 20.00, 20.00, 20.00
- Each category's contribution (O - E)^2 / E: 0.20, 0.20, 1.25, 1.25, 0.00
- Chi-square statistic: 2.90
- Degrees of freedom: the number of categories minus 1: 4
- p-value: 0.574697
Common questions
What is a p-value?
The chance of a result at least as extreme as yours if the null hypothesis were true. If it is below the significance level you reject the null hypothesis.
When do I use a chi-square test?
To compare counts with expected counts, or to test whether two categories are independent in a table of counts.
What is Welch's t-test?
A t-test for two means that does not assume the two groups have the same variance. It is the safe default.
What does significant mean?
That the result is unlikely to be due to chance alone. It does not mean it is large or important.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Any first-year statistics text (hypothesis testing, the chi-square test).
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →