00:01
All right, so we have some hypothesis tests today.
00:02
The first one is looking at the pepsi challenge, and we have 100 diet coke drinkers who took the pepsi challenge, and 56 preferred the taste of diet pepsi.
00:12
And so we're going to test the hypothesis that more than half of diet coke drinkers will select diet pepsi in the blind taste test.
00:18
And we're going to test this at the alpha of 0 .05 level of significance.
00:22
So our null hypothesis will be that the proportion of diet coke drinkers who took the pepsi challenge and that will prefer diet pepsi is greater than or equal to 0 .5.
00:37
The alternative is that more than half would prefer diet pepsi.
00:41
Oops, that should be reversed.
00:43
Sorry.
00:44
P is less than a half against the alternative greater than a half.
00:49
So this is testing that the proportion of diet coke drinkers that prefer diet pepsi is greater than one half, of p greater than 1 half.
00:56
And we'll test this at the alpha of 0 .05, meaning our test, our one proportion z test, is going to give us a p value.
01:03
And if the p value is less than the alpha, we're going to reject our null hypothesis.
01:09
Let's go and get our statistic and run through this.
01:11
So our z statistic is found by taking the proportion estimate, which is going to be p hat, which is x over n.
01:25
So 56 over 100, which ends up being 0 .56.
01:31
P -hat minus p divided by the square root of p times 1 minus p over n.
01:39
And p is 0 .5.
01:40
P is going to be 0 .5.
01:42
And you might even see the null hypothesis as, like, p is equal to 1 .5, which is fine.
01:47
The main thing is the alternative, that p is greater than 1 .5.
01:52
I digress.
01:53
Let's keep going.
01:54
On.
01:54
A little side note, this square root in our denominator, this is called the standard error.
02:02
All right, so let's go ahead and get our z -statistic and wrap this up.
02:07
So we're going to substitute in, i'll show it so you can get used to how this works, 0 .56 and 0 .5 all over the square root of 0 .5 times 1 minus 0 .5, which is a half times a half, but it's nice to see how how the formulas work.
02:26
And we're going to take that product and divide it by 100.
02:32
And this is what we get.
02:41
The p hat's 0 .56.
02:42
I'll talk about the z 0 .05 in a second.
02:44
The standard error is 0 .05.
02:47
The z -score is 1 .2.
02:48
That's the result of this formula.
02:50
And then i'll show you what else here.
02:51
So there's two things happening here.
02:53
You get the z -score.
02:55
And the way we figure out the probability is if we take norm s this and you input that z -score.
03:00
And that's what this is.
03:00
And this gives you the probability of being less than that value.
03:04
So in other words, less than 0 .5.
03:06
But we don't want that.
03:07
We want the probability more than 0 .5.
03:09
So what we do is we do 1 minus the probability that this z -score, this is a little subscript, that this z -score is less than 1 .2, which corresponds with the p -hat value of 0 .56.
03:24
And that's where we get the 0 .115, because you take 1 minus 0 .885, and that's we get the 0 .115 and notice that p value is not less than the alpha therefore we fail to reject i had this z of 0 .05 1 .645 what you could use the z scores to the critical z scores to reject or accept your null hypothesis and it's a similar it's you get the same result but instead of getting the p value and seeing looking if that's less than the alpha you could take your z critical value, which corresponds with the alpha of 0 .05, and if your z score is greater than that value, you would reject.
04:04
So the same thing, but just different approaches.
04:07
Regardless, we fail to reject, and we say we do not have evidence that diet coke drinkers, that more than half of the population of diet coke drinkers prefer diet pepsi's greater than half.
04:19
Okay, the other question we have is about drug a and b.
04:24
And we've got 4 ,931 women have been treated with drug a, of whom 4 ,854 recovered.
04:39
And 4 ,876 of drug b were treated, of whom 4 ,764 recovered.
04:46
Covered.
04:46
So we want to see if there is a significant difference in the survival rates of patients between the two drugs.
04:54
So we're checking.
04:54
It's a two -tailed test...