b2KIT

Hypothesis Test Visualizer

Perform z-tests, t-tests, and chi-squared tests with visual rejection regions, p-values, and power curves.

Tested tool guide Tested browser tools Checked August 16, 2026

What Hypothesis Test Visualizer does, with a checked example

Choose a z-test, t-test, or chi-squared test to turn an observed result into a test statistic, p-value, and graphical decision. The visualizer places the statistic on its reference distribution, shades the rejection region selected by the significance level and alternative hypothesis, and displays how power changes across alternatives. The most important interpretive trap is the p-value: it measures extremeness under the null hypothesis, not the probability that the null hypothesis is true.

Worked example

A concrete input and expected output from the current implementation.

Input

Test: one-sample z-test
Null mean: 0
Sample mean: 2
Known population standard deviation: 2
Sample size: 4
Alternative: two-sided
Significance level: 0.05

Expected output

z statistic = 2.00000; two-sided p-value = 0.04550; critical values = -1.95996 and 1.95996; reject the null hypothesis at alpha = 0.05. The observed statistic lies in the right rejection region.

The standard error is 2 / sqrt(4) = 1, so z = (2 - 0) / 1 = 2. The probability beyond |z| = 2 in both normal tails is approximately 0.04550, which is below 0.05.

How the result is produced

1

Selecting the reference distribution

The chosen test family determines the curve used for comparison. A z-test uses the standard normal distribution. A t-test uses a Student t distribution governed by its degrees of freedom. A chi-squared test uses a chi-squared distribution, also governed by degrees of freedom. The observed statistic's location on that curve determines its tail probability.

2

Connecting regions, p-values, and power

For a fixed significance level, the shaded rejection region contains the outcomes designated sufficiently extreme under the null hypothesis. A two-sided z or t test divides that region between both tails, while a directional test uses its specified tail. The power curve represents the probability that the same rejection rule detects candidate alternatives, rather than another version of the observed p-value.

Good uses

  • Checking whether a calculated z or t statistic crosses the critical boundary for a chosen one-sided or two-sided significance test.
  • Seeing how changing a t-test's degrees of freedom alters its tail area, critical values, and resulting p-value.
  • Exploring how a chi-squared statistic compares with its asymmetric reference distribution while distinguishing significance from test power.

Limits and checks

  • The visualizer cannot determine whether z, t, or chi-squared assumptions fit the study. Dependence, biased sampling, an unsuitable null model, or sparse expected category counts can make the displayed probability misleading.
  • Choose the alternative hypothesis before interpreting the data. Switching from two-sided to one-sided changes the shaded rejection region and p-value, and selecting the favorable direction after seeing the statistic invalidates the intended significance level.
  • A small p-value does not measure effect size or practical importance. Likewise, a power curve depends on its significance level, sample size, variability, and assumed alternative, so changing those inputs can materially change the displayed detection probability.

Common questions

Why is the two-sided p-value larger than the area in one visible tail?

For a two-sided z or t test, results at least as far from the null in either direction count against the null hypothesis. The visualizer therefore combines both extreme tails. With these symmetric distributions, that is twice the corresponding one-tail area for a nonzero statistic. For a directional alternative, no: the opposite tail is not included in the p-value.

Does a result outside the rejection region show that the null hypothesis is true?

No. It means the entered result does not meet the selected rejection rule at the chosen significance level. The plot does not assign a probability that the null is true, and low power can leave meaningful alternatives undetected. Use the power display and the study's effect estimates to judge how informative a non-rejection actually is.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools