So again, according to the manufacturer of Eminem's, he has given us a distribution that the Eminem should follow based on various colors. So let's just draw the observation table. This is always the first step. So the first one is color. All right. So what are the various colors that we have? Okay, so we have brown, yellow, red, blue, orange and cream. Okay. Mhm. So we have brown. Hello, red, blue, orange and screen. Okay then we have the observed values. That is 53 66. So, let us just right. This is the frequency as it is given to us Because this is 53. This is 66, 38 96 88. 59 38 96 88 59. Okay. All right. So what we have over here Is that there is a boy now he counted the number of Eminem's that were each color and obtained the frequencies that are giving us at the table. Now, what we have to do is we have to test whether the Peanut M&M's follow the distribution stated by Eminem Mars at 0.05 level of significance. Okay, so our alpha, 0.05 Alpha is 0.05. Okay, what is a null hypothesis? This is the first step of solving this question. Finding on the hypothesis. The null hypothesis is that the peanut Eminem's follow the distribution stated by Eminem mars. Okay, the peanut Eminem's follow the distribution. Follow the distribution given by Eminem s are given by the manufacturer. Given by the manu factor. All right. What is going to be the alternative hypothesis? Now, that is just checking the textbook is the name of the manufacturer, eminent mars. Okay, so a minute mark is the manufacturer. Alright, this will be that the peanut Eminem's the peanut m and m's do not follow the distribution given by Eminem mars. All right, so now we have the number and the alternative hypothesis in place. What is the next step? The next step is to calculate the expected values. But first we need the probabilities. What is the distribution that we have? The probabilities? The probabilities. Okay, so the probabilities are 15 Brown. So this should be .15 15 brown. Oh, just a moment. This is 15 yellow. Actually, what is for brown? It's 12 brown. 15 yellow. Okay, so this is 12 brown. This is 15 hello, 12 red, 23 blue. 12 red, 23 blue, 23 orange and 15 Green 23 audience and 15 cream. Okay, so this is 12, 15 12, 23 23 and 15. Okay, now, the next step is finding the expected values, the expected values. Now how do you calculate the expected values? Expected value for any categories given by the sample says? The sample says multiplied by the probability for that category, multiplied by the probability four. Category I Okay, so this is going to be sample size, multiplied by the probability for category. Now what is a sample says in order to find the sample says we need to add this frequency table. So if I had all of the 53-plus 6 86 plus 38 plus 96 plus 88 That's 15 9. When is this? 404? That is just check this with a calculator. So this is 50. c 2015 three plus 66 plus 38 plus 96 plus 88-plus 59. Yes, this is 400. My apologies. This is 400. Okay, now how do you find the expected values? Let's say for brown it will be The sample size. That is 400. multiplied by the probability, right? Because if the peanut Eminem's actually one of the probability is given by the manufacturer, 12 of 400 Should be brown colour, so this is nothing but 48, the expected value is 48. In this case it is 60, This is again 48. Now, 23, this has to be 92. This also has to be 92 and this has to be 16 again, right? 48 60 48 90-92 and 60 years. This is 400. So now that we have the expected values, what is the next step? The next step is to calculate the chi square statistic. How do you calculate the chi square statistic? Now, for every category, if we are going to find the difference and observed and expected values will square them. Then we'll divide this result by the expected values and in the end we'll add all of these values for all the categories. So let us look at this now in this column four category, Brown, What is the difference in observer, unexpected values. 53 -48, which is five, the square of five is 25. And we divided by the expected value 48, which is .5-0. So this is .5208. All right now the difference is 66 squares 36 divided by the expected value of 16, Which gives us .6. Okay then the difference is 10 10 squares 100 100 Divided by the expected value of 48 gives us 2.083. So this is 2.083. All right now the difference is 44 squared 16 Divided by the expected value of 92. 1.1739. Let's just write this is .174. Now the defense is again for In this case, force for a 1616 divided by the expected value of 92. Well give us .174 again .174 For the last one. The difference is 11 divided by 60 One square is again one. And this dude was 16. Will give me .0166 .0166. Okay, now what I do is add all of these up. So this is going to be .5208 Plus four in 6 plus 2.083 plus .174 plus .174 plus 0.0166. This is 3.5684. So my guys wasted a stick these 3.568 four. Right, is this right? Well, this looks to be correct. Okay, so now the next step is I have the chi square statistic. Now, in order to continue my analysis, I need one very important piece of information, which is called the degrees of freedom. And this is given by the formula number of categories minus one. Right, Okay. So how many categories do I have? Brown, yellow, red, blue, orange, green. I have six categories. So this will be 6 -1, which will give me five. So my degrees of freedom is fighting. All right. Now, in order to continue my analysis, I have two approaches. The first one is the p value approach. The p value approach. Okay. And the second approach is the critical value approach. The critical value approach. All right, so how do I find a P value? I have my chi square statistic as 3.5684 I have My degrees of freedom is fine. Now I can either use the chi square table or I can use a calculator. Our statistical package. So what I have here is an online tool calculator. I put on my chi square value at 3.56843 point 5684 My reviews of freedom is five. My level of significance is 0.05 and my p value is .6130. My p value, My p value is 0.6130 0.6130. My alpha was 0.5 Now I reject the null hypothesis if my p value is less than alpha, but in this case my p value is greater than alpha. Hence I feel to reject my null hypothesis. Each not great. Okay, now how about the critical value approach? Now this time I just need two pieces of information, My alpha, which happens to be 0.05 and my degrees of freedom, it happens to be five. Now I will use a critical value calculator. I put in my al 50.5 my degrees of freedom as five. And I get my critical value as 11.7 So my critical value, my critical Value is 11.07. What does this mean? Let's say that this is my chi square graph. Right? We know that the graph for the chi square distribution changes with various degrees of freedom. Right? So let's say that this degrees of freedom is five. This might not be accurate, but it is enough for understanding Now, critical value is 11.07. So let's say that this is 11.07. So all the values that lie to the right of this value will be set to be in the rejection region, right? So I will reject all the values that lie to the right of this. Okay, what is the value that I have? The value that I have is 3.5684, which lies to the left, which may lie somewhere around here. I don't know. It may be here or here or here, But it lies to the lab. So this is three 5684 right to the left of it. And this does not line the rejection region and hence I will fail to reject my hypothesis. It's not which is the same answer that we got over here and that we should get because these are just two different approaches. The answer has to be the same, right? So in this case, what we can say is add 0.05 level of significance level of significance. We do not have enough statistical enough statistical evidence, enough statistical evidence to suggest, do suggest that now we are okay to suggest that the claim of the company, that claim of the manufacturer M and M mars of the manufacturer of the manufacturer is false, right, is false or is not correct. So we can say that the peanut M and M's that we have do actually follow the distribution that is given by the eminent manufacturer right? We are not accepting the new hypothesis. But what we are saying is we do not have enough statistical evidence to reject it. Okay, so the first step in solving this question was to come up with the null and alternative hypotheses. National hypothesis was that the peanut M and M's follow the distribution given by the manufacturer. The alternative was that the peanut M and M's do not follow the distribution given by the manufacturer Eminem mars. Then we went to the table, right? The frequency distribution table. So over here we have the frequencies, we have the probabilities. We calculated the expected values using this formula way. And after that we apply this formula to get the chi square statistic which came out to be 3.5684 The another very important piece of information or isIL analysis is the degrees of freedom, which is a number of categories minus one, which is five in our case. Then we went on to solve this question by two different approaches. You can use any one of these, but it's better to know both of them. So I explained both of those approaches. And in the end we came to the conclusion that we do not have enough statistical evidence to reject. Then I'll hypothesis. Right? So we do not have enough statistical evidence to suggest that the claim of the manufacturer is fonts. Okay, This is how we go about doing this question.