النص الكامل للفيديو
All right, welcome to the wonderful world of probability. This is the first of many videos helping you understand probability. And first want to teach you probability through simulations. Okay. The definition of probability is that the probability of any of any outcome of chance process is between 0ero and one which describes the proportion of times the outcome would occur in very long series of repetitions. So let's break this definition down. First off, what is chance process? chance process is any event where you don't know the final outcome. Like flipping coin. don't know if it's going to be heads or tails or rolling dieice. don't know if it's going to be 1 2 3 4 5 or six. So when we talk about an individual outcome, we say it's probabilities between 0 and one. Zero meaning it will never occur and one meaning there's 100% chance it will occur. And this describes the proportion of times the outcome would occur in very long series of repetitions. So that's the key thing to keep in mind here is the probability is the proportion of times that an outcome will occur over the course of very long series of repetitions. So probability actually gets special name in this class called longun relative frequency. Relative meaning percent of outcomes. Frequency is your counts. So it's the percent of counts that happen in the long run. So keep that in mind. Let's look at two very simple examples to explain this. The first one is in yellow here and it says that if you have fair two-sided coin. Everybody knows that the probability of rolling head or excuse me flipping head is 1/2 or 50%. So there's our number between 0 and 1 50% or 1/2. Notice my notation here. I'm using for probability and then in parenthesis I'm talking about the probability of getting head. So, this does not mean that if flip coin 10 times, will get five heads. We all know that that might not necessarily be true. And the reason for that is that 10 is the short run. So, if you were to flip coin 10 times and get four out of 10 heads, that doesn't mean that there's 40% chance of heads. We have to understand that probability, true probability is what occurs in the long run after many, many trials. So, if were to flip 100 coins, 200, 300, 1,000 coins, then would start to see the truth of 50% being heads and 50% being tails. But it happens in the long run, not the short run. Same thing with fair six-sided die. The probability that you roll three, so notice again, notice my notation here, for probability, then you're going to roll three. The probability of rolling three is one out of six because one out of the six sides is three. That's about 16.67%. Now, does this mean if roll 12 times, will get exactly two threes? Absolutely not. Because that's the short run. 12 times is not the long run. That is the short run. So, when will you see the true probability of one six? If you would roll that die many, many times, I'm talking 1,000, 2,000, 10,000 times, you will start to see that threes come up one sixth of the time in the long run. And that's the idea of probability. Now, those are very basic probability examples. Let's look at some little trickier probability questions and how we can use simulation to estimate what might happen in the short run. All right, so soda company is running promotion where under the cap you could win free soda. The bottle says one in six wins. So imagine you take off the cap, you look under the cap, and you might win free soda. Okay, you and your friends want to know what's the probability that you buy 10 bottles and you will have three or more wins. So, you buy 10 bottles, you get three or more wins. To actually answer this question, we could run simulation. Now, simulation is essentially using numbers to pretend to do this. Instead of actually buying 10 bottles, which could get quite expensive, I'm going to pretend to do this. And that's what we're going to do here. Whoop. Sorry, went on too much. So, let's actually explain how we're going to run this simulation. Now, when you run simulation, there are four basic steps. The first step to running simulation is telling me what numbers you're going to use to simulate. So, will use 0 through 5. Now, that's six numbers. 0 1 2 3 4 5 and six. So, I'm going to write those out. 0 1 2 3 4 5. Okay, those are my six numbers. And need one six of them to represent win. So need one of them to represent win. So zero is winner and 1 through five is loser. Okay. So that represents my one out of six chance of winning and my five out of six chance of losing. Again, have to use numbers to represent this. I'm going to make sure ignore numbers 6 through 9. don't need those numbers. 6 7 8 9 those four numbers are useless to me. Okay. All right. So, the second step is really identifying where you're going to get these numbers from. So, will use random table of numbers. And each number 0 through 5 is or guess shouldn't say is represents bottle. And I've already established the fact that zero is winner, one through five is loser. So the third step is telling me when will trial end and what exactly will you record? So, will examine 10 numbers cuz remember we got to pretend to look at 10 bottles. So, if I'm using numbers to represent bottles, I'm going to look at 10 numbers and count how many are winners. And the fourth step is when will you end and how many total trials are you going to use? so will run five trials and again that's up to you. You could run as many. Remember true probability is after many many trials but I'm just asking you guys to get the idea here. So will run five trials and remember the ultimate question was want to know the probability of three or more winners. So I'm going run five trials and see how many contain three or more winners. Okay, and that is how could find the probability. So those are my four steps. Let's actually go ahead and do this now with some actual random numbers. And this way we can actually see how I'm going to actually use the procedure just outlined. Okay. So the first thing need to do remember is need 10 numbers. So trial one need 10 numbers. Well I'm ignoring 6 7 8 and 9. So as go through this here I'm going to ignore lot of numbers. So 7 9 69 ignore. So need two is going to work. Five will work. One will work. Seven is going to need to be ignored. Zero will work. 7 to 7 is ignored. Three will work. Two will work. Seven is ignored again. Four will work. One will work. Two will work. Let's see how many have so far. 1 2 3 4 5 6 7 8 9. need one more number. The next one, five will work. Okay, so now that got my 10 bottles or my 10 numbers, how many are winners? Well, remember the number zero was the only way that could win. So, have one winner. Now, remember that is an unsuccessful trial because needed to be successful. I'm looking for three or more. So, let's move on to the second trial. Now, you could start right where you left off going with the next numbers, or you could just drop down line. It really doesn't matter because the numbers are truly random. Let's just go to the next line. So, four is number. One works. Nine. I'm going to have to ignore. Five works. Seven. I'm going to ignore. Two works. One works. Six. will ignore. Zero works. Seven ignore. Five works. One works. Two works. Four works. Let's see how many numbers have so far. 1 2 3 4 5 6 7 8 9 10. All right, got 10 numbers. got my 10 bottles. And let's see here. Once again, have one win. Well, remember I'm looking for three or more wins. So, that is fail. Next trial. So, I'm just going to go down the next line here. Zero works. Seven ignore. Zero works. nine ignore, four works. Three works. One works. Seven ignore. Five works. Zero works. six ignore, nine ignore, four works, two works. let's see here. 1 2 3 4 5 6 7 8 9 and six ignore. Six ignore. There's another two here. Okay. And here do have one two three winners. So that's three winners. And that is successful trial, right? Because was looking for three or more wins. One question get here is do have to skip repeats? Well, no, because every bottle is completely independent of the next. So what happens on one bottle is not going to affect the next bottle in ter you know that's what should happen at least. So don't have to ignore repeats in this scenario here. I'm not picking people that are can't be picked again. All right, let's do another trial. Trial four. Let's move on just the next line here. So five works. Ignore nine. Three works. Ignore six. Five works. Four works. Three works. Six excuse me, six does not work. okay, let's see here. Where did leave off here? Six. Seven. Ignore. One works. One works. Two works. Seven ignore. zero works. Let me count here. 1 2 3 4 5 6 7 8 9 and that next four works. Okay. Well, there was only one win there. So, that is an unsuccessful trial. And we're going to do one more trial here. That last line there. Nine ignore, one works, five works, four works, seven ignore, zero works, three works, nine ignore, two works, seven ignore, nine ignore, two works, three works, zero works, nine ignore. Let's see what got so far. 1 2 3 4 5 6 7 8 9 and the next number there is two. that works. Let me see here. no. Wait minute. Maybe that next number was zero. So 1 5 4 0 3 2 3 0. yeah. The ne next number is one. Okay, whatever. It doesn't matter. Regardless, Well, it doesn't matter. Regardless, end up with so end up with two wins in that trial and that is again an unsuccessful trial. So after ran five trials, had one successful trial out of five. One out of five is 20%. Okay, that means that again there's 20% chance of getting three or more wins. Now here's the idea of why this might not be 100% true. Because this is only the short run. only ran five trials. probability doesn't truly reveal itself until you you run many many simulations, many many many trials. So, as it stands right now, would estimate that there's 20% chance that you could get three or more wins out of 10 bottles. But the truth will not reveal itself until after many, many trials. So, would need to run five, 10, 10, 20, 100 trials to really see the truth. Let's look at another problem here as well to try to make sure we understand how to run simulation. So suppose basketball player is 63% shooter. What is the probability that he gets on hot streak and makes seven or more shots in row. All right. So once again here in order for me to do this have to first start out with step number one. What numbers will will use? Well will use numbers 000 through 99. And that is all double- digit numbers. So don't have to worry about ignoring any other double- digit numbers. I'm going to actually use all of them. And need 63% of them. Or could use 0 0 through 62 to represent make. That is 63 numbers because 0 0 through 62 would be 63. Remember 1 through 62 is 62 if I'm using 0 0 there. And then I'm going to use 63 to 99 to represent miss. don't have to worry about repeats and don't have to worry about ignoring numbers because I'm using them all. Okay. Step number two here, remember, is telling me that you're going to use random. Where are you going to get your table? mean, where are you going to get your numbers from? So will use random number table and look for makes and misses. Okay, so every number is going to basically represent shot whether make it or miss it. Now when will trial end? In this case, I'm going to end when streak is over. trial will end with miss. So the moment miss shot, the trials end. And will record how many in row were made. Okay. The fourth thing is telling you how many trials I'm going to run. So once again, will run five trials, which isn't going to give me very clear picture because it's not the long run, but you get the you'll get general idea. will run five trials and see how many have seven or more in row. Okay, so let's actually go ahead and look at some numbers and try this out real quick. All right. So, here's random table of numbers. The good news is don't have to ignore any numbers. Saves me some time and don't have to worry about repeats either. So, trial one. Okay. 87. That's miss. So, right away missed and am done. That was streak of zero shots. Okay. Let's move on to trial two. could just go the next line. 20. That's make. 11. That's make. 0. That's make. 11. That's make. 70. That's miss. So, made four shots in row. So, that was my streak there. By the way, successful trial is one with three or more I'm sorry, seven or more makes. So, so far I've had two unsuccessful trials. Just go down the next row. So, let's see here. 86 that is miss. So, right away have streak of zero. Trial four. Just go down that next line there. 79 that is miss. So once again that is streak of zero. Trial five. Okay let's see here. Trial five 35 that is make 65. that was miss. That was streak of one. So after five trials never once had streak of seven or more shots. So that is probability of zero out of five or there's 0% chance of making seven or more shots in row. So, as of right now, if somebody told me, "I'm coach. made seven shots throw." I'd be like, don't know if that's true or not." mean, there's really 0% chance it happens. Now, this is not the final absolute true answer because it was only the short run. only ran five trials. You have to understand that to truly see probability come out, you need to do the long run, many, many trials. And this is why need to introduce you to the law of large numbers. Okay? The law of large numbers tells us that the proportion of times that particular outcome will occur will approach single number after many many repetitions. Meaning that if ran five trials of that previous simulation and so did six other people, we might all get not get zero like got 0% but somebody else maybe it happened once and maybe somebody else actually happened twice. The idea is that we'll never know the true final single answer until we run many many many trials. So wrote in green here that the true probability of an event can be seen only after many many many trials not just couple. So this is called the law of large numbers. It's really important law in the world of statistics and it tells us that if we want to know the true probability we better look at many many trials which is why the probability gets this term the law or I'm sorry the long run relative frequency because it's what happens in the long run. Now the last thing want to leave you with is the four steps to running good simulation. So go ahead and pause the video and write these steps down. Step one is tell me what specific numbers you will use and what each number represents in your problem. Step number two is tell me that you're going to use random number table or you could use random number generator and what you're going to examine. Tell me what the numbers represent. The numbers represent bottles to represent the numbers represent basketball shots. Step number three is when will trial end and exactly what will you measure at the end of each trial? You got to be very specific with that. And number four is tell me how many trials you will run. That is completely up to you. And how you will find the final probability. meaning you're looking for how many successes, you know, don't forget to tell me what counts as successful trial because you're looking for those successful trials. All right. Now, am going to stop now. You could shut off the video if you want. Okay? do have second video with couple more examples of simulations. You do not have to watch them, but if you're little bit nervous about these simulations and you want to be able to run them correctly, go through these steps with another two examples. That way, simulations truly make sense to you. All right. Thanks lot.