## Compare Counts

The CompareCounts Class in Quorum is used to determine if the results you got are different from what was expected for data that is not normally distributed. It implements two different tests: goodness of fit and test of independence.

The Goodness of Fit tests if the frequency distribution was different from the expected frequency distribution. The Test of Independence tests if two variables are related to each other.

Tests For Checking the Chances of Your Results
Formal Test Action in CompareCounts Class
Pearson's Chi-Squared TestCompareCounts

### Check Relationship Between Variables

#### Technical Test Name: Pearson's Chi-Squared Test

Pearson's Chi-Squared Test can calculate the frequency of unique items, calculate expected or observed counts, or compare tables and columns to return a chi-squared statistic. It can be used to test if two variables are related or not.

For example, Pearson's Chi-Squared Test can be used to see if there is any relation between the rate of certain colors being picked and gender. If the value you get back is a big number, then it means there is a strong relationship. If it is small, then it doesn't really have a relationship. Basically, Pearson's chi-squared test of independence is a way to figure out if two things are related by comparing what you actually observe to what you would expect if there was no relationship. Refer to the example below on how to do this test in Quorum.

## Check the Relationship Between Variables

Example of Pearson's Chi-Squared Test

## Next Tutorial

In the next tutorial, we will discuss Compare Means Pairwise, which describes how to determine what groups are different from each other.