 Hi, this is Dr. Don. I have a problem out of Chapter 10 on chi-square tests for categorical variables. This problem is a one-way table, or what I prefer to call a goodness of fit test. And how do I know that? Let's read the problem. We're given a random sample, 60 patients, n equals 60. And they're talking about a jaw dysfunction, TMD. This prior to the treatment filled out a survey on two habits, non-functional jaw habits. Teeth grinding, teeth clenching that have been related to TMD. Of the 60 patients, five admitted only to teeth grinding, 13 admitted only to clenching, 24 so they do both, and 18 so they do neither. Okay, so what kind of a test is this? When I read this, I see we have one variable, and that is the patients who admitted to various things about whether or not they have Bruxism, I'm sorry, TMD. And we're given, we have 60, and we've given counts, five, 13, 24, and 18, which are categories, counts in that one variable. So that tells me that this is a one variable test, and since we're given counts, we would have to do a chi-square test. Let's go through it. Describe the qualitative variable in interest, and it is a qualitative variable in interest in jaw habits. There are four levels or categories that we talked about, and then we need to give the null and the alternative. The null for goodness of fit problems is that the proportions of the categories are either equal, as they are in this case, or that if we're given a reference distribution, that the proportions are equal to those references. In this case, it's the simple one, just that they're all equal, that they have the same proportion. The alternative is that at least one of the proportions differs. We don't know which one. And then we need to calculate the expected numbers, and the expected number for each one way table is 15. How do we get that? Well, we're going to use stat crunch. I'm going to go over here to stat crunch, bring stat crunch up. And the first thing we do, I'm just going to, in this first column, enter 1, 2, 3, 4, because we've got four categories. And then I want to put in there the values that we're given to counts. We've got 5, enter, 13, enter, 24, enter, 18, enter, and it doesn't really matter. We don't waste time naming those. So what we're going to do is just go to stat, always go to static, click the wrong one, goodness of fit, chi-square. That's why I want you to learn that a one-way table is a goodness of fit chi-square to most of the world. I'm going to click on that, and what we need to do is our observed, which is in our variable two column here. Those are the counts that we observed. I'm going to select that. And then our expected, we don't know, we don't have a column showing what those expected values are, but we have an option here to select all cells are equal, which goes back to our null, that P1 equal P2 equal P2 equal P3. And we just click compute. And we get here our output. Here are our observed and expected values. There's our chi-square test statistic, and there's our P-value. Now let's go through and look at the questions. The next one is the expected number for each cell is 15, which we're given there. And the test statistic is 12.933, which is what the value we have there. And it doesn't want P-value. It wants the rejection region. So how do we get that? Well, we, again, can do that using stat crunch. This time we go to stat calculators chi-square. And for the goodness of fit, that's the simple one. The degrees of freedom is equal to the levels, or the categories minus one, which would be three. And our alpha is 0.05. We always want the right tail, so make sure you select that. And that gives us a critical value of 7.815. And that's the answer they want there. Okay, scrolling down, they want to give the appropriate conclusion. Well, because our test statistic 12.913 is greater than our rejection value of 7.18. And again, we can see that here on the stat crunch chart that is nice. Here's our rejection region, and 12.933 is right there in the rejection region. And that tells us that we would reject the null. There is sufficient evidence that the percentages associated with the emitted habits are not equal. Let's go down to the final one. Find the 95% confidence interval around the true proportion of dental patients who emit both habits. Well, the ones that are emitted to both habits are 24 out of 60. So we go back into stat crunch, stat, and we want to go to proportion stats, one sample with summary. The number of successes is 24, number of observations is 60. We want to click on confidence interval. We want it at 95%, which is 0.05. And we click compute, and stat crunch quickly gives us lower limit of 0.276, which is 0.276, which is 0.28, and upper of 0.524, which is 0.52. And of course, then interpreting that, there's a 95% confidence that the true population proportion of people who emit it to both is within that interval. So I hope this helps.