Question: how to do yates correction?
Answer: To reduce the error in approximation, Frank Yates, an English statistician, suggested a correction for continuity which adjusts the formula for Pearson's chi-square test by subtracting 0.5 from the difference between each observed value and its expected value in a 2 × 2 contingency table (Yates, 1934).