 Hello. Today we're going to be talking about probability. So we often need to guess the outcome of some event to make a decision about what we want to do. So, for example, how likely is it that this car that's coming at me is going to hit me? Should I move or not? We don't know for certain if the car is going to hit us, but we do need to make some decision that affects our actions. So we can use probability for that, and humans kind of do probability in their head all of the time just in a very informal way. Probability is actually the study of how likely something is to happen, so we can actually measure it and make potentially, hopefully make better decisions based on that measurement. So probability deals with the chance of some event occurring, and knowing the probability of some event occurring or knowing when an event is likely to occur or less likely to occur is very beneficial in basically everything we do. So for example, knowing the chance that a stock price is going to increase or decrease would help us make a decision whether we should buy or sell stocks, which of course directly has direct relation to our finances, things like that. Knowing whether housing prices are going to go up or down directly affects whether we should buy a house or whether we should get a long-term loan or something like that. And these things are essentially unknown. We have to make guesses about, in this case, the future, the future of prices of stocks or houses or whatever. But also, we use probability or the probability models that we have in our heads to make guesses and decisions about every decision that we make basically. So probability is a very powerful tool that we can use in almost every aspect of our lives really, and we'll talk about it more now. So before we get really into probability, we'll give some definitions. So first off, whenever we are looking at measuring probability, we are in this course at least using it to measure the outcomes of experiments. And an experiment is a planned operation carried out under controlled conditions. So planned operation, we know essentially what we want to test. We know all of the variables around what we want to test, and it's carried out under controlled conditions. So we control all of the variables surrounding our experiment. Now there's lots of different types of experiments, but especially if we're trying to estimate probability or find a probability of some event occurring, we have to be able to control the conditions to make sure that we are actually testing the variables that we're interested in. And we'll talk more about experimentation later. Next is chance. So chance is the result when we use the word chance whenever the result is not predetermined. So whenever the result is unknown, we're not exactly sure what's going to happen. So for example, tomorrow I expect that I will get a coffee, but there is a chance that I will not get coffee, right? So the future in this case is not predetermined. Maybe all of the coffee shops close and the coffee I have in my office goes bad or something like that. In that case, there is a chance that I do not get coffee, even though the probability is high that I would get coffee. But it's not for certain that I can get that coffee, right? So chance is when the result is not predetermined. Chance is really most things in life. Nothing in life is really predetermined, right? Something can always happen. Even the things that we think are definitely going to happen sometimes don't. And that's because there is so much randomness essentially in the world that everything is left up to chance. Now we can calculate the probabilities to find out how much chance there is and how certain we are that something will happen. But that doesn't mean that it always happens. So chance is when the result is not predetermined. An outcome, an outcome especially relating to an experiment, is the result of an experiment. So imagine that we had a coin. We flip the coin and it will either be, in English we call it heads or tails. I'm not sure what you call it in Korean. So it's either heads or tails and the result or the outcome of our experiment would be actually observing whenever we flip the coin, whether it was heads or tails. What is the outcome? Is it a heads or is it a tails? So the outcome is the result of the experiment. In this case, our experiment is flipping the coin. We observe the outcome whether it is heads or tails or not. The sample space is the set of all possible outcomes. So in the case of the coin example, the possible outcomes that I have whenever I flip a coin are heads or tails. I don't really have any other options. It could potentially land on its side and stand up, but that's essentially impossible, let's say. So we really only have two options. So the sample space for a coin is heads or tails. Those are the two possible outcomes in this case. And an event is any combination of outcomes. So if I have, for example, multiple coin flips or let's say that I had two dice, so I have two dice. Dice have six sides with numbers on them. If I have two dice and I roll them both, then I can have combinations of outcomes. So each die can give me a number and I can basically combine the numbers to get a set of outcomes. The event whenever we're talking about flipping one coin, we only have really two options. So the set is basically heads or tails. If we had two coins that we flipped at the same time, then we could have, for example, heads, heads, tails, tails, tails, tails, tails, tails, right? So we have multiple outcomes. So think about the event, the sample space is a set of all possible outcomes that we can get and the event is any combination of outcomes that we can get. And we'll talk more about that shortly. So coming back to probability, now that we have those definitions. Probability is a, we can define it as a long-term relative frequency of the outcome. Long-term relative frequency of the outcome. The probability itself can happen over a very many times. So in our case where we have two possible outcomes of the coin, either heads or tails, the probability of heads should be, the theoretical probability is 50%, or 0.5 would be the probability. The probability for tails would be 0.5, right? Equal chance because there's a 50-50 chance that you would get that outcome. Now, if we flip a coin for 100 times, we will not see, we will not measure 50-50 probability. So what we observe would be actually, heads may have happened a little bit more than tails. Tails may have happened a little bit more than heads, something like that. And as we have more flips, we get closer to the theoretical probability that we can actually calculate, right? So the long-term relative frequency, we're talking about over many times the action happens, we get closer to the theoretical probability. We should get closer to the theoretical probability. And again, we'll talk more about that as well. So probability is between 0. So if there's a probability of 0, then this means basically impossible and 1. And 1 is definite, some action will definitely happen. And what you'll notice in the real world, we don't have 0 and 1. Probability of real actions or probabilities of real actions being impossible or being definite are basically 0, can never be 0 and 1. They will always have some slight, perhaps slight, probability that they will happen or maybe a great probability that they will happen, but you will never be definite or impossible. One of our doing calculations though, we can use probabilities 0 and 1 because it's theoretical. If we're measuring, you will very rarely see 0 or 1, depending on what actions you're talking about. And here, whenever we write probabilities, so I have a, in this case, P bracket A and we read this as probability of A. So in this case, the probability of A equals 0 or the probability of A equals 1. That means that in the first case, the probability of A is 0 or it's impossible. The probability of A equals 1 means that it is definite. It will definitely happen in the future. And the law of large numbers, whenever we're dealing with probabilities, and I've already hit on this a little bit, when we're talking about probabilities, we want as many data points as possible. So for example, flipping a coin, if we get 100 flips, we will not have 50-50 chance observed. Either heads will have come up more or tails will have come up more. They won't be exactly even at 100 flips. But if we have 1,000 flips or 10,000 flips or 20,000 flips or 100,000 flips, then we will get closer and closer to the real relative frequency of the outcome. So the law of large numbers states that as the number of repetitions of an experiment are increased, the number of times that we do an action increases, the relative frequency obtained comes closer to the theoretical probability. Comes closer to the theoretical probability. We may never actually reach the theoretical probability, but we will get very close if we have more data points. So the whole point or the lesson from the law of large numbers is that we need a lot of data if we want to be relatively certain about our probability estimates for some action happening. If you just have 1 or 2 observations, that's nowhere near enough to be confident in the probability estimates that you're making. If we have a lot of data points, and a lot really depends on what the action is. Some things don't happen very often, but basically we need lots of data points to be able to say something about the probabilities that we're estimating. Whenever we're talking about probabilities, we have a couple events. So one is called the OR event, and in this case we have event A or event B. And this goes back to sets, sets, S-E-T-S. So we have A or B equals the outcome is in A or it is in B or both. So in this case, the outcome is in A or it is in B or it is in both A and B. Right, so in this case, if it's an OR, then we have two groups of things, let's say. So one group is A, one group is B, and let's say we want to find, I don't know, the lollipop. If the lollipop is in group A or the lollipop is in group B, like either one, then it's an OR event. If it's in both, that's also an OR event. We have an AND event, if for example A and B, in this case the outcome is in A and in B at the same time. So in this case, we have to have a lollipop in both A and B, otherwise the AND event is not true. If it's an OR event, then it can be in only A or only B or both, right? So ORs and ANDs, we're basically looking at sets and we'll talk more about sets a little bit later. But basically just for now, I hope you understand what OR or AND is and must be in both at the same time. Okay, next, conditional probability. Conditional probability is the probability of an event given another event. So for example, the probability of A given B and we write it as P bracket and then A and we call this a bar B. So in this case, the way you can think about this is the probability of an event given another event. So what is the probability that I'm going to get in a car crash if I get in a car, right? So A is the probability of a car crash, B is the probability that I get in a car, right? So maybe I have several options. I could take a car or I could take a train or I could take a bus or I could take several different options. And what is the probability that I get into a wreck if I get into specifically a car in this case? So what we can do then is calculate. Is it more likely that I get into a wreck if the action is getting into a car or is it more likely I get into a wreck if I get into a bus or if I get into a train? And then I could potentially calculate based on my action, based on one action, what's the probability of another action in this case? And we call this conditional probability. And conditional probability is very powerful if we can do it correctly. So we'll look at that a bit more. Independent events, if one event occurring does not affect the chance of another occurring. If one event occurring does not affect the chance of another occurring, we say that it is an independent event. So for example, the properties of an independent event is the probability of A given B equals the probability of A. In that case, the probability of B is not affecting the probability of A here. So we can say that A is not affected by B. Conversely, the probability of B given A equals the probability of B. So B is also not affected by A. So they're not conditional in this case. And then the final property, the probability of A and B equals the probability of B times the probability of A times the probability of B. So if these features hold, then we can say that the events are independent. They do not affect each other. And this happens a lot. So for example, we might say, if I eat an ice cream on Sunday, what is the chance that paper is going to fall out of the sky? So those two things, I hope, I hope don't have any relation to each other. So those two events are completely independent. My eating ice cream does not affect random paper falling out of the sky. I think, most likely, and we can test that to see if it actually does potentially affect this. So if they do not have an effect on each other, then we call them independent events. So if the above do not hold, the events are dependent. So in this case, we have independent events and that is A does not affect B and B does not affect A. So basically two events that really don't have any effect on each other. And if they do have some sort of effect on each other, then we call them dependent events, where they do actually have some sort of relationship. Next, whenever we're talking about probability and we're trying to determine probability of certain events happening, we have a couple of different ways to do sampling and we will talk about sampling a little bit more. But we have, first off, sampling with replacement and whenever we're talking about sampling with replacement, we're actually trying to control the probability of each member being selected. So whenever we have sampling with replacement, we have a sample set, a group of things that we want to pick something from, sampling with replacement, if each member of a population is replaced when it is picked. So I have, let's say, 100 bars of ice cream, different types of ice cream, and I want to sample these 100 types of ice cream and I want to randomly pick from one of these 100 for several times. If each member of the population is replaced when it's picked. So I take one ice cream, I write down what the brand of the ice cream is, and then because I'm sampling with replacement, then I put the ice cream back into the stack of 100 ice creams and I have the potential to choose it again. Now think about what this does to our probability distribution. So we have 100 ice creams and I take one out. If I don't replace it, then the next time I try to choose something, the probability that I pick something is 1 out of 99. Whereas the first time I tried to pick something, the probability of picking one of the ice creams was 1 out of 100. So I actually have a better chance of picking certain types of ice cream if I do not use replacement. So whenever we have sampling with replacement, we're ensuring that the probability to select a certain item is always the same. So every time we pick, we have the same probability to pick that particular object. This does not change the probability of any other members being picked. So the goal is to keep the probability of selection exactly the same. And we'll talk about why that's important a bit later. So sampling without replacement, if each member of a population is not replaced when it's picked, then this does change the probability of other members being picked. Because obviously you have less things to choose from, so the probability that you pick any one of them is going to be higher. Next, mutually exclusive events are events that can occur at the same time. Sorry, events that cannot occur at the same time. So we have mutually exclusive events that cannot occur at the same time. So in this case, we have the probability of A and B equals 0. So if we were talking about sets again, something being in A and being in B at the same time is essentially impossible. So what is a mutually exclusive event? What's an example of it? For example, going back to my coffee example, I cannot have coffee and not have coffee at the same time. I either have no coffee or I have some coffee. But I can't have coffee and not have coffee. Or coffee cannot be in a cup and not be in a cup at the same time. So there's two events, two things, two states of being that are mutually exclusive. I cannot have something and not something at the same time. So these could be mutually exclusive events and the probability of them essentially is 0. Right, depending on what you're measuring. So there's two basic rules of probability that are quite useful in many situations. First off is the multiplication rule. And the multiplication rule is if the probability of A given B equals the probability of A and B divided by the probability of B. So in this case, we can just read it as probability of A given B equals probability of A and B divided by the probability of B. This is a useful property for calculating A if we know the probability of A, if we know the probability of B and it's a relatively simple and straightforward equation for calculating probability of A given probability of B. Next, the addition rule. If A and B are mutually exclusive, then P, A and B equals 0. So if obviously two things are mutually exclusive, then their probability must be 0. Based on that property, we can say that if the probability of A or the probability of B, let me rephrase it, the probability of A or the probability of B equals the probability of A plus B. Because now we're talking about A or B, not A and B. Not two things, something in both sets. We're talking about the probability of one thing being in A or one thing being in B, but not in both, basically. So we can get the addition rule based on that. And we can calculate the probabilities of either the overall probability or the probability of both, basically. What that lets us do is if we know the probability of one, we can essentially find the other using basic value. So that is it for probability for now. Make sure you read the chapter. There are a few more examples in there, especially how to calculate things. The assignment for this week is calculating some probabilities, determining how we would calculate probabilities of certain problems.