 how to conduct a chi-square test for independence using Excel. A reporter claims the reasons given by workers for continuing their education is related to their job type. You survey your workers using a random sample and collect the data in the table below. At an alpha of 0.1, can you conclude that the reason and type of worker are dependent? You should notice that this is categorical data. We've got one variable, reason, which is categorical, and the other variable, the type of worker, which is categorical. And so we have counts. This should tell you that you would need to run a chi-square test. You always need to first state your null and alternative hypothesis. For the chi-square test for independence, the null is always that the variables are independent. They are not interrelated. The alternative has to be the complement, which is that the variables are dependent. Here, because the reporter claim that the reasons for the continuing education is related to the job type, that means the alternative is the claim. That is very important to decide because it determines what your final conclusion will be. In your assignment materials, there are a number of chi-square calculators. In order to pick the right one, you need to look at your data. And here we see that we have two rows, the type of workers, and three columns, the reasons. You should find this 2 by 3 chi-square calculator. And it says that we need to enter our data in the blue cells only. So let's do that. We know that alpha is equal to 0.1. So we can enter that. And now let's enter in the data. I'm going to highlight these cells, the data cells, copy them, go back here, select that first cell, and then paste the values in. And you can see that the calculator begins to fill itself out. We could also add the column variables and the row variables just to make it a little bit clearer. So I'm going to do that and copy these, go back, paste the values, copy those, go back, paste the values. And we can also copy in the reason, the values. And finally I'm going to get the type of worker and paste the values. And you can see that it pretty well flashes out our calculator. The calculator is really just basic Excel up here in the yellow cells. These are just sums of the rows, sums of the columns, and sum the total overall. Down here we're getting the expected, and the expected are calculated using the formula and evans. And that's just the column total times the row total divided by the grand total. And you do that for each of those cells to get the expected frequencies. When we're doing the chi-square we need to be careful that we have at least a count of 1 in each of the expected cells. So here the expected frequency assumption is met. The third section is where we calculate the chi-square. And it is, if you remember, is just the difference of the observed minus the expected squared divided by the expected. And then we sum those up both horizontally and vertically to get a total. And that's our standardized test statistic which is put in the table down here. The critical value is always a right tail value for the chi-square test. And it is found using the chi-square inverse right tail which is dependent upon the level of significance and the degrees of freedom. Degrees of freedom in a chi-square is equal to the number of rows minus 1 times the number of columns minus 1, which in this case is 2. And that gives us a critical value of 4.06, 4.605. And then we can calculate the p-value, the probability of getting this data or more extreme data using the XL chi-square distribution right tail, which is a function of the test statistic and the degrees of freedom. And with those pieces of information, the p-value, the test statistic, and the critical value, you can make your decision on whether to reject the null or not.