Chi-squared test for homogeneity of a sample

Input Values


Undertake a chi-squared test for homogeneity on sample counts. The test calculates the expected counts assuming homogeneity (all classes have an equal probability) and undertakes a chi-squared test to test whether the observed values deviate significantly from the expected values.

Inputs are the desired level of confidence in the estimate, the desired precision of the results and two columns of data: The first column is a list of group identifiers and the second column is sample counts for each group. A header row should be included in the data and will be used to label the output.

Outputs include:

  • a table of observed and expected counts, proportions and confidence limits;
  • chi-squared statistic, degrees of freedom and corresponding P-value; and
  • a plot of confidence limits for the proportions in each group.

Confidence level:
Digits after decimal pt:
Paste two columns of data to be analysed in the space below and click on submit. First column is grouping variable, second column is counts for each group. Include a header row describing the data:
Download example data


  Home  |   About this site  |   Glossary   |   References   |   Links  

This site was created by Ausvet with funding from a range of sources.
It provides a range of epidemiological tools for the use of researchers and epidemiologists, particularly in animal health.
Please send any comments, questions or suggestions to Evan Sergeant
© 2019 Ausvet