Lesson Video: Discrete Random Variables | Nagwa Lesson Video: Discrete Random Variables | Nagwa

Lesson Video: Discrete Random Variables Mathematics • Third Year of Secondary School

In this video, we will learn how to identify a discrete random variable and define its corresponding probability distribution.

17:53

Video Transcript

In this video, we will practice identifying discrete random variables and using probability distribution functions and tables for them.

Let’s begin by considering what the term discrete random variable means. Variable means that this is a quantity which can take different values. Random means that the value taken is determined by the outcome of a random event or experiment. Or you could say it depends on an element of chance. The key part here is the word discrete, which means that only a finite set of certain values can be taken. We call this set of values the range of a discrete random variable. For example, the number of heads observed when flipping two coins would be an example of a discrete random variable. Its range would be the set of values zero, one, two as we could have zero, one, or two heads. This is a finite or countable set of values, and so 𝑋 the number of heads when flipping two coins is a discrete random variable.

Let’s now consider what we mean by the probability distribution function of a discrete random variable, and suppose we have a a discrete random variable 𝑋 whose range is the set of values 𝑥 one, 𝑥 two, up to 𝑥 𝑛. Now, it’s important to point out here the convention that we follow. We use capital or uppercase letters to represent the variable itself. And we use lowercase letters to represent the values in its range. Now suppose we also have a function 𝑓 such that 𝑓 of 𝑥 𝑖 is equal to the probability that our random variable 𝑋 takes the value 𝑥 𝑖 for 𝑖 equals one, two, all the way up to 𝑛. Those for all values 𝑥 𝑖 in the range of our discrete random variable capital 𝑋. Then, this function 𝑓 is what we call the probability distribution function of the discrete random variable 𝑋.

It’s very common to represent a probability distribution function in a table with the values in the range given in the first row and the values of the probability distribution function 𝑓 of 𝑥 given in the second. More informally, we can think of the probability distribution function of a discrete random variable simply as the set of all values the variable can take together with their corresponding probabilities. One important feature of a probability distribution is that because the discrete random variable can only take the values in its range and no other values, the sum of all the probabilities in the probability distribution function must be equal to one.

As an example of a probability distribution function, suppose we’re considering this spinner. We can introduce 𝑋 to be the discrete random variable represented by the number obtained when the spinner is spun. This spinner has eight equal sections, three of them labeled with the number one, one labeled with the number two, two labeled with the number three, and the final two are labeled with the number four. This means that the range of our discreet random variable 𝑋 is the set of values one, two, three, four as these are the only values 𝑋 can take.

We can write down the probability distribution function for this discrete random variable which, remember, has the values in the range in its first row and the corresponding probabilities in the second. The values in the range as we’ve already said are one, two, three, and four. There were eight equal sections in our spinner, so all of our probabilities will be fractions with denominators of eight. Three sections have the number one on them, one section has the number two, and two sections each have the numbers three and four. The probabilities for three and four of two-eighths could be simplified to one-quarter if we wish.

And so we’ve written down the probability distribution function for our discrete random variable 𝑋. We have the set of all values in its range in the top row and the corresponding probabilities in the second. Notice that the sum of all the probabilities in our probability distribution function is indeed equal to one. This key feature of probability distribution functions is useful when identifying whether or not a given function could be a probability distribution function as we’ll see in our next example.

Can the function in the given table be a probability distribution function?

Now, what we have here certainly looks like it could be a probability distribution function. In the top row of the table, we have a countable set of values, which could be the range of a discrete random variable. And in the bottom row, we have some decimal values, which could be the associated probabilities. In order to check whether this could indeed represent a probability distribution function, we need to look at the probabilities more closely. And we should recall that the sum of all the probabilities in a probability distribution function must be equal to one.

Looking at the second row of the table and, in fact, looking just in the middle to values first of all, we can see that the sum of these values of 0.43 and 0.69 is a value greater than one. Of course, if we then sum all four values, we get an even larger value of 1.65. This means that this cannot be a probability distribution function, as if a discrete random variable could take each the values zero, one, four, and five with these associated probabilities would have a total probability greater than one, which is impossible. So, our answer is no.

Let’s now consider an example in which we need to calculate a missing probability in a probability distribution.

Let 𝑋 denote a discrete random variable which can take the values two, six, seven, and eight. Given that the probability 𝑋 equals two is equal to the probability 𝑋 equals six, which is three over 22, and the probability 𝑋 equals seven is four elevenths, find the probability 𝑋 equals eight. Give your answer as a fraction.

Let’s begin by representing the information we’ve been given in a slightly different format. We can use a table to display this probability distribution function. In the top row, we’ll have the four values in the range of this discrete random variable, which are two, six, seven, and eight. In the second row, we’ll fill in the probabilities we’ve been given: three over 22 for both two and six and four over 11 for seven. We’re missing one of the probabilities: the probability that 𝑋 equals eight. And this is the value we’re asked to find.

To do so, we need to recall that the sum of all the probabilities in a probability distribution function must be equal to one because the discrete random variable can only take values within its range. We can therefore form an equation and then substitute the three probabilities we’ve been given in the question. By thinking of four over 11 as the equivalent fraction eight over 22, we then have the equation 14 over 22 plus the probability 𝑋 equals eight is equal to one. Subtracting 14 over 22 from each side and then simplifying 14 over 22 to seven over 11, we have that the probability 𝑋 equals eight is equal to one minus seven over 11, which is four over 11.

So, by using the fact that the sum of all the probabilities in a probability distribution function must be equal to one, we found the missing probability. The probability that 𝑋 is equal to eight is four elevenths.

Let’s now consider a similar but slightly more complex example in which all of the probabilities in our probability distribution have been expressed algebraically.

The function in the given table is a probability function of a discrete random variable 𝑋. Find the value of 𝑎.

Notice that each probability in this probability distribution function has been expressed in terms of the variable 𝑎 whose value we’ve been asked to find. In order to do this, we need to recall the key fact that the sum of all the probabilities in a probability distribution function must be equal to one. We can therefore form an equation using the four values in the second row of our table. Three 𝑎 plus eight 𝑎 squared plus four 𝑎 squared plus eight 𝑎 is equal to one. This simplifies to 12𝑎 squared plus 11𝑎 equals one. And then subtracting one from each side, we see that we have the quadratic equation 12𝑎 squared plus 11𝑎 minus one is equal to zero.

This equation can be solved in a variety of ways. But the easiest method for this particular quadratic is going to be to solve by factoring. With a little bit of trial and error or perhaps using factoring by grouping, we see that this quadratic factors as 12𝑎 minus one multiplied by 𝑎 plus one. We then follow the usual method for solving a quadratic equation by factoring. We set each factor in turn equal to zero and solve the resulting linear equation, giving two values of 𝑎: 𝑎 equals one twelfth and 𝑎 equals negative one.

So, we have two possibilities for the value of 𝑎, both correct roots of this quadratic equation. But only one value makes sense in the context of this problem. If we look back at our table, we see, for example, that the probability 𝑋 equals zero is three 𝑎. If we use the value one twelfth, then this becomes three twelfths or one-quarter. But if we use the value negative one, this gives negative three. Remember that probabilities must always be between zero and one, so we can’t have a probability of negative three. This means that the value 𝑎 equals negative one, whilst being a correct solution to the quadratic equation, is not correct in the context of this problem as a value of 𝑎.

We can check whether this value of one twelfth is correct by calculating all of the probabilities. Three 𝑎 gives three twelfths, which is equivalent to 36 over 144. And in the same way, we can find the probabilities as fractions with a denominator of 144 for eight 𝑎 squared, four 𝑎 squared, and eight 𝑎. When we sum these four values together, we do indeed get 144 over 144 or one, and so this confirms that our value of 𝑎 is correct. The value of 𝑎 then is one twelfth.

In this example, we highlighted another key feature of probability distribution functions, which is that all of the individual probabilities must be between zero and one. So, we’ll include this in our definition of a probability distribution function when we return to it later. Next, though, let’s consider how we can write a probability distribution function ourselves from a worded description of a discrete random variable.

Two boys and two girls are ranked according to their scores on an exam. Assume that no two scores are alike and that all possible rankings are equally likely. Find the probability distribution of the random variable 𝑋 expressing the highest ranking achieved by a girl, for example, 𝑋 equals two if the top-ranked student is a boy and the second-ranked student is a girl.

So we have four students and they’re going to be ranked according to their scores on an exam. We need to begin by listing all the different ways we can place these two boys and two girls in the four positions. Now notice that we don’t care which girl or which boy is in each position, only whether the person in each rank is a boy or a girl.

Let’s begin by putting a girl in the first position. We can then put the other girl in position two, position three, or position four. Each time, the remaining two gaps must both be filled by boys. If, instead, we were to have a boy in the first position, then in the same way, the second boy could either be in the second position, the third position, or the fourth position. And in each case, the remaining two positions would both be filled by girls. So we see that we have six possible ordering of two girls and two boys. Remember, each time we’re not interested in which boy or which girl it is. The question tells us that all possible rankings are equally likely, which means that the probability associated with each of these orderings is one-sixth.

The discrete random variable 𝑋 we’re interested in is the highest ranking achieved by a girl. In each of the first three cases, there’s a girl in first place, so the value of 𝑋 is one. In the fourth case, the girls are in third and fourth positions, so the highest ranking achieved by a girl, the value of 𝑋, is three. In the fifth case, the girls are in second and fourth positions, so the highest ranking is two. And in the sixth case, the girls were in second and third positions. The highest ranking is again two. These values in the final column give the range of our discrete random variable 𝑋. It can take the values one, two, or three.

We then need to fill in the associated probabilities. Remember, the value one appears three times, so its total probability is three times one-sixth. That’s three-sixths, which can be simplified to one-half. The value two appears twice. So its total probability is two-sixths, which simplifies to one-third. And finally, the value three only appears once, so its probability is one-sixth. And so we found the probability distribution of the random variable 𝑋. The values in the range are one, two, and three with corresponding probabilities one-half, one-third, and one-sixth.

In our final example, we’ll briefly consider how to answer questions where we’re asked to find the probability that a discrete random variable is greater than or less than a particular value.

Let 𝑋 denote a discrete random variable which can take the values negative two, two, four, and five. Given that the probability 𝑋 equals negative two is 0.15, the probability 𝑋 equals two is 0.43, and the probability 𝑋 equals four is 0.25, find the probability 𝑋 is greater than two.

In this question, we’re not asked to determine the probability that our random variable is equal to a particular value, but rather the probability that it is greater than a given value. This may look a little confusing at first, but the key to remember is that a discrete random variable can only take the values in its range and no others. Let’s begin by representing information in the question using a table. We have the values in the range of our discrete random variable in the top row and the corresponding probabilities in the second row.

Now, we do have a missing probability, the probability that 𝑋 equals five, but we’ll worry about that later if necessary. We want to find the probability that 𝑋 is greater than two. Now remember that our discrete random variable can only take the values in its range. For 𝑋 to be strictly greater than two, this means that it must either take the value four or the value five. There are no other values it can take. The probability 𝑋 is greater than two then is equal to the sum of the probability 𝑋 equals four and the probability 𝑋 equals five.

Now remember, we don’t know the probability 𝑋 equals five, although we can easily calculate it by remembering that the sum of all probabilities in the distribution must be equal to one. Instead, a slightly easier way may be to recall that the probability 𝑋 is greater than two will be equal to one minus the probability 𝑋 is less than or equal to two. So, instead, we can just subtract the probabilities for 𝑋 equaling negative two and 𝑋 equaling two from one, one minus 0.15 and 0.43, which is equal to 0.42.

The key point to remember is that a discrete random variable can only take the values in its range. So, if we’re asked for a cumulative probability as we were here, we just need to consider which values in the range will satisfy this.

Let’s now review the key points covered in this video. A discrete random variable is a quantity whose value is determined by chance, and it can only take a countable or finite number of values, which we call its range. The probability distribution function 𝑓 of a discrete random variable is a list or table of all the values in the range together with their corresponding probabilities. The probability distribution function has two key properties. Firstly, as with all probabilities, each individual probability must be between zero and one. And secondly, the sum or total of all the probabilities in the probability distribution function must be equal to one. We’ve seen through examples how we can write down a probability distribution function and how we can use these properties to calculate missing values or probabilities.

Join Nagwa Classes

Attend live sessions on Nagwa Classes to boost your learning with guidance and advice from an expert teacher!

  • Interactive Sessions
  • Chat & Messaging
  • Realistic Exam Questions

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy