00:01
Here we are given two samples, one from burger king and one from mcdonald's regarding the number of orders that were accurate and the number of orders that were inaccurate.
00:10
And we are asked to test at a significance level of 0 .05, test the claim that the burger king and mcdonald's have the same accuracy rates.
00:27
That's called burger king 1 and mcdonald's 2.
00:30
So the null hypothesis would be that p1 and p2 are equal.
00:40
And here, p is the proportion of, we'll say it's the proportion of orders that are inaccurate.
00:50
The alternative hypothesis would therefore be the proportions are not the same.
01:00
Now to find the proportions, we first have to find the sample sizes just by adding the accurate and inaccurate orders.
01:10
And so here we have a total of 318, and here we have a total of 362.
01:20
And so we can find estimates of the proportions for each population.
01:30
So these are the proportion of inaccurate orders.
01:36
Now, actually, let's make the proportion of accurate orders.
01:40
It doesn't matter, you would get the same answer, but this just seems a bit more intuitive.
01:45
So 264 over 318.
01:50
And for p2, that would be 329 over 362.
02:03
These proportions come out to 0 .830 and 0 .909.
02:14
Now, we can also find a pooled estimate of p.
02:22
And so that would be equal to 264 plus 329, divided by 318 plus 362.
02:37
And i'm just getting these numbers right from our samples.
02:56
And this comes out to 0 .872.
03:02
Now for large samples like this, our test statistic is given by this formula.
03:38
So if we go and calculate it, you get 0 .83 minus 0 .909.
03:47
And then we put in our pool at estimate here.
03:52
It's 0 .872 times 0 .128 times 1 over 318 plus 1 over 362.
04:12
All of this is in the square root sign.
04:19
And we get a test statistic of minus 3 .077.
04:27
Now, since our alternative hypothesis is that the proportions are not equal, this is a two -sided test.
04:35
Which means that the p value is equal to the probability of z being greater than plus 3 .077 plus the probability of z being less than minus 3 .077 basically it's the probability of getting a test statistic at least as extreme as the one that we got and that comes out to 0 .002 approximately...