Okay, So in this question, we have a pie chart that shows the the distribution of the opinions of us parents on whether a college education is what the expense. Okay, so we have the probabilities Now. There is an economist that claims that the distribution of the opinions of the U. S. Teenagers is different from the distribution of us parents. So what do we do? As always, in order to test the claim, we are very skeptical. So in order to test the claim, we randomly select 200 US teenagers and ask them whether a college education is what the expense. So we have our survey results with us. The first column is the response. In order to solve these kinds of questions, always the first thing that we do is draw the table response. The first one is strongly agree. Strongly agree. I fall in this category, by the way. Okay. What is happening? All right, we need to move this. Okay, so the first category is strongly agree. The second one is somewhat agree. Yeah, yeah, yes. This is somewhat mhm. Agree. Then it is neither agree nor disagree. Yeah, yeah, yeah. There is neither agree nor disagree. Then there is somewhat disagree. Yes, somewhat disagree. Then in the end, there is strongly disagree. I think these are the people who dropped out of college and then went on to become billionaires. Yeah, when I was like, maybe who knows? Maybe Bill Gates or Zuckerberg or these kind of people. Okay, then we have the observed values, the observed values, the frequency that we observed in a sample. There were 56 86 86 62 34 mhm 14 and four. All right, now, what are the probabilities now? We have been given a pie chart, which has the probability. So the probability for strongly agree is 55%. I will write this at 0.55 Mhm. Then we have somewhat agree with a zero point three. Oh, just a moment. This would be wrong. Yeah. This should be 0.5. There should be point 0.30 then neither agree nor disagree is 5%. So this should be 50.5 then we have somewhat disagree is 6% what is happening? Mhm. This should be 0.5 Then they should be 0.6 and strongly disagrees. 4%. Zero point four Now, what would be our null and alternative hypothesis? Now, this is very important. You frame this correctly, you get half of your question right. You get a good understanding of what you are going to do. They're not. Hypothesis will be that the distribution. Mhm. That the distribution of opinion? Yeah. Of the parents. Sure of the parents and teenagers? Yeah. Mhm about Kevin. The and Judy are about Yeah, the education about the college education. About. Let's write it like this about the college education. Mhm is similar is similar. Okay. The distribution that whether they think that the college education is what the expense or not, this distribution for parents as well as the teenagers is similar. And what will be the alternative hypothesis? The alternative hypothesis will be that the distribution of opinions mhm of the parents and teenagers. Mhm. Okay. About the college education. Mhm about the college education. Differ. Yeah. All right. Now we are going to use the Chi Square goodness of fit test. We have and expected distribution and we have the observed frequencies. Now we want to see if the expected distribution fits the observed frequencies. What is the first step? The first step in this test is always finding the expected values for the categories. So expected value E I for a given category will be e i. Izzy quoting the sample size. Yeah, the sample safe multiplied by the probability for the category. The probability for that category. Probability of the category I What are the sample says the sample size is 200. Okay. Oh, just a moment. What happened? Just one moment. Yes, the sample size is 200. So this overall addition is 200. And over here, this is going to be the column of the expected values. Okay, So 200 in 2.55 This should be 110 than 202.30 There should be 6200.5 There should be 10, 202.6. This should be 12 and 202 points for this should be eight. Is this adding up? Let's just check. I think we have missed something strongly. Agrees 55 Makes sense. Somewhat agree Is 30 neither agree nor disagree. Is five somewhat disagree. Is six and strongly disagree is four. Oh. So this is where we made a mistake. This should be 100 and 110. Okay, now, let's see. Look at the edition 80. This is 192 There's 200. Yes. So these are expected values. Now, what is the next step? Now we have the expected values are the next step is calculating the price. Quote statistics. How do we do that? For every category, we are going to apply the formula or minus the That is the difference between the observer and the expected values. We square them. We divide the value by the expected value, and in the end, we sum them all up. So this will give us the overall chi square statistic for our table. Now, let us do that. Let us find these values. Yeah. So in the first case, the difference is 86 110. Okay, the difference between these two, So they should be 110 minus 86. We square this divide this by 110. So this is 5.236 5.236 for the next one. The difference is to this way will be four and four. Divided by 16 is 160.666 to administrate. This is 0.6 just 0.7 Okay, then the difference is 24. The square is again 5. 76 we divide this by 10. This is 57. Really, This is too big a difference. This is 57.6. We can already see that we have to reject the null hypothesis. We have sold enough questions to understand that these values are too big. The difference is to do sports for four divided by 12 is one by three, which is 0.3 three. Then the differences for force for 16 16 divided by it is two. Okay, so if we add all of these events is five point 236 plus 0.7 plus 57.6 plus 0.33 plus two. So this is going to be 65.236 Our chi square statistic is ridiculously high. This is 65.236 Now what is the next step? The next step is finding the degrees of freedom D f How do we find the degrees of freedom? It is done by the formula. Number of categories? Yeah, number of categories minus one. How many categories do we have? Five different categories. So this is going to be five minus one. Or this will give me four now, in order to decide. But I want to reject manual hypothesis or not. There are two methods. The first one is the P value method, where I find the P value. And if it is less than Alpha, I reject minor hypothesis. By the way, what is Alpha for this question? Alpha 0.5 My alpha is 0.5 Now. In order to find the P value, we can either use a chi square table or we can use a calculator, a statistical package like our python or SPS. The difference is the chi square table will give you an approximate range of the value, whereas a software will give you the exact value. So I'm using an online tool here. I'm putting in the value of 65 point 236 My use of freedom is before my significant level of 010 fire I had calculate. And my P value is less than 0.1 which means Okay, my fever do is approximately zero. My p value is approximately zero. And since my p values less than alpha, I am going to reject minor hypothesis. Red sect. Yeah, mhm reject final hypothesis. H no. Now the next method is the critical value method where I find the critical value for the chi square statistic. What do I need for this? I need the degrees of freedom which I already have four. And my alpha Phi Alpha level is zero point Sito favor. So I will use a critical value calculator You my critical value seeing things only 0.5 My degrees of freedom is fourth. I hit on calculate and the critical value that I get is 9.488 Critical value is 9.488 So if I look at the Chi Square distribution table if this is 9.488 my critical value 9.488 the area to the right of this is going to be the rejection region. This will be the rejection region the rejection region. Now what is my statistic? It is way towards the right. This is 65.236 So this is where towards the right. So this is definitely in the rejection region. And hence I will reject final hypothesis now if I go back and if I check what was my hypothesis? It was a distribution of opinion of parents and teenagers is the same. So we would say no. This does not seem to be the case. I will say this is my answer at zero point is right. This is at 5% confidence or at 5% level of significance. Level of significance. Yeah, I have enough evidence. Do you suggest that the distribution, the distribution of opinions of parents and teenagers and teenagers about the education, about shit the word of expensive Egyptian about the world of expense of education is different. That the distribution of opinions of parents and teenagers about the work of expensive education are not similar, are not similar, right? So what we can say is if we look at the question, what was the claim and economically in the distribution of us teenagers is different. Okay, so we can see that the claim of what we are essentially saying is that the claim of the economist economist seems to be correct seems to be correct. And this is how we go about doing this. What is the first thing that we did? We had the table with us, the response and the observed values. Then we had a pie chart from which we wrote these probabilities that we had. Then we found the expected values. We know the formula for that where samples are, is multiplied by the probability for each of the category. And then in the end, we found mhm the guy's question to stick for which we found system for all the categories and in the end, with some Jamala. So the without any calculations. Actually, we could have said that we have to reject the null hypothesis because this value is simply too high. But still, we found the degrees of freedom and after that we used two methods. The first one was a P value method. We found that the P value was very close to zero and R P value was less than alpha. So we rejected Arnold Hypothesis. The next method that we found that we used towards a critical value method. We found the critical value and found that our statistic lies to the right of the critical value in the rejection region. So we ended up rejecting Arnel hypothesis. And in the end, our conclusion is that at 5% level of significance, we do not have enough evidence. Oh, we have enough evidence here. We have enough evidence to suggest that the distribution of opinions of parents and teenagers about the worth of expensive education are not similar. Which means that the claim of the economist seems to be correct. And this is how we go about doing this question, Yeah.