 This is a video about doing a hypothesis test about the probability of success in a binomial distribution. I'm going to look at two examples. My first example is to do with a multiple choice test. Suppose that we have a multiple choice test with 20 questions, and each question has four possible answers. Let's imagine that a student scores 9 out of 20 on this test. Is it possible that the student was just guessing? Or can we be confident that the student has a higher chance of getting a question right than simply picking an answer at random? Okay, well the first thing is that the number of correct answers will have a binomial distribution with parameters 20 and P. 20 because that's the number of trials, the number of questions, and P being the probability of success, the probability of getting a question right. And we set up a null hypothesis, which says that P is a quarter, because a quarter is the probability of picking the right answer if the student simply guesses at random. It's one in four. The alternative hypothesis in this case would that P is greater than 0.25 because if the student can do better than just by guessing, then the probability of getting a question right must be more than a quarter. Okay, and then what we have to find out is the probability of the student getting 9 or more answers right, because we ask ourselves what's the probability of getting an outcome like 9, where by like 9 we mean 9 or more. So you find the probability that the student gets 9 or more questions right, assuming that the null hypothesis is true. Okay, so obviously we do that by doing one take away the probability that x is less than or equal to 8, because we can only look up that sort of probability in the tables. And if you go and have a look, if we find the table where n equals 20, and the column headed up by P equals 0.25, and we scan along from where x is equal to 8, we find the probability 0.9591. So the probability in this case is one take away 0.9591, which is 0.0409. Okay, now to draw a conclusion, we need a significance level. And let's assume that we're going for 5% as our significance level. We often have 5% as the significance level in our hypothesis test. You'll realise straight away that 0.0409 is less than 5%. So what that means is that we can reject the null hypothesis and say that there's enough evidence to conclude that the student can do better than simply guessing. Okay, there's a few features of this test that I want to draw your attention to. First of all, this is a one-tailed test because the alternative hypothesis says that the probability is greater than 0.25. So there's only one way that we can end up rejecting the null hypothesis, and that's if the student gets a large number of questions right. The second thing is that the whole test works by assuming that the null hypothesis is true. So when we're calculating the probability of getting nine or more correct answers, we're assuming that the null hypothesis is right, and therefore that the number of correct answers has the binomial distribution with parameters 20 and 0.25. And finally, when we draw a conclusion at the end, we're going to express that in the context of the original problem. So instead of simply saying, well, we can be sure that the null hypothesis is wrong, we say there's enough evidence to conclude that the student can do better than just by guessing. Okay, before we move on to the other example, I want to point out that there's another way of answering this question, and that's by using a critical region. So going back to this stage, when we've set up the two hypothesis, the null hypothesis and the alternative hypothesis, we can go straight away and look at the tables and find the critical region. So what we do is we scan our way up the column with 0.25 at the top until we get to the probability that's just a little bit bigger than 0.95, because that's the final case in which we'll end up rejecting the null hypothesis. So what we'll see there is that the probability of getting eight or fewer correct answers is 0.9591, and so 1 minus 0.9591, which is a little bit less than 0.05, is the probability that x is greater than or equal to 9. So that shows that the critical region is the numbers 9, 10, and higher. Remember, it's very important that we come along the line that's one below 0.9591, and that's because although 0.9591 tells us the probability of getting less than or equal to 8, we want 1 minus that, and that's the probability that x is greater than or equal to 9. So you can see from the tables that in this case the critical region is the numbers greater than or equal to 9. And as soon as we know that we can say, well, 9 is in the critical region, and that means that we have to reject the null hypothesis and therefore say that there's enough evidence to conclude that the student can do better than just by guessing. Okay, here's another example, and this is going to be to do with the way people travel to work. Here's a map produced by the Office for National Statistics based on census data from 2001 and 2011, and it shows the proportion of people in each area of the country that travel to work by train. You can see from this picture that there's been a small increase in the proportion of people travelling to work by train, especially in the southeast. At the same time, here's the equivalent map which shows the proportion of people travelling to work by car, and perhaps you can see here that whilst the proportion of people travelling to work by car has decreased in some parts of the country. There's some parts of the southeast, for example, where the proportion has decreased, presumably because they're travelling to work by train instead. On the other hand, there are other parts of the country where the proportion of people travelling to work by car has gone up. For example, you can see that there are parts of Wales where the proportion has gone up. Okay, well, in Oxford, 35% of journeys to work are made by car. Actually, it's not exactly 35%, but unless I pick a percentage that's a multiple of five, it becomes very fiddly to answer the question because we won't be able to use the probability tables to help us. So let's pretend that the proportion of journeys made to work by car is exactly 35%. And now, a company surveys 40 of its employees, and it wants to do a test to find out at the 5% level of significance whether the proportion of employees who drive is different from other companies in the region. And we want to find a critical region where the size of each tail is as close as possible to 2.5%. The question is, what's the critical region and what's the actual significance level of this test? Okay, well, as before, we've got a binomially distributed random variable. The number of employees driving to work by car has a binomial distribution where 40 is the number of trials because there are 40 employees and P is the probability of success. The null hypothesis will be that P is 0.35, the same proportion as Oxford as a whole. And the alternative hypothesis will be that P is not equal to 0.35. And obviously, what we've got here is a two-tailed test. It made that clear in the question, but it's a two-tailed test because it says that P is not equal to 0.35. And so the null hypothesis can be rejected either because the number driving to work is very small or because it's very large. Okay, well, we can work out the critical region straight away by looking at the tables. Let's have a look. We've got the table where n equals 40 and we're looking at the column where P equals 0.35. To find the lower tail for small numbers, we look down the column headed by 0.35 and stop when we get to the number that's as close as we can get to 0.025. Now, there's something very important to notice here. Normally when you do a hypothesis test, you scan down that row stopping just short of 0.025 because you want the probability that's as close to 0.025 but doesn't go over it. Here, though, it said specifically in the question that we wanted the probability that was as close as we could get to 0.025 even if that probability was actually greater than 0.025. So in this case, I've scanned down until we've got to 0.0303. And although that's bigger than 0.025, it's closer to 0.025 than any other possibility. Okay, well, 0.0303 is the probability of getting eight or fewer driving by car and so that part of the critical region consists of the numbers 0 up to eight where eight is the critical value. Okay, so that's the lower tail. For the upper tail, we scan up the column until we get to the number that's as close as we can get to 0.975 and the number that's as close as we can get is 0.9827. Now, 0.9827 is the probability of getting 20 or less and 1 minus that is the probability of getting 21 or more. So the upper part of the critical region is the numbers that are 21 or greater. So the critical region for this test is the numbers between 0 and 8, including 0 and 8 and the numbers between 21 and 40, including 21 and 40. 0, of course, is the minimum possible number of drivers and 40 is the maximum possible number of drivers. And the significance level is what we get by adding together those two probabilities that we saw before. So 0.0303 plus whatever you get by subtracting 0.9827 from 1 and that's 0.0476 or 4.76%. Okay, now we've worked out the critical region. It makes sense if the question asks us to actually draw a conclusion. So suppose that nine employees at the company drive to work. What conclusion can we draw? Well, nine isn't in the critical region. So that means that there's not enough evidence to show that proportion of employees who drive is different from other companies in Oxford. And there's something very important here. We're not going to conclude that there is evidence to show that the proportion of employees who drive is the same as everyone else or at least is the same as Oxford in general. We can't conclude that P is 0.35. That's not how hypothesis tests work. Hypothesis tests always work either by rejecting the null hypothesis or saying that there's not enough evidence to reject the null hypothesis. So what we should conclude here is that there's not enough evidence to show that the proportion of employees who drive is different from other companies in the region. It may be or it may not be, but we don't have enough evidence to make a conclusion. OK, that's the end of this video about hypothesis testing about the probability of success in a binomial distribution. I hope you found it helpful. Thank you very much for watching.