00:01
All right, so we have a manufacturer is considering ordering electronic components from three different suppliers a, b, and c and what we're looking at are the number of defective components out of shipments of 500 and so we have these defectives for a, b, and c and the good ones are here and what we're looking at is whether or not the all population proportions are equal.
00:27
That's our null hypothesis.
00:28
All population proportions are equal.
00:30
The alternative, not all population proportions are equal and we're going to test this this set of hypotheses at the alpha of 0 .05 level of significance and what we're gonna do is basically do a chi -squared test.
00:48
The reason we're gonna do a chi -squared test it's because the chi -squared test allows us to essentially a goodness of fit test and the good the fit we're looking for is all these proportions would be equal and they're not equal but we want to see how far off are these from equal and so our chi -squared test our chi -squared statistic is found by taking the sum of the observed values, which we have right here minus the expected values which we don't have take that square difference divided by the expected values and the expected values are found by taking the total in the row which we haven't found yet, that's total defectives in this case times the total in the column which would be the all the supplies by a or all supplies from a, b and c and for the rows also the good ones as well, it'll be the sum of the rows and then divided by the total in the table so let's go ahead and get those totals and the expected values and here they are here are the row totals 75, 14, 25 for the rows and 500 for all the columns and and the way you this works is you have 25 came from doing the 75 the total in the row times the total in the column which is 500 divided by 1500 so we got that and you do that for all the six cells and you get these values and this is what we'd expect if all the proportions were equal and now we can do our chi -squared statistic and so it's a repetitive calculation, so i'll just do a few of the terms which you'll see i'll show you all the terms individually so you know if you're doing your algebra correct so the observed defective a's is 15 minus the expected defective defectives in a is 25 square that divided by 25 plus and we do that five more times all the way down to good and c so the observed good c's was 460 minus the expected which is 475 square that difference and divided by the expected 475 right these are the six terms.
03:17
I thought this is kind of cool you end up with these integers you don't see that too often, so it's kind of it's not this factor integers doesn't mean it's kind of fun to see that but this is what we get we sum all these terms together we get our chi -squared statistic 14 .736 or 14 .737 and the p -value we need the degrees of freedom for the p -value degrees of freedom is 2 and we get that by doing the number of rows are minus 1 so that's 2 minus 1 is just 1 times the number of columns minus 1 so there are 3 columns so 3 minus 1 is 2 so 1 times 2 is 2, 2 degrees of freedom and the p -value we get is down here 0 .0006 and i got reasons chi -dist function 14 .737 with 2 degrees of freedom the p -value is less than the alpha therefore we reject the null hypothesis and say that not all population proportions are equal now we're going to figure out which one or which ones are equal and we're going to do a multiple comparison test using the same level of significance and we're going to compare the absolute difference of the proportion pi minus pj the two different portions show there and we're going to see is that greater than this critical value based on i and j and this critical value is the square root of the chi -squared statistic with 0 .05 alpha 2 degrees of freedom or take that times the square root that's kind of a long square root.
05:12
So p hat i times 1 minus p hat i over n i the sample size oops, i wrote j there.
05:24
I screwed i plus p hat j times 1 minus p hat j all over n j the sample size all right, let's go ahead and do that so let's get our proportions our p hat values these are these p's should actually have hats on them because these are going to be the estimates and we find the p hat values by taking this would be pi which is only taking the x i over n i where x i is the number of defectives.
06:06
So in this case 15 for a over n i which would be the sample size of 500 and so we're gonna do that for each of them and we'll get our proportions and we'll be good to go here are the proportions 0 .3, 0 .04, 0 .08 the chi -squared critical value is 5 .991 we got based on this chi i and v function 0 .05 is alpha 2 degrees of freedom, which we saw earlier and here are the comparisons and this cv ij that's the critical value and that's by taking and then just be careful with your algebra but this is what you do.
06:49
So for a versus b, you're gonna compare these are your two proportions your two p values here and so it's gonna go this value.
07:00
It's gonna go here and here and then they're both 500 so it doesn't really matter and then 0 .04 is gonna go here and here the difference is 0 .01 the critical value or critical value is what you get from this whole thing here this this whole chunk 0 .028 this absolute difference here between the a and b proportions is not greater than this so it's not significant that difference is not significant.
07:33
It's like a versus c so in this case, we're gonna switch over here...