Lesson Explainer: Discrete Random Variables Mathematics

In this explainer, we will learn how to identify discrete random variables and use probability distribution functions and tables for them.

In order to understand what a discrete random variable is, it is helpful to discuss what a random variable is first.

Definition: Random Variables

A random variable is a variable that can take on multiple different values (that are assigned at random), each with an associated probability.

As with probabilities of mutually exclusive events, the probabilities associated with all the values that the random variable can take must all add up to 1. Moreover, each probability must lie within the interval [0,1].

A random variable can be either discrete or continuous. For a discrete random variable, the values of the random value must be discrete. Typically, they will take integer values, but this is not necessarily the case.

Definition: Discrete Random Variable

A discrete random variable is a random variable that can take on multiple different discrete values, each with an associated probability.

One example of a discrete random variable are outcomes of rolling of a fair die. The values the discrete random variable can take are 1, 2, 3, 4, 5, and 6, with 16 being the associated probability for each value.

We can represent a discrete random variable using a probability distribution function. This is a function that maps the values of the discrete random variable to their associated probabilities.

Definition: Probability Distribution Function

A probability distribution function is a function that generates probabilities of value 𝑓(π‘₯) given an outcome of value π‘₯ and must hold the following properties:

  • ο„šπ‘“(π‘₯)=1 for all values of π‘₯ in the domain of the probability distribution function,
  • each value of 𝑓(π‘₯) must lie in the interval [0,1].

In the same way that we can represent inputs and outputs of a function in different ways, can we also represent a probability distribution function in different formats. In the first two examples, we will consider questions where the probability distribution function is represented in a table. The first demonstrates how to check if a function is a probability distribution function by using facts related to probability.

Example 1: Checking if a Function in a Table is a Probability Distribution Function

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

π‘₯0145
𝑓(π‘₯)0.170.430.690.36

Answer

We know that for any probability distribution function,ο„šπ‘“(π‘₯)=1. Therefore, if the function in the table is a probability function, then all the probabilities in the table will sum to 1: 0.17+0.43+0.69+0.36=1.65.

Since this is not the case, as they summed to 1.65, then 𝑓(π‘₯) is not a probability distribution function.

Note that even if all the probabilities summed to 1, we would also need to check that each probability was in the interval [0,1].

The second example also uses a table to represent a probability distribution function, but demonstrates how to find an unknown value in the table using facts associated with probability.

Example 2: Finding an Unknown Value of a Probability Distribution Function in a Table

The function in the given table is a probability distribution function of a discrete random variable 𝑋. Find the value of π‘Ž.

π‘₯12345
𝑓(π‘₯)15110310110π‘Ž

Answer

We know that for any probability distribution function, ο„šπ‘“(π‘₯)=1, so we can use this in order to determine the unknown value of π‘Ž: 15+110+310+110+π‘Ž=1710+π‘Ž=1π‘Ž=310.

Since the value of π‘Ž is in the interval [0,1], then we know that 310 is an appropriate value.

In addition to representing a probability distribution function in a table, we can represent each value and its associated probability using the notation 𝑃(𝑋=π‘₯)=𝑝, where π‘₯ represents the value of the discrete random variable 𝑋 and 𝑝 is the associated probability of that value. Using this notation, we can say that ο„šπ‘ƒ(𝑋=π‘₯)=1 and all values of 𝑝 must lie in the interval [0,1].

In the following example, we will consider how to find an unknown probability when the probability distribution function is presented in the format 𝑃(𝑋=π‘₯)=𝑝.

Example 3: Finding an Unknown Value given Other Values of a Probability Distribution Function

Let 𝑋 denote a discrete random variable that can take the values 0, 1, 2, and 3. Given that 𝑃(𝑋=0)=19, 𝑃(𝑋=1)=49, 𝑃(𝑋=2)=π‘Ž, and 𝑃(𝑋=3)=3π‘Ž, find the value of π‘Ž.

Answer

As all probabilities in a probability distribution function add up to 1, we know that 𝑃(𝑋=0)+𝑃(𝑋=1)+𝑃(𝑋=2)+𝑃(𝑋=3)=1.

By substituting the associated probabilities, we get 19+49+π‘Ž+3π‘Ž=1.

Then, simplifying, rearranging, and solving for π‘Ž gives us 59+4π‘Ž=14π‘Ž=49π‘Ž=19.

As the value of π‘Ž is in the interval [0,1], then 19 is an appropriate answer.

As we saw in example 2, the probability distribution function can be represented as a function of π‘₯, where π‘₯ is the value the discrete random variable can take and 𝑓(π‘₯) is its associated probability. We therefore know that ο„šπ‘“(π‘₯)=1 for all values of π‘₯ the random variable can take. Further, each value of 𝑓(π‘₯) must lie in the interval [0,1].

The following example uses the properties of ο„šπ‘“(π‘₯)=1 and all values of 𝑓(π‘₯) lying in the interval [0,1] in order to determine whether a probability distribution function is valid or not for a given set of values of π‘₯.

Example 4: Determining Which Probability Distribution Function Could Represent a Discrete Random Variable

Let 𝑋 denote a discrete random variable that can take the values 3, 5, and 6. Which of the following functions could represent the probability function of 𝑋?

  1. 𝑓(π‘₯)=π‘₯+310
  2. 𝑓(π‘₯)=π‘₯βˆ’28
  3. 𝑓(π‘₯)=45π‘₯+2
  4. 𝑓(π‘₯)=4π‘₯+52

Answer

For a probability distribution function to be able to represent the discrete random variable 𝑋, which can take the values 3, 5, and 6, ο„šπ‘“(π‘₯)=1 and each value of 𝑓(π‘₯) must lie in the interval [0,1]. We will check each function in turn.

For 𝑓(π‘₯)=π‘₯+310, we will first calculate the associated probabilities for each value of the discrete random variable by substituting 3, 5, and 6 into 𝑓(π‘₯).

When π‘₯=3, 𝑓(3)=3+310=1210.

As 1210 is outside of the interval [0,1], then we can already deduce that 𝑓(π‘₯)=π‘₯+310 cannot be a valid probability distribution function for the discrete random variable 𝑋.

Similarly, for 𝑓(π‘₯)=π‘₯βˆ’28, we will first calculate the associated probabilities for each value of the discrete random variable, 3, 5, and 6, by substituting into 𝑓(π‘₯).

When π‘₯=3, 𝑓(3)=3βˆ’28=18.

When π‘₯=5, 𝑓(5)=5βˆ’28=38.

When π‘₯=6, 𝑓(6)=6βˆ’28=48.

As each value lies in the interval [0,1], then so far 𝑓(π‘₯)=π‘₯βˆ’28 is a valid probability distribution function for the discrete random variable 𝑋.

We will now check if ο„šπ‘“(π‘₯)=1: 𝑓(3)+𝑓(5)+𝑓(6)=18+38+48=1.

Since ο„šπ‘“(π‘₯)=1, then 𝑓(π‘₯)=π‘₯βˆ’28 is a valid probability distribution function for the discrete random variable 𝑋.

Note:

We can check the other functions, but since we have already determined the correct answer, then this is not necessary.

In the next example, we can use the properties of ο„šπ‘“(π‘₯)=1 and all values of 𝑓(π‘₯) lying in the interval [0,1] to determine an unknown coefficient within the function of 𝑓(π‘₯) given the values the random variable can take.

Example 5: Finding an Unknown Coefficient in a Probability Distribution Function given Values the Discrete Random Variable Can Take

Let 𝑋 denote a discrete random variable that can take the values 1, 2, 3, 4, 5, and 6. Given that 𝑋 has probability distribution function 𝑓(π‘₯)=π‘Žπ‘₯5, find the value of π‘Ž.

Answer

For a probability distribution function to be able to represent the discrete random variable 𝑋, which can take the values 1, 2, 3, 4, 5, and 6, ο„šπ‘“(π‘₯)=1 and each value of 𝑓(π‘₯) must lie in the interval [0,1].

First, we need to substitute 1, 2, 3, 4, 5, and 6 into 𝑓(π‘₯)=π‘Žπ‘₯5.

For π‘₯=1, 𝑓(1)=π‘ŽΓ—15=π‘Ž5.

For π‘₯=2, 𝑓(2)=π‘ŽΓ—25=2π‘Ž5.

For π‘₯=3, 𝑓(3)=π‘ŽΓ—35=3π‘Ž5.

For π‘₯=4, 𝑓(4)=π‘ŽΓ—45=4π‘Ž5.

For π‘₯=5, 𝑓(5)=π‘ŽΓ—55=5π‘Ž5.

For π‘₯=6, 𝑓(6)=π‘ŽΓ—65=6π‘Ž5.

Next, we use the property ο„šπ‘“(π‘₯)=1 to create an equation in terms of π‘Ž: 𝑓(1)+𝑓(2)+𝑓(3)+𝑓(4)+𝑓(5)+𝑓(6)=1,π‘Ž5+2π‘Ž5+3π‘Ž5+4π‘Ž5+5π‘Ž5+6π‘Ž5=1.

Then, simplifying, rearranging, and solving for π‘Ž gives us 21π‘Ž5=1π‘Ž=521.

Although we have found the value of π‘Ž, it is good practice to check that for each value of the random variable, the associated probability is in the interval [0,1]. We do this by substituting π‘Ž=521 into 𝑓(1), 𝑓(2), and so on.

For π‘₯=1, 𝑓(1)=Γ—15=121.

For π‘₯=2, 𝑓(2)=Γ—25=221.

For π‘₯=3, 𝑓(3)=Γ—35=321.

For π‘₯=4, 𝑓(4)=Γ—45=421.

For π‘₯=5, 𝑓(5)=Γ—55=521.

For π‘₯=6, 𝑓(6)=Γ—65=621.

As each value of 𝑓(π‘₯) for all values of the random variable lies in the interval [0,1], then we know that 𝑓(π‘₯)=π‘Žπ‘₯5, where π‘Ž=521, is a valid probability distribution function.

So far, we have considered examples where no context is given. In the final part of the explainer, we will explore examples where a context is given.

In the following example, we will consider how to use information from a probability distribution in order to answer questions within a context.

Example 6: Solving Problems in Context about Discrete Random Variables given a Probability Distribution Function

Let 𝑋 be the random variable that represents the number of patients who visit a dental clinic per hour. The probability distribution of 𝑋 is shown in the table below.

π‘₯101112131415
𝑓(π‘₯)0.20.10.150.050.30.2

Find the probability of the following.

  1. Exactly 13 patients visiting the clinic in a given hour
  2. At least 13 patients visiting the clinic in a given hour
  3. At most 13 patients visiting the clinic in a given hour

Answer

Part 1

To find the probability that exactly 13 patients visit the clinic in a given hour, we use the probability distribution table.

In this case, 𝑋 represents the number of patients who visit a dental clinic per hour, so π‘₯=13. Therefore, the probability of π‘₯=13 is given by the corresponding value for 𝑓(π‘₯) in the table, which is 0.05.

Part 2

To find the probability that at least 13 patients visit the clinic in a given hour, we again use the probability distribution table.

In this case, π‘₯ can take multiple values, since we are finding the probability that at least 13 patients visited the clinic in a given hour. So, π‘₯ can be any integer greater than or equal to 13, or π‘₯β‰₯13. As seen in the table, 𝑋 can only take integer values from 10 to 15, so π‘₯ can be 13, 14, or 15.

To find the probability of π‘₯ being 13, 14, or 15, we find the corresponding values for 𝑓(π‘₯) in the table and sum these.

For π‘₯=13, 𝑓(13)=0.05.

For π‘₯=14, 𝑓(14)=0.3.

For π‘₯=15, 𝑓(15)=0.2.

Therefore, 𝑓(13)+𝑓(14)+𝑓(15)=0.05+0.3+0.2=0.55.

So, the probability that at least 13 patients visit the clinic in a given hour is 0.55.

Part 3

To find the probability that at most 13 patients visit the clinic in a given hour, we again use the probability distribution table.

As in the previous part, π‘₯ can take multiple values. Since we are finding the probability that at most 13 patients visited the clinic in a given hour, then π‘₯ can be any integer less than or equal to 13, or π‘₯≀13. As seen in the table, 𝑋 can only take integer values from 10 to 15, so π‘₯ can be 10, 11, 12, or 13.

To find the probability of π‘₯ being 10, 11, 12, or 13, we find the corresponding values for 𝑓(π‘₯) in the table and sum these.

For π‘₯=10, 𝑓(10)=0.2.

For π‘₯=11, 𝑓(14)=0.1.

For π‘₯=12, 𝑓(15)=0.15.

For π‘₯=13, 𝑓(13)=0.05.

Therefore, 𝑓(10)+𝑓(11)+𝑓(12)+𝑓(13)=0.2+0.1+0.15+0.05=0.5.

So, the probability that at most 13 patients visit the clinic in a given hour is 0.5.

In the last example, we will consider which distribution is most appropriate for a given context.

Example 7: Choosing a Distribution of a Discrete Random Variable given a Context

In an experiment in which a fair coin is tossed five consecutive times, let 𝑋 be the discrete random variable expressing the number of heads minus the number of tails. Find the probability distribution of 𝑋.

  1. π‘₯βˆ’5βˆ’3βˆ’1135
    𝑓(π‘₯)13253210321032532132
  2. π‘₯βˆ’5βˆ’3βˆ’10135
    𝑓(π‘₯)132532932232932532132
  3. π‘₯βˆ’3βˆ’1013
    𝑓(π‘₯)53210322321032532
  4. π‘₯βˆ’4βˆ’3βˆ’1134
    𝑓(π‘₯)13253210321032532132
  5. π‘₯βˆ’5βˆ’3βˆ’1135
    𝑓(π‘₯)13210325325321032132

Answer

In order to determine the probability distribution function 𝑓(π‘₯) for the discrete random variable 𝑋, we first determine all the possible values that 𝑋 can take, then find the probability, 𝑓(π‘₯), for each value of 𝑋.

The questions states that a fair coin is tossed 5 times and 𝑋 is the discrete random variable that represents the number of heads minus the number of tails. Therefore, the possible values of 𝑋 are as follows:

  • 5 heads and 0 tails: 5βˆ’0=5,
  • 4 heads and 1 tails: 4βˆ’1=3,
  • 3 heads and 2 tails: 3βˆ’2=1,
  • 2 heads and 3 tails: 2βˆ’3=βˆ’1,
  • 1 heads and 4 tails: 1βˆ’4=βˆ’3,
  • 0 heads and 5 tails: 0βˆ’5=βˆ’5.

So, the values that 𝑋 can take are βˆ’5, βˆ’3, βˆ’1, 1, 3, and 5.

Next, we will calculate the probability, 𝑓(π‘₯), for each of the values 𝑋.

In order to calculate the probability, it is helpful to list the possible outcomes for each discrete random variable 𝑋 and then determine the probability once all the outcomes have been determined.

For π‘₯=5, there are 5 heads and 0 tails. HHHHH is the only outcome.

For π‘₯=3, there are 4 heads and 1 tails. HHHHT, HHHTH, HHTHH, HTHHH, and THHHH are the 5 outcomes.

For π‘₯=1, there are 3 heads and 2 tails. HHHTT, HHTHT, HTHHT, THHHT, HHTTH, HTHTH, THHTH, HTTHH, THTHH, and TTHHH are the 10 outcomes.

For π‘₯=βˆ’1, there are 2 heads and 3 tails. HHTTT, HTHTT, THHTT, HTTHT, THTHT, TTHHT, HTTTH, THTTH, TTHTH, and TTTHH are the 10 outcomes.

For π‘₯=βˆ’3, there are 1 heads and 4 tails. HTTTT, THTTT, TTHTT, TTTHT, and TTTTH are the 5 outcomes.

For π‘₯=βˆ’5, there are 0 heads and 5 tails. TTTTT is the only outcome.

By adding all of the outcomes together, we get 1+5+10+10+5+1=32, so there are 32 outcomes in total.

Therefore, to find the probability of each outcome, we take the number of outcomes for each discrete random variable and divide it by the total number of outcomes, as follows.

For π‘₯=5, 𝑓(5)=132.

For π‘₯=3, 𝑓(3)=532.

For π‘₯=1, 𝑓(1)=1032.

For π‘₯=βˆ’1, 𝑓(βˆ’1)=1032.

For π‘₯=βˆ’3, 𝑓(βˆ’3)=532.

For π‘₯=βˆ’5, 𝑓(βˆ’5)=132.

When displayed in a table, we have the following.

π‘₯βˆ’5βˆ’3βˆ’1135
𝑓(π‘₯)13253210321032532132

In this explainer, we have learned about discrete random variables and their probability distribution functions. Let’s recap the key points.

Key Points

  • A discrete random variable is a variable that can take on a set of discrete values, each with an associated probability.
  • A probability distribution function maps each value of a discrete random variable to an associated probability.
  • The sum of the probabilities of a probability distribution function must equal 1, and each probability must lie in the interval [0,1].
  • Probability distribution functions can be presented in various ways, including:
    • in a table,
    • using the notation 𝑃(𝑋=π‘₯)=𝑝, where π‘₯ represents the value of the discrete random variable 𝑋 and 𝑝 is the associated probability of that value,
    • using a function 𝑓(π‘₯), where π‘₯ represents the value of the discrete random variable 𝑋 and 𝑓(π‘₯) is its associated probability.

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