Goodness of fit test, Test of independence, McNemar test

The calculator includes results from the Fisher calculator, binomial test, McNemar Mid-p, simulation.

Enter raw data directly

Enter raw data from excel

Enter raw data from excel

Matched pairs

You may copy data from Excel, Google sheets or any tool that separate data with **Tab** and **Line Feed**.

Copy the data, **one block** of **3** consecutive columns includes the top **header row** and left **header column**, and paste below. example

It is okay to leave empty cells, empty cells or non numeric cells won't be counted

The sum of the

k | Number of categories | |

n | Sample size | |

χ² | Chi square test statistic | |

DF | ||

Phi effect (Φ) | Φ=√(χ^{2}/n) |

validation message

Hypotheses

H_{0}: Model Fits

H_{1}: Model Doesn't Fit

Test statistic

χ² distribution

Target: Check if the statistical model fits the observations.

The test uses Chi-square distribution.

The test checks only the cases when the status of the dichotomous variable was changed.

The null assumption is that the probability to switch from A to B equals the probability to switch from B to A, equals 0.5.

Before \ After | A | B |

A | No change | A to B |

B | B to A | No change |

The null assumption is that the two categorical variables are independent.

The following R code should produce the same results:

**Goodness of fit example**: checking a fair dice.

Model: the probability of each side is equal - 1/6.

H_{0}: fair dice.

H_{1}: unfair dice.

The **groups** are the dice's numbers (1,2,3,4,5,6).

In this example, you throw the dice n times.**Expected frequencies** - for each group are n/6.**Observed frequencies** - the actual times each number appears.