Kinds

Independence Test for Two Discrete Variables

Definition

Let category variables and and consider a null hypothesis are independent. Then, the test Statistic, which follows Chi-squared Distribution, is defined as where , , ,

Link to original

Fisher’s Exact Test

The test statistic is defined as where ,

We reject if

Link to original

McNemar's Test

Definition

McNemar’s test is used to analyze paired nominal data (same samples are used for both conditions), particularly in before-and-after studies or matched-pair designs.

The test statistic is defined as

Examples

After treatment / No insomniaAfter treatment / Insomnia
Before treatment / No insomnia4515
Before treatment / Insomnia2515

Consider a null hypothesis The treatment is not effective. We can not reject the null hypothesis.

Link to original