Discrete Probability Distribution (original) (raw)

Last Updated : 24 Jul, 2025

A discrete probability distribution describes the likelihood of each possible outcome for a discrete random variable. A discrete random variable is a variable that can take on a countable number of distinct values, typically whole numbers. In simpler terms, it’s a way to assign a probability to each value that the variable can have, showing how likely each outcome is.

The common examples of discrete probability distributions include Bernoulli, Binomial, Poisson, and Geometric distributions.

**Conditions for the discrete probability distribution are:

  1. The probability of a discrete random variable lies between 0 and 1: **0 ≤ P (X = x) ≤ 1
  2. Sum of Probabilities is always equal to 1: **∑ P (X =x) = 1

Discrete Probability Distribution Example

Let two coins be tossed; then the probability of getting a tail is an example of a discrete probability distribution. The sample space for the given event is {HH, HT, TH, TT}, and let X be the number of tails. Then, the discrete probability distribution table is given by:

x 0 {HH} 1 {HT, TH} 2 {TT}
P (X = x) 1/4 1/2 1/4

Discrete Probability Distribution Formulas

The different formulas for the discrete probability distribution, like the probability mass function, the cumulative distribution function, and the mean and variance, are given below.

PMF of Discrete Probability Distribution

PMF of a discrete random variable X is the value completely equal to x. The PMF i.e., probability mass function of a discrete probability distribution is given by:

**f(x) = P (X = x)

**Example:

A discrete random variable X as the number of heads obtained when tossing two fair coins.

Possible Outcomes:

Then PMFs are given as:

Total Probability : \frac{1}{4}+\frac{1}{2}+\frac{1}{4}=1

**Properties of PMF:

CDF of Discrete Probability Distribution

CDF of a discrete random variable X is less than or equal to value x. The CDF i.e., cumulative distribution function of discrete probability distribution is given by:

**f(x) = P (X ≤ x)

**Example:

A random variable X as the outcome of rolling a fair 4-sided die. To find P(1 < X \leq 3):

X PMF CDF
1 0.2 0.2
2 0.3 0.2+0.3 = 0.5
3 0.2 0.5+0.2 = 0.7
4 0.3 0.7+0.3 = 1

P(1 < X \leq 3) = F(3)−F(1)=0.7−0.2=0.5

Discrete Probability Distribution Mean

Mean of discrete probability distribution is the average of all the values that a discrete variable can obtain. It is also called as the expected value of the discrete probability distribution. The mean of discrete probability distribution is given by:

**E[X] = ∑x P(X =x)

Discrete Probability Distribution Variance

Variance of discrete probability distribution is defined as the product of squared difference of distribution and mean with PMF. The variance of the discrete probability distribution is given by:

**Var[X] = ∑(x - μ) 2 P(X = x)

**Example:

A random variable X as the outcome of rolling a fair 4-sided die. To find P(1 < X \leq 3):

X PMF CDF
1 0.2 0.2
2 0.3 0.2+0.3 = 0.5
3 0.2 0.5+0.2 = 0.7
4 0.3 0.7+0.3 = 1

P(1 < X \leq 3) = F(3)−F(1)=0.7−0.2=0.5

How to Find Discrete Probability Function

Steps to find the discrete probability function are given below:

Types of Discrete Probability Distribution

The different types of discrete probability distribution are listed below.

Bernoulli Distribution

A discrete probability distribution with the probability of success p if the value of random variable is 1 and the probability of failure 1-p if the value of random variable is zero is called the Bernoulli distribution. The probability mass function of the Bernoulli distribution is given by:

**P (X = x) = \bold{\begin{cases}\bold{p, \hspace{0.1cm} x = 1}\\\bold{1-p, \hspace{0.1cm} x = 0}\end{cases}}

Binomial Distribution

A discrete probability distribution that includes the number of trials n, probability of success and probability of failure is called as Binomial distribution. The probability mass function of the Binomial distribution is given by:

**P (X = x) = **n C x p x (1-p) **n-x

Poisson Distribution

A discrete probability distribution that gives the number of events occurred at a specific time period with the help of its mean is called as the Poisson distribution. The probability mass function of Poisson distribution is given by:

**P (X = x) = [ƛ x × e ] / x!

Geometric Distribution

A discrete probability distribution that includes the successive failure probability until the success probability is encountered is called as Geometric distribution. The probability mass function of the geometric distribution is given by:

**P (X = x) = (1 - p) **x p

Application of Discrete Probability Distribution in Computer Science

**Randomized Algorithms

**Packet Loss Modeling (Bernoulli/Binomial)

**Naive Bayes Classifiers (discrete feature modeling)

**Reinforcement Learning (reward distributions)

**Side-Channel Attack Modeling

**Solved Examples on Discrete Probability Distribution

**Example 1: Construct the discrete probability table when a coin is tossed two times and X be random variable representing the number of one head.

**Solution:

Sample space of two coin tossed = 4 i.e., {HH, HT, TH, TT}

X: Number of one head

The below table represents the discrete probability.

X {HT} {TH}
P (X = x) 1 / 4 1/4

**Example 2: Find the value of p from the given discrete probability table.

X 3 4 5 6
P (X = x) 0.1 p 0.2 0.4

**Solution:

To find the value of p we will use the discrete probability condition.

**∑ P (X =x) = 1

0.1 + p + 0.2 + 0.4 = 1

0.7 + p = 1

p = 1 - 0.7

p = 0.3

**Example 3: Find the mean of discrete probability distribution using below table.

X 2 3 4 5
P (X = x) 0.16 0.45 0.32 0.07

**Solution:

To find the mean of discrete probability distribution we use formula:

**E[X] = ∑ [ x P(X =x)]

E[X] = 2 × 0.16 + 3 × 0.45 + 4 × 0.32 + 5 × 0.07

E[X] = 0.32 + 1.35 + 1.28 + 0.35

E[X] = 3.3

**Example 4: If there are 15 pens in which 3 pens are defective and the probability of pen is defective 0.5 then, find the discrete probability of pen to be defective.

**Solution:

To find the required probability we use Binomial Distribution

**P (X = x) = **n C x p x (1-p) **n-x

P (X = 3) = 15C3 p3 (1-p) 15-3

P (X = 3) = 15C3 (0.5)3 (1 - 0.5) 12

P (X = 3) = 455 × (0.5)3 × (0.5) 12

P (X = 3) = 455 × (0.5)15

P (X = 3) = 0.014

**Practice Questions on Discrete Probability Distribution

**Q1. Construct the discrete probability table when a dice is rolled, and X be random variable representing the numbers greater than equal to 3.

**Q2. Find the value of a from the given discrete probability table.

X 0 1 2 4
P (X = x) 0.6 a 0.1 0.3

**Q3. Find the expected value of discrete probability distribution using below table.

X 4 5 6 7
P (X = x) 0.21 0.35 0.42 0.02

**Q4. Determine the probability if the number of trials is 100, number of successes is 94 and the probability of failure is 0.4.