 Hi everyone, it's MJ and we're looking at question 6 of the September 2017 paper. And this paper is on hypothesis testing and it's quite an interesting one because it's going to be asking us to do questions around the type 1 and type 2 error. So what I'm going to do is I'm going to read through the question and then we're going to get stuck into it. So it says some tea experts claim that the taste of a cup of tea does not change according to whether the tea or the milk is added first to the cup. To test the hypothesis that people cannot tell the difference, an actuary organizes a tasting experiment where an individual is asked to taste 10 randomly presented cups of tea. Five of these cups were prepared with tea added first and the other five with milk added first. The individual does not know how many cups of tea were prepared in either way. To the null hypothesis that people cannot tell the difference, the probability of correctly recognizing the preparation method purely by trans is considered to be 0.5. The actuary adopts the following decision rules for testing the hypothesis. Reject the null hypothesis if 7 or more cups are correctly identified. Conclude that the individual can tell the difference. Do not reject the null hypothesis if less than 7 cups are correctly identified. Conclude that the individual cannot tell the difference. Determine the probability of the type 1 error for this test. Okay, now just a very quick recap. These are the two types of errors that we can get in hypothesis testing. Type 1 is saying the following. Type 1 is the probability we reject the null hypothesis given that the null hypothesis is true. And then we have type 2 error which is the probability we fail to reject HO given that HO is false. Okay, so with that in mind, let's look at here. Determine the probability of a type 1 error for this test. So let's maybe stop writing this out here. We have, yeah, our null hypothesis is that HO, our P is equal to 0.5. Once again, we're dealing with the binomial distribution. We have a binomial in the sense of 10 as our N and our P which is what's under consideration. So the probability of a type 1 error is as follows. Okay, it is going to be the probability that we reject HO given HO is correct. Okay, and in this case, HO we're using P equals to 0.05 which means it's going to be the probability that we get the correct answers. Okay, so our correct answers are greater than or equal to 7 given that P is equal to 0.5. Now what this means is we're using our binomial. We're going to have the situation here with X equals to 7. Out of the 10, choose the X and we have to add for each one because remember we want to get the answer when it's equal to 7, equal to 8, equal to 9, equal to 10. So that's why we're summing it. When that is equal to 0.5, 1 minus 0.5, 10 minus X. This is coming straight from, I could say, the binomial. And what we're going to be doing is we're getting the following 0.8281 which is equal to 0.1719. And if you're like, whoa, how did you calculate that so quickly? This is like a monster sum to do. I mean, you could do this, especially if you've got the new fancy calculators and if you're allowed those fancy calculators into the exam, you can do it on that. Otherwise, actually, I know we're not allowed to have those fancy calculators in the exam. So we will be using the tables on page 187 to come up with these answers. So you just go to that page and it will have the binomial in the situation and it's quite easy then to apply it. So that is question one done. Not too bad. Let's look at question two based on past experience. We can quantify the probability P that an individual recognizes the T-preparation method correctly. Determine the probability of a type II error assuming that the true value of P is P is equal to 0.7. Okay. So what we're doing here, it's the probability that we fail to reject the null hypothesis given that the null hypothesis is false. So how are we going to do this? Here we can have part two. Probability of our type II error is equal to the probability that we accept or maybe we should probably be saying failing to reject HO. That should actually be better given that HO is false. And we've told in the situation that the HO is 0.07. Okay. So what we're going to have, it is the probability that our correct answers are less than seven given P is equal to 0.7. In the tables, I mean, it's much easier to work it out like this, less than or equal to six given that P is equal to 0.7 because then you can reach straight from the tables because remember the tables deal with that. And if you have that, you need to subtract one. And then bam, you're getting that straight from the table value when N is equal to 10, P is equal to 0.7. And then what we have here for type II error when HO is equal to 0.8, we again, we're going to have the probability correct answers less than or equal to six given that P is equal to 0.8 straight from the tables 0.1209. Okay. So that's not too tricky. Maybe the hard part was adjusting that, but otherwise you're going, this is basically just testing to see, did you read through the material that dealt with type I and type II errors? So this is standard book work and I mean, gosh, they're giving you two marks for each. That's very generous. I would have only given one more for each, but anyway, coming to part three, which is maybe the more harder part, this is testing a more higher level of thinking. This is comment on the power of the test based on your answer in part two. Okay. And what we know is that the power is related to the type II error. It is equal to one minus the probability of our type II error. And what we're seeing is that the power is going to increase when the P increases. And we know that because look over here, the type II error is decreasing, which means the power is increasing when P increases. So in other words, you know, the power is higher, therefore, it is more likely to correctly reject the hypothesis of guessing when the individual is more skilled in identifying the preparation method correctly. So when it comes to this, the examiners will give you marks for, you know, any valid comment on the power you're going to get your, get your marks. I'm a bit again surprised that they are giving three marks for this when maybe it could have been a two-mark question, but you're, you basically just needed to make that comment and identify that you want a test to have a very large power because you can then minimize this type II error. You could probably even get a mark by saying we cannot minimize both simultaneously by saying when we increase the power, we are also going to be increasing the probability of type I. Anyway, that is the question on hypothesis testing. Let me know if you've got any questions or comments and I'll do my best to reply to them. Thanks guys so much for watching and I'll see you for the next video. Cheers.