And this problem. We're trying to see if the method of payment is independent of age or not. Um so our null hypothesis is that, um the row and column variables are independent, and our alternative hypothesis is that the row and column variables are not independent. So in this situation, it would be that the age group and the payment method are not independent. So we're given this data set, and these air are observed values. And I went ahead and calculated the totals for our rose and for a rose and the totals for our columns and then our grand total. So we have this, and what we need to do to test our hypotheses is come up with a chi squared value in the chi squared. Value is the observed frequency for each row and column combination minus the expected frequency for each Roman column combination squared, divided by the expected frequency for each Roman column combination. So what? I am What do I mean by Rohan Column combination. So we have two rows and, uh, four columns, so this would be the combination for plastic in 18 to 24. This would be the combination for plastic in 25 to 34 so each of our cells represent a row and column combination. What we need to do is come up with the expected values and now are expected values for each Roman column combination is going to be the row total. So the end and that, um column times the n in that row divided by the total. Okay, so for our row of plastic, we have a total of 1 11 This would be 1 11 times are over column total of 42 a 42 divided by our grand total of 300. So with this, we get a value of Let me make sure I'm saying this right, 15.54 15.54 And we're going to do this for each of ourselves. So this is going to be 26.6646 This is 23.31 39.69 25.53 43.47 and 46.62 and 79.38 Now to come up with our chi squared, we need to come up with the difference between each cell and square it divided by our, um, expected frequency. So what I'm going to do is come up with another table that does this math for us and holds thes values. So for plastic and 18 to 24 the difference of the square difference over the expected frequency is approximately 1.92 for plastic and 25 to 34. It's 0.58 for the plastic and 35 to 54 combination, 0.850 point zero nine. 45. Plus it's 2.42 and these air rounded valued, by the way. So I'm just gonna fill out the rest of this table. So for our chi squared value, we need to come up with some of all the values in our cell, right in our table. In our in this difference table, S. O. R. Ky squared is going to be equal to 1.92 plus 0.58 plus 0.9 Continue. Continue. Continue until you get to plus 0.5 plus 1.42 and we get a chi squared value of seven. Approximately seven point 95 now, given that Sark, I squared value. We need to come up with a degrees of freedom in order to find our P value. This is the formula for the degrees of freedom. The number of rows minus one times a number of columns minus one. So we have two rows minus one, and then we have four columns minus one. So this is equal to one. This is equal to three. So one times three is three. So now what? We have to find a P value, given that our chi square to 7.95 and our degrees of freedom is three. So, me yet that our P value is, um, between 0.0 point 0 to 5. So the range is 0.252 point 05 And now we are testing this against an Alfa of 0.5 So because our he is in between 0.0 to 5 and 0.5 which is less than or equal to our Alfa, which equals 0.5 we reject the gnome. So what does that mean? It means that age and payment method are are not independent of each other. Um, so they're not independent. So what does this mean? For part? Be in part B were asked to find, um what observations could be make about the different age groups and their use of plastic or cash. So, in part B, you can come up with this conclusion or this statement, Um that, ah, the payment method for people aged 18 to 24 that used plastic. So payment for people aged 18 to 24 who use plastic is equal to 21 over 42 times 100 which is equal to 50%. And where am I getting these numbers from? If we go to our observed, um, table, I have 21 here, and that's the number of people that use plastic and who are aged 18 24. And that is over our total number of people aged 18 to 24. That's 42. So that's 50%. And the percentage of people that use, um so mission right pay instead of payment that are aged between 25 to 34 use plastic is equal to 27 over 69 times 100 which is equal to, uh, 27 over 63 sorry, 63 times 100 is equal to 42.86%. The payment method, given that they're 35 to 40 four and use plastic is equal to 27 over 69 times 100 which is equal to 39.13%. And payment method. Given that they are 45 and over and use plastic is equal to 36 divided by 90 times 100 illegal tow 40%. So we see that, um, the youngest age group used plastic to make purchases more frequently than any of the other age groups. So our conclusion for Beacon be, um, youngest age group uses cat ah, plastic more frequently than other age groups. And now we have Thio figure out. If, ah, companies such as Visa, MasterCard Discover can use this. So what they know is that because these aren't independent for their marketing strategy, they shouldn't just give out one ad for all age groups thinking that they can collect everybody. They should have targeted ads based that could be one possible thing. They could do targeted ads at each a troop, and they should also focus more on the older age groups, Um, and get them up to that 50% threshold, that 50% threshold before they try to get more people from the younger groups or any something like that, UM targeted ads and try to get older age group. Or maybe they can think that this is a some cost and say it's not worth looking at the older age groups because they are not interested in. They're not interested in plastic. It'll it they're only interested in cash, so we should just focus on recruiting more young people to use.