5. (10%) The chi-square test statistic X² is based on a comparison of the sample frequencies
fi with the corresponding expected frequencies Fiunder the null hypothesis H0. Show that test statistic
can be written as the following weighted sum of the residuals fi - Fi, that is