9 minutes read

Before diving into theory: if two six-sided fair dice are tossed, on which sum will you bet? Does each sum value has an equal probability or are their probabilities distributed differently?

We know that usually some of the results of a probabilistic experiment are more likely to happen. Similarly, some values of our discrete random variable can occur with a higher probability. To distribute each possible value of the discrete random variable according to their likelihood, we will use Probability Mass Function, or in short PMF. We will be able to draw a plot of the values of discrete random variables with respect to their PMF.

What is PMF and where do we need it?

Let's imagine that you were given two six-sided fair dice to toss. You were asked to calculate and plot the sum of those dice values with regard to their probability of occurrence.

The plot will help us see which sum is more likely to happen. We will also see how all the sum values are distributed according to their probability. In order to plot this graph, let's reimagine the problem by using a discrete random variable. We will assign a PMF to each value of that discrete random variable.

We could represent the values of each dice as a discrete random variable. The combination of random variables also gives a random variable. The values of dice's sum can be represented as values of a new discrete random variable.

PMF shows the probability of different possible values of our discrete random variable. The PMF sometimes is also called ''probability law'' or ''probability distribution'' of a discrete random variable. The PMF is associated only with discrete random variables. We can't utilize PMF in the case of continuous random variables.

Let's specify the notation that we will use. Uppercase letters such as XX, YY, ZZ, serve to represent discrete random variables. Lowercase letters such as xx, yy, zz, represent values of discrete random variables.

The formula for the PMF is the following:

pX(x)=P(X=x)=P({ωΩsuchthatX(ω)=x})p_X(x) = P(X=x) = P(\{\omega \in \Omega \hspace{0.2cm} such \hspace{0.1cm} that \hspace{0.2cm} X(\omega)=x\})

Here

  • pX(x)p_X(x) is probability mass function (PMF) notation;

  • P(X=x)P(X=x) is the probability of the event that discrete random variable XX takes particular values (for the fixed xx value, X=xX=x is an event).

Formally, PMF is the probability of all outcomes (ωΩ\omega \in \Omega), for which the numerical value of our discrete random variable is xx. An xx is the argument of PMF. It ranges over the possible values of the discrete random variable XX. In this sense, we can clearly state that PMF is a function. That is the reason it is denoted as pX(x)p_X(x).

The required PMF properties are:

  • 0pX(x)10 \leq p_X(x) \leq 1: PMF is a probability, it must be greater than or equal to 0 for all xx values in a discrete random variable XX. (Nonnegativity axiom – all probabilities are non-negative)

  • xpX(x)=1\sum_{x} p_X(x) = 1: PMF values of all xx in a discrete random variable XX sum up to one. (Normalization axiom – the probability of a sample space is equal to one)

PMF calculation steps

Let's break down PMF calculation into several small steps.

We start by representing our experiment in terms of discrete random variables.

Before starting to calculate the PMF, we have to:

  • specify the sample space (Ω\Omega) of our experiment;

  • specify the probability law for our experiment.

Only after that, we will be able to associate a PMF to a discrete random variable.

To calculate PMF for some arbitrary discrete random variable XX means to calculate pX(x)p_X(x) for all possible values of xx in the range of the discrete random variable XX. Simply put, we need to repeat PMF calculation for all possible xx in a given discrete random variable XX.

The next step is to make sure that our calculations meet the properties that are required for PMF.

Finally, we could produce a PMF plot as pX(x)p_X(x)'s for all possible xx values and hence distribute the probabilities for each possible xx.

PMF calculations for the sums of two fair dice in a single toss

Let's go back to our main task. We have two six-sided fair dice to toss and need to plot the sum of those dice with regard to their occurrence probability. In other words, we need to plot probability distribution (PMF) values of the sum of two six-sided fair dice on a graph. We will follow the calculation steps explained above.

Step 1: represent our experiment in terms of discrete random variables.

We will represent this problem in terms of discrete random variables as:

  • XX will be a discrete random variable for the first die with values x{1,2,3,4,5,6}x\in\{1,2,3,4,5,6\};

  • YY will be a discrete random variable for the second die with values y{1,2,3,4,5,6}y\in\{1,2,3,4,5,6\};

  • Z=X+YZ=X+Y, where ZZ will be the sum of the first and the second die, also a discrete random variable with values z{2,3,4,5,6,7,8,9,10,11,12}z\in\{2,3,4,5,6,7,8,9,10,11,12\}.

To see a clearer picture, let's illustrate it as a table:

table of sums of numbers from 1 to 6

Step 2: specify the sample space (Ω\Omega) of our experiment.

From the table above, we can see that all possible choices consist of 36 values (6 x 6) total, which are {2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12}\{2,3,4,5,6,7,3,4,5,6,7,8,4,5,6,7,8,9,5,6,7,8,9,10,6,7,8,9,10,11,7,8,9,10,11,12\}Based on those choices, our Sample Space (Ω\Omega) for the sum of two dice will be the following:

Ω={(1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),(5,1),(5,2),(5,3),(5,4),(5,5),(5,6),(6,1),(6,2),(6,3),(6,4),(6,5),(6,6)}\Omega=\{(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6) ,\\ (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),\\ (3, 1) , (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), \\(4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6),\\ (5, 1),(5, 2), (5, 3), (5, 4), (5, 5), (5, 6), \\(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)\}

Step 3: specify the probability law for our experiment.

Since we were told that both dice are fair, we will use the Discrete Uniform Law. The Discrete Uniform Law states that each element in a finite sample space is equally likely to happen. It means each element in our sample space has a probability of 136\frac{1}{36}, since our sample space consists of 36 elements.

Step 4: associate a PMF to a discrete random variable.

The probability of each element in our Sample Space (Ω\Omega) is 136\frac{1}{36}. Now, let's apply the formula for the PMF for each value z{2,3,4,5,6,7,8,9,10,11,12}z\in\{2,3,4,5,6,7,8,9,10,11,12\} in our discrete random variable ZZ as:

pZ(z)=P(Z=z)=P({ωΩ such thatZ(ω)=z})p_Z(z) = P(Z=z) = P(\{\omega \in \Omega\ such\ that Z(\omega)=z\})

Step 5: repeat PMF calculation.

We will repeat the PMF calculation for all possible zz values as:

pZ(2)=P(Z=2)=136whenz=2p_Z(2) = P(Z=2)=\frac{1}{36} \hspace{0.2cm} when \hspace{0.2cm} z=2

pZ(3)=P(Z=3)=236whenz=3p_Z(3) = P(Z=3)=\frac{2}{36} \hspace{0.2cm} when \hspace{0.2cm} z=3

pZ(4)=P(Z=4)=336whenz=4p_Z(4) = P(Z=4)=\frac{3}{36} \hspace{0.2cm} when \hspace{0.2cm} z=4

pZ(5)=P(Z=5)=436whenz=5p_Z(5) = P(Z=5)=\frac{4}{36} \hspace{0.2cm} when \hspace{0.2cm} z=5

pZ(6)=P(Z=6)=536whenz=6p_Z(6) = P(Z=6)=\frac{5}{36} \hspace{0.2cm} when \hspace{0.2cm} z=6

pZ(7)=P(Z=7)=636whenz=7p_Z(7) = P(Z=7)=\frac{6}{36} \hspace{0.2cm} when \hspace{0.2cm} z=7

pZ(8)=P(Z=8)=536whenz=8p_Z(8) = P(Z=8)=\frac{5}{36} \hspace{0.2cm} when \hspace{0.2cm} z=8

pZ(9)=P(Z=9)=436whenz=9p_Z(9) = P(Z=9)=\frac{4}{36} \hspace{0.2cm} when \hspace{0.2cm} z=9

pZ(10)=P(Z=10)=336whenz=10p_Z(10) = P(Z=10)=\frac{3}{36} \hspace{0.2cm} when \hspace{0.2cm} z=10

pZ(11)=P(Z=11)=236whenz=11p_Z(11) = P(Z=11)=\frac{2}{36} \hspace{0.2cm} when \hspace{0.2cm} z=11

pZ(12)=P(Z=12)=136whenz=12p_Z(12) = P(Z=12)=\frac{1}{36} \hspace{0.2cm} when \hspace{0.2cm} z=12

Step 6: make sure that our calculations match properties that are required for PMF.

Let's check if our calculations match PMF's required properties:

  • All of pZ(z)0p_Z(z) \geq 0. We can see that all our calculations of PMF (pZ(z)p_Z(z)) values, where z{2,3,4,5,6,7,8,9,10,11,12}z\in\{2,3,4,5,6,7,8,9,10,11,12\} are greater than zero. That means we meet this requirement.

  • Probability of all values z in our discrete random variable ZZ sum up to one as: zpZ(z)=1\sum_z p_Z(z)= 1

Let's check it:

zpZ(z)=pZ(2)+pZ(3)+pZ(4)+pZ(5)+pZ(6)+pZ(7)+pZ(8)+pZ(9)+pZ(10)+pZ(11)+pZ(12)\sum_z p_Z(z) = p_Z(2) + p_Z(3) + p_Z(4) + p_Z(5) + p_Z(6) + p_Z(7) + p_Z(8) + p_Z(9) + p_Z(10) + p_Z(11) + p_Z(12)

And calculate:

zpZ(z)=136+236+336+436+536+636+536+436+336+236+136=3636=1\sum_z p_Z(z) = \frac{1}{36} + \frac{2}{36} + \frac{3}{36} + \frac{4}{36} + \frac{5}{36} + \frac{6}{36} + \frac{5}{36} + \frac{4}{36} + \frac{3}{36} + \frac{2}{36} + \frac{1}{36} = \frac{36}{36} = 1

Once again, we meet the required property for the PMF.

Step 7: produce a PMF plot.

Now we can plot a graph. Values, z{2,3,4,5,6,7,8,9,10,11,12}z\in\{2,3,4,5,6,7,8,9,10,11,12\}, of our discrete random variable ZZ, are plotted based on their PMF values.

pmf graph in the form of a gaussian

Conclusion

Let's summarize the concepts we have learned in this topic.

  • Probability Mass Function (PMF) is also called ''probability law'' or ''probability distribution''. It gives us the probability of different possible values of our discrete random variable.

  • Mathematically speaking, the PMF is the probability of all outcomes for which the numerical value of our discrete random variable is xx, where xx is the argument of the PMF, and it ranges over the possible values of the random variable XX.

  • Two required properties of PMF: since PMF is a probability, it must be greater than or equal to 0 for all xx values in XX. PMF values of all xx in a discrete random variable XX sum up to one.

  • PMF values are used to plot a graph showing the distribution of probabilities of each value in a discrete random variable.

  • PMF can be used only with discrete random variables and can't be used with continuous random variables.

5 learners liked this piece of theory. 1 didn't like it. What about you?
Report a typo