 Hi, this is Dr. Don. I have a problem, a two-way chi-square test for independence problem about the emissions of patients into a hospital. The administrator needs to know if there's a relationship between the time of the day a patient enters the hospital and the type of patient. Now, he collected data over a month as a sample, and these are the counts of the type of patient and in the morning, afternoon, evening, and night. So, we're going to use a two-way chi-square to solve this. Okay, we're going to use the XL two-way chi-square calculator. You can download with the tip sheet from the website. And it looks complicated, but it is really very simple to use. The blue cells you can enter data into and all the other cells will calculate and populate automatically. We need to start by entering the number of rows and the number of columns. We've got two rows, two types of patients, and we've got four times a day. So, that begins to shape up our consensus table here. We're going to leave the level of significance at 5%. We need to get the counts, the observed counts. So, let's go back to our original table, and I'm going to highlight just the counts. I'm not going to get the marginal totals. Right-click, copy, and then go back to my calculator, put the cell there, and paste. And you could stop there if you want. I like to replace this column variable and the column headers and the row variable and the row headers with the actual information. That way it's a little bit better when you put this output into your report. So, I'm going to go back here to the original, and I'm going to copy the type of patient and the output, and go here, click there, and then just paste the values. And now I want to get the, paste those in. So, there, we're really just about done. We need to check a few things. We can look down here and we can see we've got the degrees of freedom, which is calculated automatically for us, row minus one times column minus one. That gives us a critical value of 7.8147, and we've got a chi-square test statistic of 135.723, which is very large compared to the critical value. So, that tells us to reject the null. And then we've got a p-value that has this funky e to the minus 29 on there, which tells us that Excel doesn't have room to display all the zeros, and Excel gives us the answer in scientific notation. You would have to put 28 zeros in front of the three. So, it's very, very, very small. The calculator tells us that it is scientific notation that the p-value is less than 0.001. The final thing you need to check is this section here to see if the expected frequency assumptions are violated. And these are critical for a chi-square test. And in essence, we're looking to see are any of these cells too small? The most critical is not having any cell with a value less than one, and we're okay there. And then the second check is no more than 20% of the cells having less than five, and we're okay there. If you violate either of those, it'll either say violation or warning here, and then there's some guidance over here on how you can go forward, some advice on what to do. What I always like to do, particularly when I have many, many, many columns and many, many, many rows, is to combine adjacent rows or columns, adjacent categories, to increase the cell count observed, which usually will help on the expected values. So in this case, you're okay. Very small p-value says reject the null. Very large chi-square statistic says reject the null. I do hope this helps.