Discrete probability distributions for discrete random variables

 
 
Discrete probability blog post.jpeg
 
 
 

Discrete random variables and probability distributions

discrete random variable is a variable that can only take on discrete values. For example, if you flip a coin twice, you can only get heads zero times, one time, or two times. You can’t get heads ???1.5??? times, or ???0.31??? times. The number of heads you can get takes on a discrete set of values: ???0???, ???1???, and ???2???. A continuous random variable, on the other hand, can take on any value in a certain interval.

Krista King Math.jpg

Hi! I'm krista.

I create online courses to help you rock your math class. Read more.

 

In probability distributions for all random variables, the probabilities of each of the possibilities has to sum to ???1???, or ???100\%???.

For example, if I flip a coin twice, I can get any of the following outcomes:

???HH???

???HT???

???TH???

???TT???

There are four possible outcomes, and one of them where I get ???0??? heads, so the probability of getting ???0??? heads is ???1/4???. In ???HT??? and ???TH??? I get ???1??? heads, so the probability of getting ???1??? heads is ???2/4???. In ???HH??? I get ???2??? heads, so the probability of getting ???2??? heads is ???1/4???.

Now we can tell that this is a valid discrete probability distribution, because

???\frac14+\frac24+\frac14=1=100\%???

The fact that a valid probability distribution always sums to ???100\%??? allows us to find missing values in our data. For example, if instead we’d been told that the table below tells us the probability of getting a certain number of heads when we flip a coin twice,

 
probability of getting heads on two coin flips
 

we could calculate the missing value by subtracting the known probabilities from ???1.00???. So we could say that the probability of getting exactly ???2??? heads is

???P(2\text{ heads})=1.00-0.25-0.50=0.25???

And then we could complete the table:

 
probability of getting heads when you flip a coin
 

Keep in mind that we often use capital ???X??? to represent a discrete random variable. Which means that, for the example of flipping the coin twice, we could call the number of heads ???X???, and the probability of getting a certain number of heads ???P(X)???. And we could give the probability distribution table as

 
probability of getting 0, 1, or 2 heads when you flip a coin twice
 

Or we could take the same information and graph the distribution this way:

 
probability distribution of coin flips
 
 
 

Calculating discrete probability based on expected values


 
Krista King Math Signup.png
 
Probability & Statistics course.png

Take the course

Want to learn more about Probability & Statistics? I have a step-by-step course for that. :)

 
 

 
 

Expected value

Once we have a probability distribution for a discrete random variable, ???X???, we can calculate the expected value ???E(X)???, which is the mean of ???X???. The way we handle that with a discrete variable is by “weighting” each value.

For example, if we want to find the expected value for the number of heads when we flip a coin two times, we’ll multiply each value of ???X??? by the corresponding value of ???P(X)???, and then add them all together.

the expected value for number of heads when you flip a coin

So the expected value is

???E(X)=\mu_X=0(0.25)+1(0.50)+2(0.25)???

???\mu_X=0+0.50+0.50???

???\mu_X=1???

Therefore, on average, we’ll expect to get ???1??? heads when we flip a coin two times. We can then extrapolate this to guess that, for example, we should get ???50??? heads when we flip a coin ???100??? times.

Discrete probability for Probability and Statistics.jpg

The fact that a valid probability distribution always sums to 100% allows us to find missing values in our data.

Variance and standard deviation

We can also find the variance and standard deviation for discrete random variables. To find the variance, we’ll take the difference between ???X??? and the mean, ???\mu_X???, square that difference, and then multiply the result by the probability of ???X???, called ???P(X)???. We’ll do that for each value of ???X???, and then add all those results together to get the variance, ???\sigma_X^2???.

???\sigma_X^2=\sum_{i=1}^n(X_i-\mu)^2P(X_i)???

Let’s find the variance when ???X??? is the number of heads we get when we flip a coin two times, remembering that we already found ???E(X)=1??? for this probability distribution.

???\sigma_X^2=(0-1)^2(0.25)+(1-1)^2(0.50)+(2-1)^2(0.25)???

???\sigma_X^2=(-1)^2(0.25)+(0)^2(0.50)+(1)^2(0.25)???

???\sigma_X^2=1(0.25)+0(0.50)+1(0.25)???

???\sigma_X^2=0.25+0.25???

???\sigma_X^2=0.50???

We can also find the standard deviation of ???X???, ???\sigma_X???, which is just the square root of the variance.

???\sigma_X=\sqrt{0.50}???

???\sigma_X\approx0.71???

 
Krista King.png
 

Get access to the complete Probability & Statistics course