Skip to main content

Hypothesis Testing for Proportions

A learning component on hypothesis tests for a population proportion.

Options

  • types | array<string>: the type(s) of test (One-Sample, Two-Sample) the widget should expose. Default: [ 'One-Sample', 'Two-Sample' ].
  • feedback | boolean: controls whether to display feedback buttons. Default: false.
  • nullHypothesisAsValue | boolean: always display the null hypothesis as a single value. 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
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