We want to run a hypothesis test based on data from World War Two in south London. So south London was divided into regions and those regions were a quarter square kilometer, and they analyzed how Maney bombs hit the regions. Some of the region's had no bombs hit. Others had 123 or four plus. And they found 229 of those quarter square kilometer regions had no bombs. HIP 211 had one 93 head to 35 had three and eight had four or more. They then ran a Poisson distribution, and they calculated the expected number of hits and found 227.5 of the regions were expected to have no bombs hit 211.4. We're expected to have 1, 97.9 for to 35 for three and 8.7 for four. Now we're going to test a claim and the claim is going to be what becomes our null hypothesis, and the claim is that the actual frequencies of hits to each region fits the calculated puts on distribution. Now, when you run a hypothesis test, you need an alternative hypothesis to fall back on. So our alternative is going to be the actual frequencies of hits to each region. Do not fit the calculated puts on distribution. And in order to run this test, we're going to have to run the goodness of fit test because we're asking, How well did the actual numbers or did the actual numbers fit the expected numbers? And in order to run the goodness of fit test, you will need to generate or calculate a Chi Square test statistic. And to calculate that Chi Square test statistic, you are going to sum up observed, minus expected values squared, divided by expected. So let's go back up to our chart, and these are your observed values. And here are your expected values. So we're going to add a column onto our chart, and we're going to call it oh, minus e quantity squared, divided by E. So we'll take the observed value minus its corresponding expected value. The answer we get will square before dividing it by the expected value. Now the fastest approach to this would be to put the data into your graphing calculator. So I'm going to just clear out a list for a second here, and then I'm gonna go stat edit. And as you can see, I have list one with all the observed values and list, too Already has the expected values. So I'm gonna sit on top of list three and I'm going to tell the calculator. Please take all the observed values from list one. Subtract their corresponding expected values from list too square that deviation and then divided by all the expected values. Enlist to and you will get these decimals. Now, for the sake of recording them, I'm going to record them out to three non zero decimals. So the first one would be 10.989 0.757 0.245 0.664 and 0.563 Now, in order to calculate that Chi Square test statistic, I must add all of the's values together again. The fastest approach would be to come back to that calculator and I'm going to tell the calculator to add up everything in list three. So, in order to do that, I'm going to quit out of there. I'm gonna hit Second stat. I'm going to scoot over to math and I'm going to hit number five to sum up list three. And in doing so, I get my chi square test statistic to be approximately 0.976 So I'm gonna come back to our screen here, and our Chi Square test statistic was point 9761534896 Now we're ready to find our P value and R P value. We're really asking what's the probability that Chi Square is greater than that test statistic? So our test statistic was 0.9761534 896 And to get a better, better handle on that, I recommend that we draw a picture. So this is what the chi square distribution would look like. It is a skewed right distribution, and the shape of it is dependent on the degrees of freedom, and the degrees of freedom are found by doing K minus one. And K represents the number of categories we have split our data into. And if we go back to our chart, you can see we've split our data into five different categories, So our K value will be five, and our degrees of freedom will be four. Now, not only does our degrees of freedom kind of dictate the shape of our curve, it also tells us what the mean of our distribution is. So the mean of our chi square distribution will also before and you find that mean always slightly to the right of the peak of that curve. So we know the four is right here. Now, we came up with a test statistic of 0.976 ish, so that's all the way back here. So our P value is our likelihood of being greater than that. So we're talking about the area off the curve into the right tail. Now, the fastest approach is to use our chi square cumulative density function on your calculator, and the calculator requires you to provide the lower boundary of the shaded area, the upper boundary of the shaded area and the degrees of freedom. So, in our problem, our lower boundary is that test statistic and the upper boundary. Keep in mind that right tail extends infinitely far. So we're going to use a very high number. We're going to say 10 to the 99th power, and then our degrees of freedom was four. So let me show you where you confined this cumulative density function. So on my calculator you're going to find it under second. There's and it's going to be number seven, number eight. So we're going to type in the test statistic, as are low boundary 10 to the 99 as our upper boundary and our degrees of freedom, which was four. And we're going to get a P value off 0.91339 now. Another component of a goodness of fit test is the chi square critical value and that is found by utilizing the chart in the back of your textbook. So you're going to go to your chi square distribution and down the left side. It asks for how maney degrees of freedom. And in our case, it's four and across the top there, asking you for your level of significance, and our level of significance is defined by Alfa. And for this problem, we want to run the hypothesis test at a 0.5 level of significance. So we're going to look across from four and down underneath 40.5 and you should locate 9.488 So we have all the components we need to make a final decision on our hypotheses. Now, when it comes time to make the decision, we could do it one of two ways. We can either use the P value that we located up above, or we could use the critical value. And again, that's an or you do not have to do both. I will show you both, and you can decide which way you like better. So for the P value, you're going to make a comparison between your level of significance and your P value. And if your Alfa your level of significance is greater than the P value, then your decision should be to reject the null hypothesis. So let's do our comparison. The Alfa on this problem is 0.5 and our P value was 0.91339 and our Alfa is definitely not greater than RPI value. So therefore, our decision is to fail to reject the null hypothesis. Now. The other approach could have been used a light utilizing the critical value, and in doing so, I like to draw a picture to represent what's going on So we would place are critical value on our chi square distribution. And in doing so, you have now separated that curve into two regions. The region in the tail is going to be your reject null hypothesis region and the region that is to the left of that Chi square is going to be the fail to reject the null hypothesis region. And you're going to then place your critical value on the distribution and our critical value. Oh, sorry. We've placed our critical value. We're gonna place our test statistic now on our curve and our test statistic was 00.976 So that would fall all the way back here in the fail to reject region. So that's why if we used the critical value to decide our decision would be the same. So either approach, we made the same decision fail to reject the null hypothesis. So let's go back and look at that null hypothesis. So we are not going to reject this. We don't have enough evidence to say that that is not true. So therefore, let's write our conclusion the conclusion to our hypothesis test is there is insufficient evidence to reject the claim that actual frequencies of hits to each region fits the calculated Hassan distribution. Now there's one last statement here or question. Does the result prove that the data conforms to the Poisson distribution and the answer? There is no. The result does not prove that the data conform to the Poisson distribution. There's just not enough evidence to throw it away. We're not necessarily showing that it is accurate, either.