Back to homeMathematics · High School Year 2 · Social Sciences · Change subject
Start for free
Prep 2 SS · Mathematics
Probability · Discrete variable distributions

Probability Function and Distribution Function of a Discrete Variable

Before you start, make sure you know: Compound events (High School Year 1 (semesters 1 and 2))
Before you start, make sure you know: First-degree equations (Secondary Year 2)

Few real questions ask for "exactly one value." A call center wants to know the probability of receiving at most 2 complaints a day. An association wants to know how many volunteers it needs at least to cover 10 shifts during Buen Fin. To answer quickly, probabilities are accumulated with a special function, the distribution function. First you need to learn how to build and use the table of probabilities.

Building the probability function

A discrete random variable $X$ takes separate values (0, 1, 2, …) and each one has its probability. Sometimes the table is incomplete and sometimes it is given by a formula. In both cases we use the fact that all the probabilities add up to 1.

Bar chart with four point probabilities that add up to one. x₁x₂ x₃x₄ p₁ + p₂ + p₃ + p₄ = 1: any gap is found by difference
Practice★☆☆Not started
Determine with reasons whether the following table can represent the probability function of a discrete random variable $X$. To do this, check whether the fundamental…

Determine with reasons whether the following table can represent the probability function of a discrete random variable $X$. To do this, check whether the fundamental properties of probabilities are satisfied:

$x_i$ $1$ $2$ $3$ $4$
$P(X = x_i)$ $0.25$ $0.40$ $0.15$ $0.20$
0.1 0.2 0.3 0.4 0.5 1 2 3 4 0.25 0.40 0.15 0.20 xᵢ P(X=xᵢ)
Solve
Practice★☆☆Not started
Explain why the following function cannot be the probability function of a discrete random variable $X$: $P(X=x_i) = \{0.2;\ 0.3;\ -0.1;\ 0.6\}$ The figure shows these…

Explain why the following function cannot be the probability function of a discrete random variable $X$:

$P(X=x_i) = \{0.2;\ 0.3;\ -0.1;\ 0.6\}$

The figure shows these values assigned to $x_1, x_2, x_3$ and $x_4$.

Bar chart with the values assigned to x1, x2, x3 and x4: 0,2; 0,3; -0,1 and 0,60.60.40.20−0.1x₁x₂x₃x₄P(X = xᵢ)xᵢ0.20.3−0.10.6

Justify your answer by mentioning which property of probability is being violated in this case.

Solve
Practice★☆☆Not started
Let $X$ be a discrete random variable whose probability function is given by: $P(X=x) = \frac{x}{10}$ for $x \in \{1, 2, 3, 4\}$ a) Write the table of values for the…

Let $X$ be a discrete random variable whose probability function is given by:

$P(X=x) = \frac{x}{10}$ for $x \in \{1, 2, 3, 4\}$

  1. a) Write the table of values for the probability function.
  2. b) Check that the sum of all probabilities is equal to $1$.
  3. c) Calculate $P(X \ge 3)$.
Solve

Events with several values

Once the table is complete, any probability about $X$ is found by adding the $p_i$ of the values of interest.

Bar chart of a discrete variable with two highlighted bars representing the probability of an event with several values. values that don't matter values that are added
Practice★☆☆Not started
Given the following probability function of a discrete random variable $X$, calculate the probabilities requested below: | $x_i$ | $10$ | $20$ | $30$ | $40$ | $50$ | |…

Given the following probability function of a discrete random variable $X$, calculate the probabilities requested below:

$x_i$ $10$ $20$ $30$ $40$ $50$
$p_i$ $0.15$ $0.25$ $0.35$ $0.15$ $0.10$
  1. a) $P(X < 30)$
  2. b) $P(X \le 30)$
  3. c) $P(20 < X \le 40)$
Solve
Practice★☆☆Not started
A survey was conducted in a secondary school regarding the number of siblings of 1st Bachillerato students. From the data, the variable $X$ = "number of siblings" was…

A survey was conducted in a secondary school regarding the number of siblings of 1st Bachillerato students. From the data, the variable $X$ = "number of siblings" was defined. The relative frequency table (estimated probabilities) is as follows:

Siblings ($x_i$) $0$ $1$ $2$ $3$
$P(X = x_i)$ $0.12$ $0.54$ $0.24$ $0.10$

Represent this information using a bar chart and calculate the probability that a student chosen at random has fewer than 2 siblings.

You can do it on paper and send a photo with your answer.

Solve
Practice★★☆Not started
In a workshop specializing in mobile device repair, a study was carried out on the number of devices a technician can fully repair in an eight-hour workday. Let $X$ be…

In a workshop specializing in mobile device repair, a study was carried out on the number of devices a technician can fully repair in an eight-hour workday. Let $X$ be the random variable expressing this number. The probability function is given by the following table, although one value needs to be completed:

$x_i$ $0$ $1$ $2$ $3$ $4$
$P(X=x_i)$ $0.15$ $0.25$ $0.35$ $k$ $0.05$
  1. a) Calculate the value of $k$ so that the table represents a valid probability distribution.
  2. b) What is the probability that the technician repairs at least two devices in a day?
  3. c) If the workshop receives a productivity bonus on days when more than 2 devices are repaired, what is the probability of receiving this bonus?
0.1 0.2 0.3 0.4 P(X=xᵢ) 0 1 2 3 4 xᵢ (No. of devices) 0.15 0.25 0.35 k 0.05 Σ P(X=xᵢ) = 1
Solve

Building the table from an experiment

Often the table is not given: you have to find it. The method is the usual one: list the values $X$ can take and calculate the probability of each one using Laplace's rule or counting techniques.

Practice★☆☆Not started
Two fair coins are flipped. We define the random variable $X$ as the "number of heads obtained". a) Write the sample space of the experiment. b) Construct the table of…

Two fair coins are flipped. We define the random variable $X$ as the "number of heads obtained".

  1. a) Write the sample space of the experiment.
  2. b) Construct the table of the probability function of $X$.
  3. c) Represent the distribution graphically using a bar graph.
1st coin 2nd coin Sample space Variable X ½ ½ ½ ½ ½ ½ C + C + C + CC C+ +C ++ 2 1 0
Solve
Practice★★☆Not started
There is an urn with $3$ white balls and $2$ red balls, as shown in the figure. Two balls are drawn successively without replacement. Let $X$ be the random variable that…

There is an urn with $3$ white balls and $2$ red balls, as shown in the figure. Two balls are drawn successively without replacement. Let $X$ be the random variable that counts the number of white balls drawn.

  1. a) Describe the sample space of the experiment and the values that $X$ can take.
  1. b) Calculate the probability function of $X$.
  1. c) Determine the probability that at least one of the drawn balls is red.
Urn with three white balls and two red ballsUrn: 3 white and 2 red
Solve
Practice★★★Not started
A competitive exam consists of $4$ topics chosen at random from a total of $10$. A candidate has prepared only $6$ topics. We define the random variable $X$ as "the…

A competitive exam consists of $4$ topics chosen at random from a total of $10$. A candidate has prepared only $6$ topics. We define the random variable $X$ as "the number of topics the candidate knows out of the $4$ chosen".

  1. Calculate the probability that the candidate does not know any of the chosen topics.

  2. Determine the probability that they know exactly $2$ topics.

  3. Find the expected value of the variable $X$ and interpret the result in the context of the exam. Is it likely that the candidate passes if they need to know at least $3$ topics?

Solve

The distribution function

Many questions are of the type "at most" or "no more than." For these, probabilities are accumulated.

Step graph of the cumulative distribution function showing jumps at each value of the variable. 01 23 F(x)
Practice★★☆Not started
Let $X$ be a discrete random variable whose cumulative distribution function $F(x)$ is shown below: $$F(x) = \begin{cases} 0 & \text{if } x < 1 \\ 0.2 & \text{if } 1 \le…

Let $X$ be a discrete random variable whose cumulative distribution function $F(x)$ is shown below:

$$F(x) = \begin{cases} 0 & \text{if } x < 1 \\ 0.2 & \text{if } 1 \le x < 2 \\ 0.5 & \text{if } 2 \le x < 3 \\ 0.9 & \text{if } 3 \le x < 4 \\ 1 & \text{if } x \ge 4 \end{cases}$$
  1. a) From $F(x)$, obtain the probability function $P(X=x_i)$ for each value of the variable.
  2. b) Calculate the probability $P(2 \le X < 4)$.
  3. c) Represent the probability function graphically using a bar chart.

You can do it on paper and send a photo with your answer.

Solve

From the distribution function to the probability function

You can also go the other way. If $F(x)$ is known, for example as a step graph, the table can be rebuilt by reading the size of each jump.

Practice★★★Not started
The cumulative distribution function $F(x)$ of a discrete random variable $X$ is given by a step graph with the following intervals: $F(x) = 0$ for $x < 0$, $F(x) = 0.2$…

The cumulative distribution function $F(x)$ of a discrete random variable $X$ is given by a step graph with the following intervals: $F(x) = 0$ for $x < 0$, $F(x) = 0.2$ for $0 \le x < 1$, $F(x) = 0.5$ for $1 \le x < 2$, $F(x) = 0.8$ for $2 \le x < 3$, and $F(x) = 1$ for $x \ge 3$.

Graph of the cumulative distribution function F(x)012340.20.50.81xF(x)

From the graph, construct the probability mass function table $P(X=x_i)$ and calculate the variance $V[X]$. Explain with reasoning the meaning of $P(0.5 < X \le 2)$.

You can work it out on paper and submit a photo of your answer.

Solve

Back to the beginning: "at most 2 complaints" is directly $F(2)$. And "at least 10 shifts" is found with the complement: $P(X \geq 10) = 1 - F(9)$.

Expected value, variance, and standard deviation

The table also lets you summarize the variable with a single number that tells you "how much $X$ is worth on average in the long run."

Bar chart of a distribution with a mark at the mean, acting as the balance point. μ: balance point The mean is where the distribution "balances"

When the table has unknown values ($a$ and $b$, or $p$ and $q$), you set up a system: one equation with "sum of probabilities equals 1" and another with the given value of $E[X]$ or $V[X]$. It is solved by substitution or by addition and subtraction.

Practice★★☆Not started
A courier company analyses the number of damaged packages arriving in each delivery van. After a long observation period, they have defined the following probability…

A courier company analyses the number of damaged packages arriving in each delivery van. After a long observation period, they have defined the following probability function for the variable $X$ = "number of damaged packages per journey":

$P(X=x) = \frac{x+1}{15}$ for $x \in \{0, 1, 2, 3, 4\}$

  1. a) Check that this is indeed a probability function.
  2. b) Calculate the probability that at most $2$ damaged packages arrive on a journey.
  3. c) Find the mean and standard deviation of the distribution.
Solve
Practice★★☆Not started
In a language app, users can earn between $0$ and $3$ daily badges according to their consistency. It is known that the probability of earning $x$ badges is proportional…

In a language app, users can earn between $0$ and $3$ daily badges according to their consistency. It is known that the probability of earning $x$ badges is proportional to the value of $x+1$ for the possible values of the variable.

  1. a) Write the probability distribution table, determining the required constant of proportionality.
  2. b) What is the average number of badges a user earns per day?
  3. c) Calculate the variance of the distribution.
Solve
Practice★★★Not started
Let $X$ be a discrete random variable whose probability function is defined in the following table, where $a$ and $b$ are two unknown real numbers: | $x_i$ | $1$ | $2$ |…

Let $X$ be a discrete random variable whose probability function is defined in the following table, where $a$ and $b$ are two unknown real numbers:

$x_i$ $1$ $2$ $3$ $4$
$P(X=x_i)$ $0.1$ $a$ $b$ $0.2$

Given that the expected value of the distribution is $E[X] = 2.85$, determine the values of $a$ and $b$. Subsequently, calculate the standard deviation $\sigma$ of the variable and indicate what percentage of the total probability lies in the interval $[E[X] - \sigma, E[X] + \sigma]$.

0.1 0.2 0.3 0.4 0.5 0.6 P(X=xᵢ) xᵢ 1 2 3 4 0.1 0.2 a b E[X] = 2.85 [E[X]-σ, E[X]+σ]
Solve

Winnings and fair games

In games, raffles, and business, $X$ is often an amount of winnings in pesos. The expected value tells you whether you win or lose in the long run.

A game is fair when the expected value of the net winnings is 0. If it is negative, it favors the house; if it is positive, it favors the player.

Practice★★☆Not started
A youth association is organizing a raffle to fund an end-of-year trip. Tickets are sold for $40$ pesos. The prize is an Amazon gift card valued at $1\,000$ pesos. A…

A youth association is organizing a raffle to fund an end-of-year trip. Tickets are sold for $40$ pesos. The prize is an Amazon gift card valued at $1\,000$ pesos. A total of $200$ tickets have been issued. Let $X$ be the random variable that defines the net gain of a student who buys a single ticket (taking into account its cost).

  1. a) Define the sample space of the possible values of $X$.
  2. b) Determine the probability function of $X$.
  3. c) Calculate the expected value $E[X]$ and interpret the result obtained. Is it a fair game for the buyer?
Solve
Practice★★☆Not started
A restaurant analyzes the number of reservations for groups of more than 10 people it receives on Saturday nights. The variable $X$ follows the probability distribution:…

A restaurant analyzes the number of reservations for groups of more than 10 people it receives on Saturday nights. The variable $X$ follows the probability distribution:

$x_i$ $0$ $1$ $2$ $3$
$P(X=x_i)$ $0.4$ $0.3$ $0.2$ $0.1$
  1. a) If the restaurant makes a profit of $1\,000$ pesos for each group that attends, but incurs fixed preparation costs of $600$ pesos regardless of how many groups go, define a new variable $Y$ representing the net profit for Saturday.
  2. b) Calculate the expected value of $Y$.
  3. c) Calculate the standard deviation of $X$.
Solve
Practice★★★Not started
Two players, Alba and Bruno, roll a six-sided die. If a prime number comes up, Alba wins as many pesos as indicated by the die. If a composite number comes up, Bruno…

Two players, Alba and Bruno, roll a six-sided die. If a prime number comes up, Alba wins as many pesos as indicated by the die. If a composite number comes up, Bruno wins double the amount indicated by the die in pesos. If the number $1$ comes up, nobody wins anything.

  1. Define the random variable $G$ as Alba's net gain in a roll (considering that what Bruno wins is a loss for Alba). Write its probability function.

  2. Calculate the expected value of $G$. Who does the game favor in the long run?

  3. How much should Bruno pay Alba each time a composite number is rolled for the game to be fair ($E[G]=0$)?

Solve

Summary

See all the exercises in this section