Welcome back to the video series on statistical tests using Excel. My name is Dr. Joe Snyder. This particular video is about chi-square tests, and the way that chi-square testing works, it's hypothesis testing, and it's around contingency tables, which are these summary tables of rows and columns and counts in the middle. So observed frequencies means you've got counts. the middle by these categories of rows and categories of columns this particular spreadsheet can handle anywhere from a 2x2 which is the minimum that you can deal with in this technique on up to a 10 by 10 all you do is fill in the correct values so the way that this spreadsheet works is similar to the rest of them that are in the video series you have the light blue values or what you data enter then you have one more data entry entry down here at b34 but then the yellow area down here is where you actually see the results so that's what you're seeing there right now okay let's go through an example if I have two different hotels we'll call it a and B and then we're going to say will you return maybe send out a survey it's a yes and a no as to whether people will come back or not what we're really trying to figure out is based on maybe survey data or some kind of counts that we've done based on customer feedback the fact is is that hotel a may be different than hotel b as far as what kind of reasons they might have for coming back or not.
We want to know if the proportions of the yeses and noes between A and B are the same. If they're not the same, then we have to dig deeper and maybe go into a reason analysis for why. So this is a very high level, this two by two, and what's very typical is if you do find a difference that you might do another chi-square analysis on digging deeper into the relationship as to why or develop reason codes for things happening.
So let's enter some numbers and actually perform this analysis. So say we had 110 responses that for hotel A they said they would come back and maybe 90 so out of 200 110 said they would come back. In hotel B's case only 35 said out of 200 so you have 165 so we're starting to see a little difference here but is it a provable difference statistically as we that's all we have to enter so now we're going to go back down here to the end and see that the critical value is 3.8415 the chi-square statistics way bigger than that and that is the particular test we have here.
If the chi square test in row 41 is larger than the value of the critical value then you reject. The p-value being essentially zero is less than the level of significance alpha of 0.05 so that's another the other method is the p-value method and we would reject. Both the critical value method and the p-value method should jive with each other. should be both saying the same result. If we went back up there and instead of for for B we had 100 and 100 instead to where it wasn't such a clear difference, now it's a little harder to tell just by a judgment call or gut feel.
These don't seem very different and now we have to go through the numbers. Now we say do not reject because the numbers are much more in line with each other and the proportions are not that much different than each other for the different hotels. So that's basically how the chi-square works. Data enter your numbers and then based on those numbers it calculates a bunch of things in the middle like the expected frequencies if.
The proportions were the same. That's what these numbers here would represent and those are calculated for you. What would be expected if H0 was true.
So it calculates what that is. Then and over to the right it calculates all kinds of difference values and if the differences are significant enough then that's what comes out in the chi-square test statistic. So this particular Hypothesis test runs almost the same as those other one sample tests that we reviewed in other videos and same methods apply just different inputs this time of a contingency table of values. Thank you very much for watching this video and I hope you watch all the rest of them in the series.