Welcome to module one. In this module, we're going to learn about the difference between a population and a sample and why probability is the foundation for statistics and data science. In future videos we'll learn what it means to predict the outcomes of an experiment, and we'll also learn about organizing outcomes of experiments into sample spaces using the axioms of probability. Let's begin with just talking about what is statistics. So, statistics in a nutshell is the science of using data effectively to gain new knowledge. So, we want to learn something new and we're going to use data to do it and we need to collect and analyze the data ethically and by ethically I don't mean good and bad. I mean by following the hypothesis of the various tests that we're going to learn in future modules. So let's start with a population. What is a population? This is the individuals or objects from which we want to acquire information or draw a conclusion, most of the time our population is so large, or even it's hypothetical. So we can only collect data on some subset of the population were going to call this our sample, in probability we assume we know the characteristics of the entire population. Then we can pause and answer questions about the nature of a sample, statistics on the other hand is the opposite. If we have a sample with particular characteristics, we want to be able to say with some degree of confidence whether the whole population has that characteristic or not. So, we start by learning probability and figuring out what we can say about individual samples and then we go to the samples in statistics and what can we say about the whole population. We'll begin with an example of what we mean by sample spaces and events. So probability studies randomness and uncertainty by giving these concepts a mathematical foundation. For example, we want to understand how to find the probability of getting at least two heads in five coin flips or we want the probability that customer will buy milk if they're also buying bread or more complicated we want to know the price of a stock. Will it be in a certain range on a certain date in the future? How do we assign a probability? How do we assign a value to our belief that something like that will happen? Probability gives us the framework to study uncertainty in all of these manifestations. Some terminology, we're going to call an experiment any action or process that generates observations. The sample space of an experiment we're going to denote by S and that's going to be the set of all possible outcomes of the experiment. An event is going to be either a single possible outcome or a collection of outcomes from the experiment and finally the cardinality of a sample space or an event is the number of outcomes it contains. And we're going to denote that with absolute values around this S. Let's look at a couple of examples, for our first experiment we're going to flip a coin once. What's our sample space? Well, we could write our sample space as H,T. Two possible outcomes from flipping that coin once but that's going to be too unwieldy to use H'sand T's all the time. So, what we're going to do instead is we're going to indicate that with a zero and a one, so a zero is going to be ahead and a one will be a tail. The cardinality of our sample space is two, for our second experiment we're going to flip that coin twice. So, our sample space would be two heads, ahead in the tail or a tail and a head or two tails, cardinality is four let's do a little bit more complicated of an experiment. Suppose we flip a coin until you get a tail. What's our sample space there? Well, we could get a tail on our first flip, we could get ahead and then a tail, two heads and then a tail, three heads and then a tail. And here's the question. When do we stop? Well, our chances of having a million coin flips all resulting in a head and then finally we get a tail, the probability of that is vanishingly small but it is non zero. So we do have to allow it in our sample space. So I will indicate that with these three little dots, so we keep on going forever and ever the cardinality is infinity. For our 4th experiment, suppose we select a car coming off an assembly line and we inspect it for three different defects. Suppose we're looking for an engine problem, a seatbelt problem or a bad paint job. How are we going to indicate our sample space there? Well, we'll do 000, so none of the three defects are present. 100, so the engine problem is there but neither of the other two, 010 a seatbelt problem, 001 a bad paint job. Then we could have two defects like that, so in this element we'd have an engine problem, a seatbelt problem but it's a good paint job. And then finally, our last one would be all three present, our cardinality in this case is eight. Now, what we're going to want to do is have combinations of different events from our sample space. So, to make that easier to understand, we're going to look at set notation. So if I have two events, A and B, I'm going to indicate A union B as the new event where I have an outcome in A or an outcome of B occurring, I'm going to put all those outcomes together and that's my new event A union B. A intersect B is going to be all the outcomes from my experiment that are in A and in B. A complement means the set of all events in S that are not in A. And I'm going to say A and B are mutually exclusive or disjoint if they have no events in common and we're going to write a intersect B is equal to the empty set. Let's go back to our car example, we've already discussed the sample space. Now I want to talk about three separate events. A is going to be the event that there is an engine problem, so defect one is present. In set notation, I would write 100, 110, 101 and 111. These are all the elements from S, that have a 1 in the first spot, that 1 in the first spot indicates an engine problem. B is going to be in the event that there is exactly one defect, I don't specify which defect, just that there's only one. So, those events from S would be 100, 010 and 001, C will then be the event that there are exactly two defects present and would be indicated that way. So, now let's look at some new events that we can generate from A, B, and C. A intersect B would be all the events that are in A and in B, in this case there's only one and it would be 100. What about a complement? A complement would be all the events that are in the sample space S that are not in set A. In this case it would be 000, 010, 001 and 011. What about a complement union B? A complement union B would be all the events in a compliment. And then I add to that the events that are in B. Now you only repeat events once and so in this case the extra event that I would add in would be 100. And finally, I want to ask what would be in B and C? So what would B intersect C? And you can see that there are no events in there and so this would be the empty set. Finally, I want to talk about Venn diagrams. Venn diagrams are really only there to help us visualize the unions, intersections, compliments that we're interested in. So for example, I think of the rectangle here as my whole sample space. If I want to think of this circle as event A, then even A has the individual events 100, 110, 101 and 111. And then everything else in S is 000, 010, 011 and 001. All right, now suppose I want to think of another Venn diagram where I put A, B and C, so I have all three events indicated in my Venn diagram. And I want to ask, what events are in all the intersections? So for example, we already know that A intersect B contains the event, the simple event 100. There is nothing in this region, in B intersect C that's the empty set, so I don't put anything there. What about A intersects C? That's going to be the events 110 and 101. What's in C? 011 and that's not in either A or B. What's in B? 010 and 001. And, what's in A? 111, and then what's left over in all of S. And that would be the event 000 and so as you can see every event in S is written one place and only in one place. And it helps us understand what the intersections and unions of any combination of the A B and C is. And hopefully this will help us as we go on to more challenging problems in the next video. See you next time.