Skip to main content

Hypothesis Testing for Means

A learning component on hypothesis tests for a population mean.

Options

  • types | array<string>: the type(s) of test (One-Sample, Two-Sample) the widget should expose. Default: [ 'One-Sample', 'Two-Sample' ].
  • tests | array<string>: the test(s) exposed by the widget. Default: [ 'Z-Test', 'T-Test' ].
  • nullHypothesisAsValue | boolean: always display the null hypothesis as a single value. Default: false.
  • feedback | boolean: controls whether to display feedback buttons. Default: false.
  • pValue | string: custom label for the p-value (should be a LaTeX equation string). Default: none.
  • style | object: CSS inline styles. Default: {}.

Examples

Live Editor
Result

Parameters

One-Sample
Z-Test

Let's assume that we have observed data with the following characteristics:

We conduct the following test (click on the hypotheses below to switch between the one-sided variants and the two-sided test):

We calculate the following test statistic:

Test Result

Plugging in our values, we have:

Under the null hypothesis, we calculate the p-value:

-3.0-2.0-1.01.02.03.00.100.200.30