00:01
So we're told that in 2016 a sample of 200 in -store shoppers showed that 42 paid by debit card and 2017 200 randomly assembled people showed that 62 of them paid by credit card.
00:14
So two years 16 and 17.
00:18
We want to create a hypothesis test to test whether the percentage of debit card shoppers has increased.
00:24
So our null hypothesis will be that the proportion has stayed the same.
00:33
We'll call this p1, or 2016 we'll call that group 1, and 2017 we'll call that group 2.
00:40
So p1 is equal to p2.
00:42
The alternative is that p1 has actually, or p2 has actually increased, which means, you know, you could write this also, you know, alternatively as p2 minus p1 is equal to zero, p2 minus p1 is greater than zero.
01:03
They're the same thing.
01:06
And we're going to test this at the alpha of 0 .01 level of significance using the p -value approach, meaning we're going to get a p -value, and if the p -value is less than the alpha, we reject our null hypothesis.
01:19
So what we're going to do, we're going to convert our n and x values, where x is the number of debye -kart -shopper's, to proportions, and we're going to get a z -score with the following formula.
01:30
P hat 2 minus p hat 1 all over the square root of p hat times 1 minus p hat plus 1 over the sample size of 1 plus 1 over the sample size of 2.
01:44
P hat 2 and p hat 1 are going to be found by taking p hat i is equal to x i over n i, just the number of debit card shoppers, that's the total number in the sample, and you see this 0 .21, 0 .31 for 16 and 17 respectively.
02:03
So we see there's an increase but the question is whether it is significant or not.
02:07
And this p -hat here, this is different because there's no subscript on it.
02:11
P -hat is the pooled proportion.
02:13
So what we do is we take the sum of all the people who used debit cards, 42 and 62, x1, x2, divided by the total number in both samples, 200 plus 200.
02:23
Hundred.
02:25
That's what we get here.
02:28
104 out of 400 used a debit card.
02:34
So average proportion 0 .26...