Compute test statistics, p-values, critical values, and draw statistical conclusions for Z-test, t-test, Chi-Square test, and F-test.Visualize the sampling distribution, critical regions, and make informed hypothesis-testing decisions.
In statistical hypothesis testing, a test statistic is a standardized value computed from sample data that is used to determine whether to reject the null hypothesis. It measures the compatibility between the observed data and what would be expected under the null hypothesis. The choice of test statistic depends on the type of data, the parameter of interest, and the assumptions about the population distribution.
General form: Test Statistic = (Sample Estimate − Hypothesized Value) / Standard Error
The numerator measures the difference; the denominator scales it by variability.
Used when the population variance is known. The test statistic follows a standard normal distribution under the null. Suitable for large samples (n ≥ 30) or known σ.
Used when the population variance is unknown and estimated from the sample. The test statistic follows a t-distribution with n−1 degrees of freedom. Robust to moderate departures from normality.
Used for categorical data to compare observed frequencies with expected frequencies. The test statistic follows a chi-square distribution with k−1 degrees of freedom (where k is number of categories).
Used to compare two population variances. The test statistic is the ratio of sample variances and follows an F-distribution with (n₁−1, n₂−1) degrees of freedom. Sensitive to normality assumptions.
where x̄ is the sample mean, μ₀ is the hypothesized population mean, σ is the known population standard deviation, and n is the sample size. Under the null hypothesis, Z ~ N(0,1).
where s is the sample standard deviation. Under the null, t follows a t-distribution with ν = n − 1 degrees of freedom.
where Oᵢ are observed frequencies and Eᵢ are expected frequencies. Under the null, χ² follows a chi-square distribution with k − 1 degrees of freedom (or k − 1 − p if parameters are estimated).
where s₁² and s₂² are the sample variances from two independent populations. Under the null hypothesis (σ₁² = σ₂²), F follows an F-distribution with (ν₁ = n₁ − 1, ν₂ = n₂ − 1) degrees of freedom.
A clinical trial tests whether a new drug lowers blood pressure more effectively than a placebo. The null hypothesis is that the mean reduction in blood pressure is the same for both groups (μ_drug = μ_placebo). Using a two-sample t-test, researchers obtain a test statistic of t = 2.85 with p = 0.005 (α = 0.05). Since p < 0.05, they reject the null hypothesis and conclude that the drug significantly lowers blood pressure. The 95% confidence interval for the mean difference ranges from 3.2 to 8.7 mmHg, providing both statistical and practical significance. This tool can replicate such analyses in seconds.
Testing whether a portfolio's average return differs from a benchmark index (Z-test or t-test). Also used in risk analysis (F-test for variance comparison).
Comparing gene expression levels between groups (t-test), testing for Hardy-Weinberg equilibrium (chi-square), or comparing variances in assay reproducibility (F-test).
Testing whether the mean diameter of produced parts meets specifications (Z/t-test), or comparing the variability of two production lines (F-test).
Analyzing survey data to test for demographic differences (chi-square), or comparing means between treatment and control groups in experiments (t-test).
Comparing model performance metrics (e.g., accuracy) between algorithms using paired t-tests, or testing feature independence using chi-square tests.
Testing whether pollutant concentrations differ across sites (t-test), or whether categorical land-use patterns follow expected distributions (chi-square).
| Test | Distribution | df | α = 0.05 (two-tailed) | α = 0.01 (two-tailed) |
|---|---|---|---|---|
| Z-Test | N(0,1) | — | ±1.960 | ±2.576 |
| T-Test | t(10) | 10 | ±2.228 | ±3.169 |
| T-Test | t(30) | 30 | ±2.042 | ±2.750 |
| Chi-Square | χ²(4) | 4 | 9.488 | 13.277 |
| Chi-Square | χ²(5) | 5 | 11.071 | 15.086 |
| F-Test | F(10,10) | (10,10) | 2.978 | 4.849 |
| F-Test | F(20,15) | (20,15) | 2.329 | 3.369 |