 Hi, this is Dr. Dine. I want to spend a few minutes and show you how to solve a problem using Bayes Theorem using StatCrunch. Now if you first look at StatCrunch, you won't find a primary tool that will solve Bayes Theorem. But there is an applet that is in effect a Bayes Theorem calculator that will work and may help you on problems like this. In this particular problem, we'll give you some information here, a virus infects one in every 250 people. We test for the virus. It's positive 90% of the time when the person has the virus and 15% of the time when the person does not have the virus. This is called a ladder that falls positive. And it tells us let A be the person is infected and B, the person tests positive. Now they give us, in this case, we can click on this icon and open up Bayes Theorem. And what that does is it shows you this formula that you can use to solve for Bayes Theorem. And I have another video showing you how to do this using Excel. But it takes a lot longer than the StatCrunch calculator. Now this format there, this is probability of event A, the horizontal bar tells us given that event B has happened. And then up in the numerator is the probability of A times the probability that B has happened given event A and so forth. I'm not going to go through the whole thing. There's a simpler version of Bayes theory that I use a lot and it will work for this problem as well. And it is just that the probability of A given B, same numerator, but we can simplify this complex denominator down to just the probability of B. Which one you use depends on the information you're given. So one of the things I like to do when I'm starting a Bayes theory problem, first of all, is to put down what I know. And in this case, in this little table there, in blue, is what they give us. The probability of being infected is one person out of 250, which is .004. And by the complementary rule, the complement of that probability of not infected is just one minus that, .966. And we use the format there. A is for the event, the complement of event A is A prime. Going on down, the probability that the test is positive given that the person is infected is .9. We get that right here. The test detect the virus is positive 90% of the time when the person has the virus and 15% when not having the virus. And that's where I get this. So with this information, we need to come up and answer the question, what is the probability of being infected when the test is positive? Probability of A given event B has happened. The probability of not being infected when the test is negative, probability of A prime given B prime. So let's get into stat crunch. So I've got stat crunch open. And again, if you go over here normally where we have calculators, you can't find a Bayes, there's no graph for a Bayes, and data, of course, you could use compute to do all those expressions like I find would be easier to do in Excel. But if you go to athletes, the first one is Bayes rule. And it's really simple to use. What I find is that it helps if you put the information in there so it matches your question. A is infected, comma, A prime is the outcome of interest is test positive. And with that, we can click compute. And we get a table that we need to fill out on the top. The probability of being infected we calculated is 0.004. The complement of that is 1 minus 0.996. The probability the test is positive given the event infected, and that's this one, 0.004. The probability that the test is positive given the person is not infected is this one, 0.1504. And now we've got an illustration here, kind of like a Venn diagram with shorts. This shows that the probability of not infected in the test is not positive is 0.85. The probability of not infected in test positive is 0.15. Now we need to get the probability infected test as positive. All I do there is probability infected test as positive is 0.0235. And by golly, that's our answer when you round that 0.024. So that's the first answer. The next answer we need is probability not infected test as negative. So that's going to be probability not infected. Test is not positive or negative, and that gives us 0.9995, and that's the answer they want there. So this is a very helpful rule. Calculator, you can get all the various options there. Test is not positive. Test is infected and positive, infected not, or negative test and so forth. So be aware of this calculator. I think it can really be helpful. And overall, I hope this video helps.