X2 = ∑((y-x)2/x)
Where:
y: Observed numbers
x: Expected numbers
X2:Chi Square
A chi-squared test is any statistical hypothesis test also called as chi-square test or χ^2 test.