${\chi }^{2}=\mathrm{\Sigma }\frac{{\left(\mathrm{\Sigma }{O}_{jt}-\mathrm{\Sigma }{E}_{jt}\right)}^{2}}{\mathrm{\Sigma }{E}_{jt}}$

Description:

Math equation.To compute chi squared one first tabulates the number of observed events and the number of expected events in each group during each time interval and sums these. Then, for each group you subtract the total expected events from the total observed event and square this difference. This quantity is then divided by the total number of expected events in the group. This is then summed for the groups and the result is chi squared.