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.51.5 times, or 0.310.31 times. The number of heads you can get takes on a discrete set of values: 00, 11, and 22. 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 11, or 100%100\%.

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

HHHH

HTHT

THTH

TTTT

There are four possible outcomes, and one of them where I get 00 heads, so the probability of getting 00 heads is 1/41/4. In HTHT and THTH I get 11 heads, so the probability of getting 11 heads is 2/42/4. In HHHH I get 22 heads, so the probability of getting 22 heads is 1/41/4.

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

14+24+14=1=100%\frac14+\frac24+\frac14=1=100\%

The fact that a valid probability distribution always sums to 100%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.001.00. So we could say that the probability of getting exactly 22 heads is

P(2 heads)=1.000.250.50=0.25P(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 XX to represent a discrete random variable. Which means that, for the example of flipping the coin twice, we could call the number of heads XX, and the probability of getting a certain number of heads P(X)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, XX, we can calculate the expected value E(X)E(X), which is the mean of XX. 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 XX by the corresponding value of P(X)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)=μX=0(0.25)+1(0.50)+2(0.25)E(X)=\mu_X=0(0.25)+1(0.50)+2(0.25)

μX=0+0.50+0.50\mu_X=0+0.50+0.50

μX=1\mu_X=1

Therefore, on average, we’ll expect to get 11 heads when we flip a coin two times. We can then extrapolate this to guess that, for example, we should get 5050 heads when we flip a coin 100100 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 XX and the mean, μX\mu_X, square that difference, and then multiply the result by the probability of XX, called P(X)P(X). We’ll do that for each value of XX, and then add all those results together to get the variance, σX2\sigma_X^2.

σX2=i=1n(Xiμ)2P(Xi)\sigma_X^2=\sum_{i=1}^n(X_i-\mu)^2P(X_i)

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

σX2=(01)2(0.25)+(11)2(0.50)+(21)2(0.25)\sigma_X^2=(0-1)^2(0.25)+(1-1)^2(0.50)+(2-1)^2(0.25)

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

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

σX2=0.25+0.25\sigma_X^2=0.25+0.25

σX2=0.50\sigma_X^2=0.50

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

σX=0.50\sigma_X=\sqrt{0.50}

σX0.71\sigma_X\approx0.71

 
Krista King.png
 

Get access to the complete Probability & Statistics course