Discrete Probability Distributions
Friday night at a pizza place in Chicago. The manager, Priya, logs how many deliveries arrive late. She wants to know two things. What is the chance of at most 2 late deliveries on a given night? And how many late deliveries should she expect on a typical night? A probability distribution answers both.
Random variables and probability distributions
A random variable gives a number to each outcome of a random process. It is discrete when its possible values can be listed one by one, like $0, 1, 2, 3, \dots$ Counting things (late deliveries, heads, siblings) gives a discrete random variable.
Some problems call this the probability function (or discrete density function). It is the same thing as a probability distribution.
Why rule 2? Every night, something happens. The listed values cover every possibility, so together they must account for 100% of the probability.
Determine with reasoning whether the following table can represent the probability function of a discrete random variable $X$. To do this, check that the fundamental…
Determine with reasoning whether the following table can represent the probability function of a discrete random variable $X$. To do this, check that the fundamental properties of probabilities are met:
| $x_i$ | $1$ | $2$ | $3$ | $4$ |
|---|---|---|---|---|
| $P(X = x_i)$ | $0,25$ | $0,40$ | $0,15$ | $0,20$ |
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\}$ Justify your answer by…
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\}$
Justify your answer by mentioning which property of probability is being violated in this case.
Finding a missing probability
Often a table has a gap, or the distribution is given by a formula with an unknown constant. In both cases the key is rule 2: the probabilities must add to 1.
Here $P(X \ge 2) = 0.30 + 0.10 = 0.40$.
When a formula gives the probabilities, plug in each value of $x$, add, set the sum equal to 1, and solve for the constant.
The table is $P(1)=0.1$, $P(2)=0.2$, $P(3)=0.3$, $P(4)=0.4$. Check that they sum to 1.
Wording like "twice as likely" also turns into an equation. Suppose a spinner has 3 twice as likely as 2, and 2 twice as likely as 1. Let $P(1) = p$. Then $P(2) = 2p$ and $P(3) = 4p$. So $p + 2p + 4p = 7p = 1$ and $p = \tfrac{1}{7}$.
A streaming platform analyzes the number of shows a user watches per week. The discrete random variable $X$ is defined as the "number of completed shows". Its…
A streaming platform analyzes the number of shows a user watches per week. The discrete random variable $X$ is defined as the "number of completed shows". Its probability function is given by the following table:
| $x_i$ | $0$ | $1$ | $2$ | $3$ |
|---|---|---|---|---|
| $P(X = x_i)$ | $0,1$ | $k$ | $0,3$ | $0,2$ |
Find the value of the constant $k$ so that the distribution is well defined and calculate the probability that a user watches at least 2 shows a week, that is, $P(X \ge 2)$.
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\}$
- a) Write the table of values for the probability function.
- b) Show that the sum of all the probabilities is equal to $1$.
- c) Calculate $P(X \ge 3)$.
A biased six-sided die is rolled, such that the probability of obtaining an even number is double that of obtaining an odd number. If all even numbers have the same…
A biased six-sided die is rolled, such that the probability of obtaining an even number is double that of obtaining an odd number. If all even numbers have the same probability as each other, and the same occurs with the odd numbers:
- a) Determine the probability function of the random variable $X$ = "result obtained when rolling the die".
- b) Calculate the probability of obtaining a value less than or equal to $3$.
- c) Calculate the mean or expected value of this distribution.
Building a distribution from an experiment
Many problems describe an experiment instead of giving a table. Here is the recipe.
-
List the possible outcomes (the sample space).
-
Decide the value of $X$ for each outcome.
-
For each value of $X$, add the probabilities of the outcomes that give it.
-
Check that the probabilities sum to 1.
When objects are drawn without replacement, the probabilities change after each draw. Use a tree diagram and multiply along the branches.
You should get $P(2) = \tfrac26 \cdot \tfrac15 = \tfrac{2}{30} = \tfrac1{15}$. The total is $\tfrac{12}{30} + \tfrac{16}{30} + \tfrac{2}{30} = 1$.
Two fair coins are tossed in the air. We define the random variable $X$ as the "number of heads obtained". a) Write the sample space of the experiment. b) Create the…
Two fair coins are tossed in the air. We define the random variable $X$ as the "number of heads obtained".
- a) Write the sample space of the experiment.
- b) Create the table for the probability function of $X$.
- c) Represent the distribution graphically using a bar chart.
In an urn there are 5 numbered balls: three of them with the number $1$ and two of them with the number $2$. A ball is drawn at random and its value is recorded. a)…
In an urn there are 5 numbered balls: three of them with the number $1$ and two of them with the number $2$. A ball is drawn at random and its value is recorded.
- a) Define the random variable $X$ and its range (possible values).
- b) Construct the table for the probability function.
- c) What is the probability that the number obtained is greater than $1$?
An urn contains $3$ white balls and $2$ red balls. Two balls are drawn successively and without replacement. Let $X$ be the random variable that counts the number of…
An urn contains $3$ white balls and $2$ red balls. Two balls are drawn successively and without replacement. Let $X$ be the random variable that counts the number of white balls drawn.
- a) Describe the sample space of the experiment and the values that $X$ can take.
- b) Calculate the probability function of $X$.
- c) Determine the probability that at least one of the drawn balls is red.
Counting outcomes and independent trials
With larger experiments, listing every outcome is too slow. Two tools help.
Tool 1: combinations. Suppose $N$ items include $a$ "special" ones and $b = N - a$ ordinary ones. You choose $n$ items at random, all at once. Let $X$ be the number of special items chosen. Then
$$P(X = k) = \frac{\binom{a}{k}\binom{b}{n-k}}{\binom{N}{n}}$$Why? The bottom counts all equally likely groups of $n$ items. The top counts the groups with exactly $k$ special items and $n - k$ ordinary ones.
You get $P(2) = \dfrac{10\cdot 7}{220} = \dfrac{70}{220}$ and $P(3) = \dfrac{10}{220}$. The numerators satisfy $35 + 105 + 70 + 10 = 220$.
Tool 2: independent trials. If the trials do not affect each other, multiply the probabilities along each path and add the paths that give the same value of $X$.
If the success probabilities involve an unknown $k$ (as in a dart game with zones of probability $k$, $2k$, $3k$), first use "the zones cover everything" to get an equation for $k$. Then build the distribution as above.
A logistics company organizes a darts tournament for its employees. The probability of hitting the red zone is $k$, the blue zone is $2k$ and the white zone is $3k$. If…
A logistics company organizes a darts tournament for its employees. The probability of hitting the red zone is $k$, the blue zone is $2k$ and the white zone is $3k$. If a player throws two darts independently, we define the random variable $X$ as "the number of times the dart hits the red zone".
-
Find the value of $k$ so that the probability distribution is valid (assume that the dart always hits one of the three zones).
-
Obtain the probability function of $X$.
-
Calculate the expected number of hits in the red zone if the employee were to perform $50$ series of two throws each.
In an urn there are $10$ balls numbered from $1$ to $10$. Two balls are drawn simultaneously (without replacement). Let $X$ be the random variable that assigns to each…
In an urn there are $10$ balls numbered from $1$ to $10$. Two balls are drawn simultaneously (without replacement). Let $X$ be the random variable that assigns to each draw the modulus of the difference of the numbers obtained.
-
State the sample space of the experiment and the values that the variable $X$ can take.
-
What is the probability that the difference is maximum?
-
Without constructing the complete table, reason whether $X=1$ or $X=9$ is more probable. Calculate both probabilities.
A civil service 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 civil service 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 that the candidate masters out of the $4$ chosen".
-
Calculate the probability that the candidate does not master any of the chosen topics.
-
Determine the probability that they master exactly $2$ topics.
-
Find the expected value of the variable $X$ and interpret the result in the context of the exam. Is it probable that the candidate will pass if they need to know at least $3$ topics?
Probabilities of events with several values
Once you have the table, add the probabilities of the values you want.
| Words | Symbols |
|---|---|
| at least 2 | $X \ge 2$ |
| at most 2 (no more than 2) | $X \le 2$ |
| fewer than 2 | $X < 2$ |
| more than 2 | $X > 2$ |
| between 1 and 3, inclusive | $1 \le X \le 3$ |
Both ways give $0.60$: $0.35 + 0.15 + 0.10 = 0.60$ and $1 - (0.10 + 0.30) = 0.60$. The complement is faster when the event has many values.
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$ |
- a) $P(X < 30)$
- b) $P(X \le 30)$
- c) $P(20 < X \le 40)$
A survey has been carried out in a high school about the number of siblings of 11th-grade students. From the data, the variable $X$ = "number of siblings" has been…
A survey has been carried out in a high school about the number of siblings of 11th-grade students. From the data, the variable $X$ = "number of siblings" has been defined. The table of relative frequencies (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.
In a workshop specialized in mobile device repair, a study has been carried out on the number of devices a technician is capable of fully repairing in an eight-hour…
In a workshop specialized in mobile device repair, a study has been carried out on the number of devices a technician is capable of fully repairing in an eight-hour working day. Let $X$ be the random variable that expresses this number. The probability function is given by the following table, although one piece of data is missing:
| $x_i$ | $0$ | $1$ | $2$ | $3$ | $4$ |
|---|---|---|---|---|---|
| $P(X=x_i)$ | $0,15$ | $0,25$ | $0,35$ | $k$ | $0,05$ |
- a) Calculate the value of $k$ so that the table represents a legitimate probability distribution.
- b) What is the probability that the technician repairs at least two devices in a working day?
- 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?
The cumulative distribution function
Priya's first question ("at most 2 late deliveries") is a running total. That idea has a name.
Between two values, $F$ stays flat. For example $F(2.7) = F(2)$ because no new probability is added between 2 and 2.7. Also $F(x) = 0$ to the left of the smallest value, and $F(x) = 1$ at and beyond the largest value.
Why? $F(b)$ already includes everything up to $b$. Subtracting $F(a)$ removes everything up to $a$, so only the values after $a$, up to and including $b$, remain.
The sum is $0.30 + 0.25 = 0.55$, and $F(2) - F(0) = 0.85 - 0.30 = 0.55$. They agree.
Let $X$ be a discrete random variable whose cumulative distribution function $F(x)$ is presented below: $$F(x) = \begin{cases} 0 & \text{if } x < 1 \\ 0,2 & \text{if } 1…
Let $X$ be a discrete random variable whose cumulative distribution function $F(x)$ is presented 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}$$- a) From $F(x)$, obtain the probability function $P(X=x_i)$ for each value of the variable.
- b) Calculate the probability $P(2 \le X < 4)$.
- c) Represent the probability function graphically using a bar chart.
The cumulative distribution function $F(x)$ of a discrete random variable $X$ is given by the following graph: From the graph, construct the table for the probability…
The cumulative distribution function $F(x)$ of a discrete random variable $X$ is given by the following graph:
From the graph, construct the table for the probability function $P(X=x_i)$ and calculate the variance $V[X]$. Explain with reasoning the meaning of $P(0,5 < X \le 2)$.
Expected value
Priya's second question: how many late deliveries should she expect on a typical night? Imagine 1,000 Friday nights. About $10\%$ have 0 late deliveries, $30\%$ have 1, and so on. Average them with those weights.
For Priya: $E(X) = 0(0.10) + 1(0.30) + 2(0.35) + 3(0.15) + 4(0.10) = 0 + 0.30 + 0.70 + 0.45 + 0.40 = 1.85$.
The mean is the balance point of the bar chart. Notice that 1.85 is not a value $X$ can actually take. That is fine, because it is an average over many nights.
Games and fairness. In a game, let $X$ be your net gain (winnings minus what you paid). If $E(X) = 0$ the game is fair. If $E(X) < 0$ you lose money in the long run.
Expected values add over repeated plays: $50 \cdot (-1) = -50$. He should expect to lose about $\$50$.
Why? Multiplying every value by $a$ multiplies the average by $a$, and adding $b$ to every value shifts the average by $b$.
A youth association organizes a raffle to finance an end-of-year trip. Tickets are sold for $\$2$. The prize is an Amazon gift card valued at $\$50$. $200$ tickets have…
A youth association organizes a raffle to finance an end-of-year trip. Tickets are sold for $\$2$. The prize is an Amazon gift card valued at $\$50$. $200$ tickets have been issued. Let $X$ be the random variable that defines the net profit of a student who buys a single ticket (taking into account its cost).
- a) Define the sample space of the possible values of $X$.
- b) Determine the probability function of $X$.
- c) Calculate the expected value $E[X]$ and interpret the result obtained. Is it a fair game for the buyer?
A social media content creator analyzes the number of daily "unsubscribes" on their channel. They have found that the probability function of the variable $X$ (number of…
A social media content creator analyzes the number of daily "unsubscribes" on their channel. They have found that the probability function of the variable $X$ (number of unsubscribes) corresponds to the formula $P(X = x) = \frac{k \cdot x}{2^x}$ for $x \in \{1, 2, 3\}$.
-
Find the exact value of the constant $k$.
-
Calculate the probability that there are at least 2 unsubscribes in a day.
-
The creator estimates that each unsubscribe means a loss of $\$5$ in advertising revenue, but gaining a new subscriber brings in $\$8$. If they gain exactly $3$ new subscribers each day, calculate the expected mean profit per day.
Two players, Emma and Ethan, roll a six-sided die. If a prime number is rolled, Emma wins as many dollars as the die indicates. If a composite number is rolled, Ethan…
Two players, Emma and Ethan, roll a six-sided die. If a prime number is rolled, Emma wins as many dollars as the die indicates. If a composite number is rolled, Ethan wins double what the die indicates in dollars. If the number $1$ is rolled, nobody wins anything.
-
Define the random variable $G$ as Emma's net profit in one roll (considering that what Ethan wins is a loss for Emma). Write its probability function.
-
Calculate the expected value of $G$. Who does the game favor in the long run?
-
What amount should Ethan pay Emma every time a composite number is rolled so that the game is fair ($E[G]=0$)?
Variance and standard deviation
Two nights can have the same average and still feel very different. One shop always has about 2 late deliveries. Another has 0 on some nights and 4 on others. The variance and standard deviation measure this spread.
The second form is usually faster: find $E(X^2) = \sum x_i^2 p_i$ and subtract $\mu^2$.
For Priya's shop: $E(X^2) = 0(0.10) + 1(0.30) + 4(0.35) + 9(0.15) + 16(0.10) = 4.65$. So $\sigma^2 = 4.65 - 1.85^2 = 4.65 - 3.4225 = 1.2275$ and $\sigma \approx 1.11$.
You get $\sigma^2 = 4.9 - 2.1^2 = 4.9 - 4.41 = 0.49$ and $\sigma = 0.7$.
A courier company analyzes the number of packages that arrive damaged in each delivery van. After a long period of observation, they have defined the following…
A courier company analyzes the number of packages that arrive damaged in each delivery van. After a long period of observation, they have defined the following probability function for the variable $X$ = "number of damaged packages per trip":
$P(X=x) = \frac{x+1}{15}$ for $x \in \{0, 1, 2, 3, 4\}$
- a) Check that it is indeed a probability function.
- b) Calculate the probability that, at most, $2$ damaged packages arrive on a trip.
- c) Find the mean and standard deviation of the distribution.
In a language app, users can earn between $0$ and $3$ badges daily depending on 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$ badges daily depending on 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.
- a) Write the table for the probability distribution, determining the necessary constant of proportionality.
- b) What is the mean number of badges a user earns per day?
- c) Calculate the variance of the 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:…
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$ |
- a) If the restaurant makes a profit of $\$50$ for each group that attends, but has fixed preparation costs of $\$30$ regardless of how many groups go, define a new variable $Y$ that represents the net profit for Saturday.
- b) Calculate the expected value of $Y$.
- c) Calculate the standard deviation of $X$.
Using the mean and variance to find unknowns
Sometimes two probabilities are unknown, and the problem gives you $E(X)$ (and maybe $\sigma^2$). Write one equation for each fact and solve the system.
-
Sum of probabilities: $p_1 + p_2 + \cdots = 1$
-
Mean: $x_1p_1 + x_2p_2 + \cdots = \mu$
-
Variance: $E(X^2) = \sigma^2 + \mu^2$, so $x_1^2p_1 + x_2^2p_2 + \cdots = \sigma^2 + \mu^2$
Only $X = 2$ lies in the interval, so the probability inside is $0.4$, or $40\%$.
When the problem gives the variance instead, use $E(X^2) = \sigma^2 + \mu^2$ to turn it into a third linear equation in the unknown probabilities.
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$ |
Knowing 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 state what percentage of the total probability is found in the interval $[E[X] - \sigma, E[X] + \sigma]$.
We have a discrete random variable $X$ with the following probability function: $P(X=0) = p$ $P(X=1) = q$ $P(X=2) = 0,2$ If we know that the expected value is…
We have a discrete random variable $X$ with the following probability function:
$P(X=0) = p$
$P(X=1) = q$
$P(X=2) = 0,2$
If we know that the expected value is $E[X] = 0,8$ and the variance is $V[X] = 0,56$, set up a system of equations and calculate the values of $p$ and $q$. Verify that the sum of the probabilities is equal to one.
Back to the pizza shop: the chance of at most 2 late deliveries is $F(2) = 0.75$, and Priya should expect $E(X) = 1.85$ late deliveries on a typical night, give or take about $\sigma \approx 1.11$.