If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content
Current time:0:00Total duration:6:26

Variance and standard deviation of a discrete random variable

AP.STATS:
VAR‑5 (EU)
,
VAR‑5.C (LO)
,
VAR‑5.C.1 (EK)
,
VAR‑5.C.2 (EK)
,
VAR‑5.C.3 (EK)
,
VAR‑5.D (LO)
,
VAR‑5.D.1 (EK)

Video transcript

in a previous video we defined this random variable X it's a discrete random variable it can only take on a finite number of values and I defined it as the number of workouts I might do in a week and we calculated the expected value of our random variable X which you could also denote as the mean of X and we use the Greek letter mu which we use for population mean and all we did is it's the probability weighted sum of the various outcomes and we got for this random variable with this probability distribution we got an expected value or a mean of 2.1 we're going to do now is extend this idea to measuring spread and so we're going to think about what is the variance of this random variable and then we could take the square root of that to find out what is the standard deviation the way we are going to do this has parallels with the way that we've calculated variance in the past so the variance of our random variable X what we're going to do is take the difference between each outcome and the mean square that difference and then we're going to multiply it by the probability of that outcome so for example for this first data point you're going to have zero minus two point one squared times the probability of getting zero times zero point one then you're going to get plus one minus two point one squared times the probability that you get one times zero point one five then you're going to get plus two minus two point one squared times the probability that you get a two times zero point four then you have plus three minus 2 point 1 squared times zero point two five and then last but not least you have plus four minus 2 point 1 squared times zero point one so once again the difference between each outcome and the mean we square it and we multiply times the probability of that outcome so this is going to be negative two point one squared which is just two point one squared so I'll just read this is 2 point 1 squared times 0.1 that's the first term and then we're going to have plus one minus two point one is negative one point one and then we're going to square that so that's just going to be the same thing as 1 point 1 squared which is one point two one but I'll just write it out one point 1 squared times 0.15 and then this is going to be two minus two point one is negative point one when you square it is going to be equal to so plus point zero one if you have negative point one times negative point one that's point zero one times zero point four times point four and then plus we this is going to be zero point nine squared so that is 0.8 one times 0.25 and then we're almost there this is going to be plus one point nine squared one point nine squared times point one and we get one point one nine so this is all going to be equal to one point one nine and if we want to get the standard deviation for this random variable and we would denote that with the Greek letter Sigma the standard deviation for the random variable X is going to be equal to the square root of the variance the square root of one point one nine which is equal to let's just get the calculator back here so we are just going to take the square root of what we just just type it again one point one nine and that gives us so it's approximately one point zero nine approximately one point zero nine so let's see if this makes sense let me put this all on a number line right over here so you have the outcome 0 1 2 3 & 4 so you have a 10% chance of getting a 0 so I will draw that like this let's just say this is a height of 10% you have a 15% chance of getting 1 so that'll be one and a half times higher so it'll look something like this you have a 40% chance of getting a 2 so that's going to be like this so you get a 40% chance of getting it too you have a 25% chance of getting a 3 look like this and then you have a 10% chance of getting a 4 so it look like that so this is a visualization of this discrete probability distribution where I didn't draw the vertical axis here but this would be 0.1 this would be 0.15 this is 0.25 and that is 0.4 and then we see that the mean is at 2.1 if the mean is the mean is a 2.1 which makes sense even though this random variable only takes on integer values you can have a mean that takes on a non integer value and then the standard deviation is one point zero nine so one point zero nine above the mean is going to get as close to three point two and one point zero nine below the mean is going to get as close to one and so this all at least intuitively feels reasonable this mean does seem to be indicative of the central tendency of this distribution and the standard deviation does seem to be a decent measure of the spread