Open In App

Discrete Probability Distribution

Last Updated : 24 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

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:

  • HH → 2 heads
  • HT, TH → 1 head
  • TT → 0 heads

Then PMFs are given as:

  • P(X=0) = \frac{1}{4} → Only TT
  • P(X=1) = \frac{2}{4} HT or TH
  • P(X=2) = \frac{1}{4} → Only HH

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

Properties of PMF:

  • The sum of all probabilities must always equal 1. i.e. \sum P(X = x) = 1
  • P(X = x) ≥ 0

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:

  • Step 1: First determine the sample space of the given event.
  • Step 2: Define random variable X as the event for which the probability has to be found.
  • Step 3: Consider the possible values of x and find the probabilities for each value.
  • Step 4: Write all the values of x and their respective probabilities in tabular form to get the discrete probability distribution.

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) = nCx px (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) xp

Application of Discrete Probability Distribution in Computer Science

Randomized Algorithms

  • Algorithms that use random numbers to make decisions during execution.
  • Discrete Distribution is used in Uniform distribution for selecting random pivots.
  • Use: QuickSort, randomly selecting a pivot (uniformly from array indices) helps avoid worst-case O(n²) scenarios.

Packet Loss Modeling (Bernoulli/Binomial)

  • Modeling whether individual network packets are successfully transmitted.
  • Discrete Distribution application is in Bernoulli for single packet loss (success/failure) and Binomial for total lost packets in n transmissions.
  • Use: Network reliability analysis, TCP retransmission strategy optimization and QoS (Quality of Service) prediction in VoIP/video streaming.

Naive Bayes Classifiers (discrete feature modeling)

  • Probabilistic classifier based on Bayes' theorem with feature independence assumption.
  • Discrete Distribution is used to find word counts in text (Multinomial distribution) and Bernoulli for binary features.
  • Use: Spam detection (word occurrence probabilities), Document categorization, Sentiment analysis, etc.

Reinforcement Learning (reward distributions)

  • Learning optimal actions through rewards/punishments.
  • Geometric distribution for time-to-reward and Poisson for sparse reward scenarios.
  • Use: Game AI (e.g., AlphaGo), Robotics control systems and Recommendation systems

Side-Channel Attack Modeling

  • Exploiting indirect information leaks (timing, power consumption).
  • Binomial distribution used for success rate of guesses and Poisson for timing attack attempts.
  • Use: Cryptographic system vulnerability assessment, Hardware security module design and Countermeasure development against power analysis attacks.

Related Articles:

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) = nCx px (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.


Similar Reads