[SOUND] In statistics, you often hear the term random variable. Random variable really just represent the answer to the question you're asking. For example, how much will my stock value change in a year? This value, which is the answer, is a random variable. In statistics we use x to represent the random variable. Now, why is it random? Because the process is random. We don't fully understand why stock prices go up or down by the amounts that they do. Thus, the answer to question posed is random? There are two types of random variables. A discrete random variable is one which make take only a finite number of distinct values. For example, number of children in a family, number of people taking this course, number of customers who rated the service as satisfactory. The second type of random variable is a continuous random variable, which is a variable that takes on an infinite number of possible values. Continuous random variable is not defined at specific value. Instead, it's defined over an interval of values. For example, weight of a soda can. In reality, if you weighted each soda can and recorded its true value, you will always get varying numbers. However, you may expect that the actual weight of a can to be between 11.5 ounces to 12.5 ounces. Life of a light bulb is another example. If we record exact timing we get, many possible values would come out. But one might say that the life of a properly functioning light bulb is between 100 to 1,000 hours. What separates continuous random variables from discrete ones is that they are unaccountably infinite. They have too many possibilities to lift or to count, and they can be measured with a high level of precision. Now let's practice. Identify the following random variables as discrete or continuous. Daily return on a stock. Number of customers waiting in line. Time spent waiting to talk to a customer service agent. Number of calories in a chocolate bar. Daily return on a stock is a continuous variable. Number of customers waiting in line is a discrete variable. Time spent waiting to talk to a customer service agent is a continuous variable. Number of calories in a chocolate bar is a continuous variable, which may get recorded as discrete. And that's something that often occurs because we may not be interested in absolute accuracy and thus, round the numbers. For a discrete random variable, the probability distribution will be a list of probabilities associated with its possible values. We actually did this when we learned about histograms and relative frequencies. What we were displaying was the probability distribution. For example, let's assume we ask 20 people how many siblings they have. So here the random variable is number of siblings. This is what we recorded. The 20 people we talked to had 0 to 4 siblings. Thus, these are the possible outcomes for our random variable. The second column shows how many responded with each possible outcome. For example, 3 people had 0 siblings and 6 people had 1, and so on. Just as we did in constructing a histogram, we can develop the relative frequency of each possible answer or outcome, and this is what we get. As shown here, the probability distribution of discrete random variable is a table graph or formula that gives the probability associated with each possible value that the variable can assume. Random variable is represented by x, and associated probability by piece of x. For example, in our example of 20 people, if you select one person at random, the probability of that person having no sibling is 15%, or probability of finding a person who has three siblings is 20%. The property of discrete property distribution is that probability of an outcome is greater than, or equal to 0. And the probability of all possible outcomes sum to 1. All random variables, discrete and continuous, have a cumulative distribution function, which shows the probability that the random variable x is less than or equal to some value. We denote this by the small x, for every value of x. For instance, the probability of picking someone and that person having two of less sibling then is written as probability of x less than or equal to 2. We calculate the cumulative distribution function for discrete variables by summing up the probabilities. Adding 0.15 to 0.30 to 0.25, which gives you 0.70. In this table, the third column represents the cumulative probability of the random variable, number of siblings, being less than or equal to some particular value. Again, denoted by small x. In our sample of 20, the probability that the person we pick will have 4 or less sibling is 1. The probability histogram for the continuous distribution of this random variable will be like this. As you can see, the probability of person in our sample to have 4 or less sibling is 1. How we calculate the mean, also known as the expected value of the discrete random variable, X is shown here. In our example, that would be 1.8. Please take a moment and see where the numbers are coming from. 1.8 siblings is the value expected to occur in the long run and on average. For instance, if we thought that the 20 people whom we talked were a good representation of a population, then we expect that, on average, the members of this population will have 1.8 siblings, which for this kind of data, it kind of makes sense. By looking at the probabilities, we see that 50% of respondents have either 1 or 2 siblings. So now lets practice. A bank manager wants to get a sense of how many people are waiting to see a teller and conducts a study and finds the following pattern shown here in this table. For example, in the study where they took random observations, three times they had no one, 0 customers in line. And 10 times there was one customer waiting and etc. Based on this data, what is the expected number of customers waiting, and what is the probability of finding 4 or more customers in line? To answer this question, we first need to calculate the probability of finding X number of customers in line. Based on our total of 32 observations, 3 times in line was empty. And thus, probability of finding an empty line is about 0.094. Probability of finding of one customers in line is 0.0313 and so on. Once we have the probabilities, then the mean or the expected number of customers in line, is simply the sum of each value of X, that's the number of customers in line, times the probability. Which is, in this case will be this formula, which will give you the answer of 2.16 customers on average in line. And the probability of finding 4 or more customers in line is just finding the probability of 4 plus probability of 5 plus probability of 6, which will give you .094 + .063 + .031 or 0.188. There is a 0.188 chance of finding 4 or more customers in line. As before, the mean or the expected value is the central tendency of the distribution, this may or may not be a very typical value. One way of knowing how typical the mean is, is to examine the variability and the distribution for a discrete variable. Such as this example. The standard deviation is calculated by taking the difference of each possible outcomes and the mean, squaring that difference, and then multiplying it by the probability that that particular outcome occurs. We will do this for all possibility, then take the square root of the overall sum to get the standard deviation. So in our example, where the mean was 1.8, then the standard deviation will be 1.21 siblings. So now that we have gone through this example, you may be asking yourself, why do I need to know this? First, let me reiterate that the probability distribution for discrete random variable is just the table, which links each outcome with its probability of occurrence. In most of the cases, when there are numerous possible outcomes, we may not want to develop this table. Luckily, there are many well known probability distribution. And once we realize that our particular study or experiment belongs to one of these well known distribution, then we will use the proper equations to calculate the probability of a particular outcome. In this course, we will not cover these distribution. But since our focus in this course is to focus on large data sets, and taking samples from that, we will learn about normal distribution for calculating the probabilities. And how this distribution will be used for both discrete, as well as continuous variables.