If a random variable *X* is discrete, i.e. it may take any of a specific set of *n* values *xi*, *i* = 1 to *n*, then:

*P*(*X*=*x _{i}*) =

*p*(

*x*)

_{i}*p(x)* is called the *probability mass function*

Note that | \displaystyle\sum_{i=1}^{n} p( x_i)=1 |

and | \displaystyle\sum_{i=1}^{k} p( x_i) |

*For example, if a coin is tossed 3 times, the number of observed heads is discrete. The possible values of xi are:*

In ModelAssist we use the notation f(x) and p(x) interchangeably for a probability mass function.