 ### Description

When 2 different groups receive different treatment, the number of each group improved and not improved can be compared as follows:

 group A improved group B improved total improved group A not improved group B not improved total not improved total group A total group B total patients

This data shows 1 degree of freedom.

chi square value using Yates correction for 1 degree of freedom =

= ((total number) * ((ABS(((number of group A improved) * (number group B not improved)) - ((number of group A not improved) * (number of group B improved))) - ((total number) / 2))^2)) / (((number of group A improved) + (number of group B improved)) * ((number of group A not improved) + (number of group B not improved)) * (total number of group A) * (total number of group B))

From the chi-square value, it is the probability that a difference is due to chance can be calculated. The Excel function CHIDIST will give the probability of the difference being due to chance for the chi-square value. The probability that the difference is not due to chance is then (1 - (probability due to chance)).