Calculator
Example Data Table
| Test | Null value | Sample input | Tail | Alpha |
|---|---|---|---|---|
| One sample t | 40 | Mean 42, s 8, n 30 | Two | 0.05 |
| Two proportion z | 0 | 56 of 100, 42 of 95 | Right | 0.05 |
| Paired t | 0 | Mean difference 2.5, s 4.1, n 24 | Two | 0.01 |
Formula Used
One mean z or t: statistic = (sample mean - null mean) / (sample standard deviation / square root of n).
Two mean test: statistic = ((mean one - mean two) - null difference) / standard error.
Welch degrees of freedom: uses the Satterthwaite approximation from both sample variances and sample sizes.
One proportion: z = (sample proportion - null proportion) / square root of p0(1 - p0) / n.
Two proportions: z uses the pooled proportion and the combined standard error.
Variance test: chi square = (n - 1) sample variance / null variance.
P value: the selected tail area is calculated from the matching reference distribution.
How to Use This Calculator
- Select the hypothesis test that matches your data.
- Choose a two tailed, left tailed, or right tailed alternative.
- Enter alpha and the null value for the parameter.
- Fill only the fields needed for your selected test.
- Press calculate and read the p value and decision.
- Use CSV or PDF buttons to save the calculated result.
What Is a Hypothesis Test?
A hypothesis test checks a claim with sample data. It compares a null value against observed evidence. The null hypothesis usually states no change, no difference, or no effect. The alternative hypothesis states the direction or difference you want to test.
Why the Test Matters
Statistical decisions need more than a sample average. Random variation can make ordinary data look unusual. A test statistic converts that difference into a standard scale. The p value then shows how surprising the result is when the null claim is true.
Supported Test Types
This calculator handles common classroom and business cases. You can test one mean with a z or t method. You can compare two means using a standard error. Proportion tests use successes and sample sizes. A variance test uses the chi square distribution. Paired tests use the mean and spread of differences.
Choosing the Tail
A two tailed test checks for any difference. A right tailed test checks whether the estimate is greater. A left tailed test checks whether it is smaller. The tail choice must be selected before seeing results. This keeps the conclusion fair and consistent.
Reading the Result
The calculator reports the estimate, standard error, test statistic, p value, critical value, and decision. If the p value is less than alpha, reject the null hypothesis. If it is not less, do not reject it. This wording is important. A large p value does not prove the null claim.
Good Data Practice
Enter sample sizes as counts. Use sample standard deviations, not population values, for t based tests. Use independent groups for two sample tests. Use paired tests only when each value is matched with another value. Check assumptions before making formal conclusions.
Best Use
Use this tool to verify homework, reports, experiments, surveys, and quality checks. It gives fast calculations, but context still matters. Always report the test type, hypotheses, alpha level, p value, and final decision.
When results are close to alpha, inspect data quality carefully. Rounding, outliers, small samples, and biased sampling can change interpretation. Use confidence intervals with the test result when possible. They show practical size, not just statistical evidence. This helps readers judge real importance more clearly.
FAQs
What is the null hypothesis?
The null hypothesis is the default claim. It often says there is no difference, no change, or no effect. The calculator compares your sample evidence against this claim.
What does the p value mean?
The p value is the tail probability under the null hypothesis. Smaller values mean the observed result is less likely if the null claim is true.
When should I use a t test?
Use a t test when the population standard deviation is unknown and you use a sample standard deviation. This is common for mean tests.
When should I use a z test?
Use a z test for proportions, known population standard deviations, or large sample settings where the normal approximation is appropriate.
What is alpha?
Alpha is the chosen significance level. Common values are 0.05, 0.01, and 0.10. It sets the cutoff for rejecting the null hypothesis.
What is a two tailed test?
A two tailed test checks whether the parameter is different from the null value. It looks for evidence in both directions.
Can I prove the null hypothesis?
No. A test can fail to reject the null hypothesis. That does not prove it is true. It only shows insufficient evidence against it.
Why are assumptions important?
Assumptions affect the reference distribution and p value. Bad sampling, dependence, outliers, or wrong test choice can produce misleading results.