# Discrete Random Variables

In this section, we are going to cover some important Discrete Random Variables. Note that we will be writing **X ~ F to denote that X has distribution F**. Some discrete random variables that we are going to cover are:

- The Point Mass Distribution
- The Discrete Uniform Distribution
- The Bernoulli Distribution
- The Binomial Distribution
- The Geometric Distribution
- The Poisson Distribution

### The Point Mass Distribution

X has a point mass distribution at a, written X ~ δ_{a}, if P(X = a) = 1 in which case

The probability function is f(x) = 1 for x = a and 0 otherwise.

### The Discrete Uniform Distribution

Let k > 1 be a given integer,We say that X has a uniform distribution on {1, …., k}if X has probability mass function given by

### The Bernoulli Distribution

Let X represent a binary coin flip. Then P(X = 1) = p and P(X = 0) = 1 – p for some p ∈ [0, 1].

X has a Bernoulli distribution written X ~ Bernoulli(p) withprobability function asf(x) = p

^{x}(1 – p)^{1 – x}for x ∈ {0, 1}

Note that Bernoulli distribution has only two possible outcomes, either a success or a failure( You can consider head or success and tail as failure). The probability function can also be expressed as,

f(x) = p*x + (1 – p)(1 – x)

To get intuitions, lets put values of x and check the outcome.

For discrete P(X = 1) = f_{X}(1) = p^{1}(1 – p)^{0} = p

P(X = 0) = f_{X}(0) = p^{0}(1 – p)^{1} = 1 – p

We can see that we get the desired value P(X=1) = p and P(X = 0) = 1 -p

### The Binomial Distribution

Suppose we have a coin that falls head with a probability p. For n flips, let the random variable X determine the number of heads. Then, this X is considered to follow a binomial distribution.

X ~ Binomial(n, p) with mass function

f(x) =^{n}C_{x }p^{x}(1 – p)^{n-x}for x = 0, . . . , n

0 otherwise

Binomial distribution for n=1 is Bernoulli distribution. Bernoulli’s experiment when conducted repeatedly with replacement results in Binomial distribution.**Here n and p are parameters whereas x is a value of X.**

Let us understand the probability mass function of the binomial distribution. As stated, consider X as the number of heads/success (outcome with probability p) for n flips/outcomes.

As we know for discrete distributions P(X = x) = f_{X}(x)

Therefore we need to calculate the probability of x heads in total n outcomes. Since the events are independent, we simply need to multiply after choosing x outcomes from the total(n). This yields to the mathematical formula^{n}**C**_{x }**p**^{x}**(1 – p)**^{n-x}

x out of n (^{n}_{x}) outcomes are chosen and the probability of them being head is derived (**p**^{x}). Rest of them (n – x) must be tail (**(1 – p)**^{n-x}).

Here are Probability mass function and Cumulative distribution function for Binomial Distribution.

### The Geometric Distribution

X has a geometric distribution with parameter p ∈ (0, 1), written X ~ Geom(p), if

P(X = k) = p (1 – p)^{k – 1}, k ≥ 1

Think of X as the number of flips needed until the first head when flipping a coin. So if k flips are needed to get the first head, definitely the previous k – 1 flips are tail. Therefore, the probability of k – 1 tail is (1 – p)^{k – 1} along with last head p.

Notice the behavior of PMF according to the probability of head. For p = 0.2 i.e. low probability of getting head, the chance that we might need 1 toss to get head is less whereas that of p=0.8 is high but as we go further the nature of the curves changes. The probability of getting head on the fourth toss is higher for p=0.2 and lower for p=0.8. Note an interesting property that the chance of getting a head on second toss (and tail on first) is the same for p=0.2 and p=0.8. You can calculate the same from the formula.

### The Poisson Distribution

X has a Poisson distribution with parameter λ, written X ~ Poisson(λ) if

Here *λ* is the event rate/rate parameter. Poisson is often used for count of rare events like traffic accidents and radioactive decay.

Let us suppose that the average number of goals in a FIFA match is 2.5. Therefore *λ* = 2.5 and according to Poisson distribution,

P( k goals in a match) = f_{X}(k) = e ^{–λ} * *λ*^{x}/x!

k | P(k goals in a FIFA match) |
---|---|

0 | 0.082 |

1 | 0.205 |

2 | 0.257 |

3 | 0.213 |

4 | 0.133 |

5 | 0.067 |

6 | 0.028 |

7 | 0.010 |