00:01
For this problem, to begin, i'll note that we'll be doing our test using a chi -squared statistic, where we calculate the chi -squared test statistic by taking the sum over all rows and columns, so i say sigma over i and j, of the observed frequency in row i column j minus the expected frequency in row i column j, squared, divided by the expected frequency in row i column j.
00:25
We have that the expected frequency in row i column j is going to be calculated by taking the row total for row i times the column total for column j, divided by the grand total number of observations, n.
00:40
I'll also note that the number of degrees of freedom for our distribution will be equal to the number of rows minus 1 times the number of columns minus 1.
00:54
Now i'll jump over into excel for actually doing the calculations here.
00:58
Alright, so you'll note that i'm not really bothering with doing the labeling of the individual cells because that doesn't affect the calculation of the test statistic, so i'm just setting up the array here.
01:10
I want to find my row totals, or my column totals, put that in a row, and my row totals, put that in a column, do that for each.
01:22
Then, i want to find my expected values.
01:26
So to do that, in excel here, i'll be using some dollar signs so that i can control what portion of the indices will be allowed to change.
01:36
So i do $e2 to get my row total from the column, then $b4 to get my column total from the row, then divide by 430.
01:49
So i get my expected value, do that for each one of the cells...