100% FREE Updated: Mar 2026 Probability Theory Random Variables and Distributions

Random Variables

Comprehensive study notes on Random Variables for CMI M.Sc. and Ph.D. Computer Science preparation. This chapter covers key concepts, formulas, and examples needed for your exam.

Random Variables

This chapter introduces the fundamental concept of random variables, transforming experimental outcomes into numerical values for rigorous analysis. Mastery of this topic is crucial for comprehending subsequent advanced probability concepts and is frequently assessed in examinations through problems involving their definitions, distributions, and transformations.

---

Chapter Contents

|

| Topic |

|---|-------| | 1 | Discrete Random Variables |

---

We begin with Discrete Random Variables.

Part 1: Discrete Random Variables

This section introduces discrete random variables, their distributions, and fundamental properties essential for analyzing probabilistic systems in computer science. We focus on applying these concepts to solve problems.

---

Core Concepts

1. Random Variable (RV)

A random variable is a function that maps outcomes from a sample space to real numbers. We denote random variables by capital letters, e.g., XX.

πŸ“– Random Variable

A random variable XX is a function X:S→RX: S \to \mathbb{R}, where SS is the sample space of a probability experiment.

Worked Example:

Consider tossing a fair coin three times. Let XX be the number of heads. We define the sample space and the value of XX for each outcome.

Step 1: Define the sample space SS.

>

S={HHH,HHT,HTH,THH,HTT,THT,TTH,TTT}S = \{HHH, HHT, HTH, THH, HTT, THT, TTH, TTT\}

Step 2: Map each outcome to a real number representing the number of heads.

> X(HHH)=3X(HHH) = 3
> X(HHT)=2X(HHT) = 2
> X(HTH)=2X(HTH) = 2
> X(THH)=2X(THH) = 2
> X(HTT)=1X(HTT) = 1
> X(THT)=1X(THT) = 1
> X(TTH)=1X(TTH) = 1
> X(TTT)=0X(TTT) = 0

Answer: The set of possible values for XX is {0,1,2,3}\{0, 1, 2, 3\}.

:::question type="MCQ" question="A fair six-sided die is rolled twice. Let XX be the sum of the two rolls. What is the range of XX?" options=["{1,2,…,6}\{1, 2, \dots, 6\}","{2,3,…,12}\{2, 3, \dots, 12\}","{1,2,…,12}\{1, 2, \dots, 12\}","{0,1,…,6}\{0, 1, \dots, 6\}"] answer="{2,3,…,12}\{2, 3, \dots, 12\}" hint="Consider the minimum and maximum possible sums." solution="The minimum sum occurs when both rolls are 1, so 1+1=21+1=2. The maximum sum occurs when both rolls are 6, so 6+6=126+6=12. All integer values between 2 and 12 are possible. Therefore, the range of XX is {2,3,…,12}\{2, 3, \dots, 12\}."
:::

---

2. Discrete Random Variable

A random variable is discrete if its range (the set of possible values it can take) is finite or countably infinite.

πŸ“– Discrete Random Variable

A random variable XX is discrete if the set of its possible values, RX={x∈R∣X(s)=x for some s∈S}R_X = \{x \in \mathbb{R} \mid X(s) = x \text{ for some } s \in S\}, is countable.

Worked Example:

Determine if the following random variables are discrete.

Step 1: Define X1X_1 as the number of heads in 10 coin tosses.

> The possible values for X1X_1 are {0,1,2,…,10}\{0, 1, 2, \dots, 10\}. This set is finite. Thus, X1X_1 is a discrete random variable.

Step 2: Define X2X_2 as the time (in minutes) until the first customer arrives at a store.

> The possible values for X2X_2 are any non-negative real number, e.g., [0,∞)[0, \infty). This set is uncountable. Thus, X2X_2 is not a discrete random variable; it is continuous.

Answer: X1X_1 is discrete, X2X_2 is continuous.

:::question type="MCQ" question="Which of the following describes a discrete random variable?" options=["The exact height of a randomly selected student.","The temperature of a room in Celsius.","The number of cars passing a certain point on a road in an hour.","The time it takes for a computer program to execute."] answer="The number of cars passing a certain point on a road in an hour." hint="A discrete random variable takes on a finite or countably infinite number of values." solution="The number of cars is a count, which can only be integer values (0, 1, 2, ...). This is a countably infinite set. Heights, temperatures, and execution times can take on any real value within a range, making them continuous."
:::

---

3. Probability Mass Function (PMF)

The PMF of a discrete random variable XX gives the probability that XX takes on a specific value xx.

πŸ“ Probability Mass Function (PMF)

For a discrete random variable XX, its PMF, denoted pX(x)p_X(x) or P(X=x)P(X=x), satisfies:

  • pX(x)β‰₯0p_X(x) \ge 0 for all x∈RXx \in R_X.

  • βˆ‘x∈RXpX(x)=1\sum_{x \in R_X} p_X(x) = 1.

Worked Example:

A biased coin has P(H)=0.6P(H) = 0.6. It is flipped twice. Let XX be the number of heads. Find the PMF of XX.

Step 1: List all possible outcomes and their probabilities.

> S={HH,HT,TH,TT}S = \{HH, HT, TH, TT\}
> P(HH)=0.6Γ—0.6=0.36P(HH) = 0.6 \times 0.6 = 0.36
> P(HT)=0.6Γ—0.4=0.24P(HT) = 0.6 \times 0.4 = 0.24
> P(TH)=0.4Γ—0.6=0.24P(TH) = 0.4 \times 0.6 = 0.24
> P(TT)=0.4Γ—0.4=0.16P(TT) = 0.4 \times 0.4 = 0.16

Step 2: Determine the values XX can take and their corresponding probabilities.

> X=0X=0: occurs for TTTT. pX(0)=P(X=0)=P(TT)=0.16p_X(0) = P(X=0) = P(TT) = 0.16
> X=1X=1: occurs for HT,THHT, TH. pX(1)=P(X=1)=P(HT)+P(TH)=0.24+0.24=0.48p_X(1) = P(X=1) = P(HT) + P(TH) = 0.24 + 0.24 = 0.48
> X=2X=2: occurs for HHHH. pX(2)=P(X=2)=P(HH)=0.36p_X(2) = P(X=2) = P(HH) = 0.36

Step 3: Verify the PMF properties.

> All pX(x)β‰₯0p_X(x) \ge 0.
> βˆ‘pX(x)=0.16+0.48+0.36=1.00\sum p_X(x) = 0.16 + 0.48 + 0.36 = 1.00.

Answer: The PMF is pX(0)=0.16p_X(0)=0.16, pX(1)=0.48p_X(1)=0.48, pX(2)=0.36p_X(2)=0.36.

:::question type="NAT" question="A box contains 3 red balls and 2 blue balls. Two balls are drawn without replacement. Let XX be the number of red balls drawn. What is P(X=1)P(X=1)?" answer="0.6" hint="Calculate the total number of ways to draw 2 balls and the number of ways to draw 1 red and 1 blue ball." solution="Step 1: Calculate the total number of ways to draw 2 balls from 5.
>

(52)=5Γ—42Γ—1=10\binom{5}{2} = \frac{5 \times 4}{2 \times 1} = 10

Step 2: Calculate the number of ways to draw 1 red ball from 3 and 1 blue ball from 2.
>
(31)Γ—(21)=3Γ—2=6\binom{3}{1} \times \binom{2}{1} = 3 \times 2 = 6

Step 3: Calculate P(X=1)P(X=1).
>
P(X=1)=NumberΒ ofΒ waysΒ toΒ drawΒ 1Β redΒ andΒ 1Β blueTotalΒ numberΒ ofΒ ways=610=0.6P(X=1) = \frac{\text{Number of ways to draw 1 red and 1 blue}}{\text{Total number of ways}} = \frac{6}{10} = 0.6

Answer: 0.6"
:::

---

4. Cumulative Distribution Function (CDF)

The CDF of a random variable XX gives the probability that XX takes on a value less than or equal to xx.

πŸ“ Cumulative Distribution Function (CDF)

For a discrete random variable XX, its CDF, denoted FX(x)F_X(x), is defined as:

FX(x)=P(X≀x)=βˆ‘t≀xpX(t)F_X(x) = P(X \le x) = \sum_{t \le x} p_X(t)

Properties:
  • 0≀FX(x)≀10 \le F_X(x) \le 1

  • FX(x)F_X(x) is non-decreasing: if a<ba < b, then FX(a)≀FX(b)F_X(a) \le F_X(b).

  • lim⁑xβ†’βˆ’βˆžFX(x)=0\lim_{x \to -\infty} F_X(x) = 0

  • lim⁑xβ†’βˆžFX(x)=1\lim_{x \to \infty} F_X(x) = 1

  • FX(x)F_X(x) is right-continuous.

Worked Example:

Using the PMF from the previous example (pX(0)=0.16,pX(1)=0.48,pX(2)=0.36p_X(0)=0.16, p_X(1)=0.48, p_X(2)=0.36), find the CDF FX(x)F_X(x).

Step 1: Calculate FX(x)F_X(x) for values less than the smallest possible XX.

> For x<0x < 0, FX(x)=P(X≀x)=0F_X(x) = P(X \le x) = 0.

Step 2: Calculate FX(x)F_X(x) for xx between 0 and 1 (inclusive of 0).

> For 0≀x<10 \le x < 1, FX(x)=P(X≀x)=pX(0)=0.16F_X(x) = P(X \le x) = p_X(0) = 0.16.

Step 3: Calculate FX(x)F_X(x) for xx between 1 and 2 (inclusive of 1).

> For 1≀x<21 \le x < 2, FX(x)=P(X≀x)=pX(0)+pX(1)=0.16+0.48=0.64F_X(x) = P(X \le x) = p_X(0) + p_X(1) = 0.16 + 0.48 = 0.64.

Step 4: Calculate FX(x)F_X(x) for xβ‰₯2x \ge 2.

> For xβ‰₯2x \ge 2, FX(x)=P(X≀x)=pX(0)+pX(1)+pX(2)=0.16+0.48+0.36=1F_X(x) = P(X \le x) = p_X(0) + p_X(1) + p_X(2) = 0.16 + 0.48 + 0.36 = 1.

Answer: The CDF is:

FX(x)={0x<00.160≀x<10.641≀x<21xβ‰₯2F_X(x) = \begin{cases} 0 & x < 0 \\ 0.16 & 0 \le x < 1 \\ 0.64 & 1 \le x < 2 \\ 1 & x \ge 2 \end{cases}

:::question type="MCQ" question="A discrete random variable YY has the following PMF: P(Y=1)=0.2P(Y=1)=0.2, P(Y=2)=0.6P(Y=2)=0.6, P(Y=3)=0.2P(Y=3)=0.2. What is FY(2.5)F_Y(2.5)?" options=["0.2","0.6","0.8","1.0"] answer="0.8" hint="The CDF FY(x)F_Y(x) is the sum of probabilities for all values less than or equal to xx." solution="Step 1: Recall the definition of CDF.
>

FY(2.5)=P(Y≀2.5)F_Y(2.5) = P(Y \le 2.5)

Step 2: Sum the probabilities for YY values less than or equal to 2.5. The possible values of YY that are less than or equal to 2.5 are Y=1Y=1 and Y=2Y=2.
>
FY(2.5)=P(Y=1)+P(Y=2)F_Y(2.5) = P(Y=1) + P(Y=2)

>
FY(2.5)=0.2+0.6=0.8F_Y(2.5) = 0.2 + 0.6 = 0.8

Answer: 0.8"
:::

---

5. Expected Value (Mean)

The expected value, or mean, of a discrete random variable XX is the weighted average of its possible values, with weights given by their probabilities. It represents the long-run average value of the variable.

πŸ“ Expected Value

For a discrete random variable XX with PMF pX(x)p_X(x), the expected value E[X]E[X] is:

E[X]=βˆ‘x∈RXxβ‹…pX(x)E[X] = \sum_{x \in R_X} x \cdot p_X(x)

Linearity of Expectation: For any constants a,ba, b and random variables X,YX, Y:
  • E[aX+b]=aE[X]+bE[aX + b] = aE[X] + b

  • E[X+Y]=E[X]+E[Y]E[X + Y] = E[X] + E[Y] (holds even if X,YX, Y are not independent)

Worked Example:

A fair six-sided die is rolled. Let XX be the outcome. Calculate E[X]E[X].

Step 1: Define the PMF of XX.

> The possible outcomes are RX={1,2,3,4,5,6}R_X = \{1, 2, 3, 4, 5, 6\}.
> For a fair die, pX(x)=16p_X(x) = \frac{1}{6} for each x∈RXx \in R_X.

Step 2: Apply the expected value formula.

>

E[X]=βˆ‘x=16xβ‹…pX(x)E[X] = \sum_{x=1}^{6} x \cdot p_X(x)

>
E[X]=1β‹…16+2β‹…16+3β‹…16+4β‹…16+5β‹…16+6β‹…16E[X] = 1 \cdot \frac{1}{6} + 2 \cdot \frac{1}{6} + 3 \cdot \frac{1}{6} + 4 \cdot \frac{1}{6} + 5 \cdot \frac{1}{6} + 6 \cdot \frac{1}{6}

>
E[X]=16(1+2+3+4+5+6)E[X] = \frac{1}{6} (1 + 2 + 3 + 4 + 5 + 6)

>
E[X]=216=3.5E[X] = \frac{21}{6} = 3.5

Answer: E[X]=3.5E[X] = 3.5.

:::question type="NAT" question="A game involves rolling a fair four-sided die. If the roll is 1, you lose 5.Ifitβ€²s2or3,youwin5. If it's 2 or 3, you win2. If it's 4, you win 10.Let10. Let X beyournetwinnings.Whatisbe your net winnings. What is E[X]?"answer="2.25"hint="First,determinethePMFof?" answer="2.25" hint="First, determine the PMF of X .Thenapplytheexpectedvalueformula."solution="βˆ—βˆ—Step1:βˆ—βˆ—Determinethepossiblevaluesof. Then apply the expected value formula." solution="Step 1: Determine the possible values of X $ and their probabilities (PMF).
> X=βˆ’5X=-5 if roll is 1. P(X=βˆ’5)=1/4=0.25P(X=-5) = 1/4 = 0.25
> X=2X=2 if roll is 2 or 3. P(X=2)=2/4=0.50P(X=2) = 2/4 = 0.50
> X=10X=10 if roll is 4. P(X=10)=1/4=0.25P(X=10) = 1/4 = 0.25
Step 2: Calculate E[X]E[X] using the PMF.
>

E[X]=(βˆ’5)(0.25)+(2)(0.50)+(10)(0.25)E[X] = (-5)(0.25) + (2)(0.50) + (10)(0.25)

>
E[X]=βˆ’1.25+1.00+2.50E[X] = -1.25 + 1.00 + 2.50

>
E[X]=2.25E[X] = 2.25

Answer: 2.25"
:::

---

6. Variance

The variance of a discrete random variable XX measures the spread or dispersion of its values around the mean. A higher variance indicates greater variability.

πŸ“ Variance

For a discrete random variable XX with mean E[X]=μE[X] = \mu, the variance Var⁑(X)\operatorname{Var}(X) is:

Var⁑(X)=E[(Xβˆ’ΞΌ)2]=βˆ‘x∈RX(xβˆ’ΞΌ)2pX(x)\operatorname{Var}(X) = E[(X - \mu)^2] = \sum_{x \in R_X} (x - \mu)^2 p_X(x)

An equivalent and often more convenient formula is:
Var⁑(X)=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2

Properties: For any constants a,ba, b:
  • Var⁑(aX+b)=a2Var⁑(X)\operatorname{Var}(aX + b) = a^2 \operatorname{Var}(X)

  • Var⁑(b)=0\operatorname{Var}(b) = 0

Worked Example:

Using the biased coin example where XX is the number of heads in two flips, with PMF pX(0)=0.16,pX(1)=0.48,pX(2)=0.36p_X(0)=0.16, p_X(1)=0.48, p_X(2)=0.36. We previously found E[X]=0β‹…0.16+1β‹…0.48+2β‹…0.36=0+0.48+0.72=1.2E[X] = 0 \cdot 0.16 + 1 \cdot 0.48 + 2 \cdot 0.36 = 0 + 0.48 + 0.72 = 1.2. Calculate Var⁑(X)\operatorname{Var}(X).

Step 1: Calculate E[X2]E[X^2].

>

E[X2]=βˆ‘x∈RXx2β‹…pX(x)E[X^2] = \sum_{x \in R_X} x^2 \cdot p_X(x)

>
E[X2]=(02)(0.16)+(12)(0.48)+(22)(0.36)E[X^2] = (0^2)(0.16) + (1^2)(0.48) + (2^2)(0.36)

>
E[X2]=0β‹…0.16+1β‹…0.48+4β‹…0.36E[X^2] = 0 \cdot 0.16 + 1 \cdot 0.48 + 4 \cdot 0.36

>
E[X2]=0+0.48+1.44=1.92E[X^2] = 0 + 0.48 + 1.44 = 1.92

Step 2: Apply the variance formula Var⁑(X)=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2.

> We know E[X]=1.2E[X] = 1.2.
>

Var⁑(X)=1.92βˆ’(1.2)2\operatorname{Var}(X) = 1.92 - (1.2)^2

>
Var⁑(X)=1.92βˆ’1.44\operatorname{Var}(X) = 1.92 - 1.44

>
Var⁑(X)=0.48\operatorname{Var}(X) = 0.48

Answer: Var⁑(X)=0.48\operatorname{Var}(X) = 0.48.

:::question type="MCQ" question="Let XX be a discrete random variable with PMF P(X=1)=0.5P(X=1)=0.5 and P(X=2)=0.5P(X=2)=0.5. What is Var⁑(X)\operatorname{Var}(X)?" options=["0.125","0.25","0.5","1.0"] answer="0.25" hint="First calculate E[X]E[X] and E[X2]E[X^2]." solution="Step 1: Calculate E[X]E[X].
>

E[X]=(1)(0.5)+(2)(0.5)=0.5+1.0=1.5E[X] = (1)(0.5) + (2)(0.5) = 0.5 + 1.0 = 1.5

Step 2: Calculate E[X2]E[X^2].
>
E[X2]=(12)(0.5)+(22)(0.5)=(1)(0.5)+(4)(0.5)=0.5+2.0=2.5E[X^2] = (1^2)(0.5) + (2^2)(0.5) = (1)(0.5) + (4)(0.5) = 0.5 + 2.0 = 2.5

Step 3: Calculate Var⁑(X)\operatorname{Var}(X).
>
Var⁑(X)=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2

>
Var⁑(X)=2.5βˆ’(1.5)2\operatorname{Var}(X) = 2.5 - (1.5)^2

>
Var⁑(X)=2.5βˆ’2.25\operatorname{Var}(X) = 2.5 - 2.25

>
Var⁑(X)=0.25\operatorname{Var}(X) = 0.25

Answer: 0.25"
:::

---

7. Standard Deviation

The standard deviation is the square root of the variance. It provides a measure of spread in the same units as the random variable itself, making it easier to interpret than variance.

πŸ“ Standard Deviation

For a discrete random variable XX, the standard deviation ΟƒX\sigma_X is:

ΟƒX=Var⁑(X)\sigma_X = \sqrt{\operatorname{Var}(X)}

Worked Example:

Using the previous example where Var⁑(X)=0.48\operatorname{Var}(X) = 0.48, calculate the standard deviation ΟƒX\sigma_X.

Step 1: Apply the standard deviation formula.

>

ΟƒX=Var⁑(X)\sigma_X = \sqrt{\operatorname{Var}(X)}

>
ΟƒX=0.48\sigma_X = \sqrt{0.48}

>
ΟƒXβ‰ˆ0.6928\sigma_X \approx 0.6928

Answer: ΟƒXβ‰ˆ0.6928\sigma_X \approx 0.6928.

:::question type="NAT" question="A random variable XX has E[X]=5E[X]=5 and E[X2]=29E[X^2]=29. What is the standard deviation of XX?" answer="2" hint="First calculate the variance using the given values." solution="Step 1: Calculate the variance Var⁑(X)\operatorname{Var}(X).
>

Var⁑(X)=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2

>
Var⁑(X)=29βˆ’(5)2\operatorname{Var}(X) = 29 - (5)^2

>
Var⁑(X)=29βˆ’25=4\operatorname{Var}(X) = 29 - 25 = 4

Step 2: Calculate the standard deviation ΟƒX\sigma_X.
>
ΟƒX=Var⁑(X)\sigma_X = \sqrt{\operatorname{Var}(X)}

>
ΟƒX=4=2\sigma_X = \sqrt{4} = 2

Answer: 2"
:::

---

8. Functions of a Random Variable

If XX is a discrete random variable and g(X)g(X) is a function of XX, then Y=g(X)Y = g(X) is also a discrete random variable. We can find its PMF, expected value, and variance.

πŸ“ Expected Value of a Function of X

For a discrete random variable XX with PMF pX(x)p_X(x), the expected value of Y=g(X)Y = g(X) is:

E[g(X)]=βˆ‘x∈RXg(x)β‹…pX(x)E[g(X)] = \sum_{x \in R_X} g(x) \cdot p_X(x)

Worked Example:

Let XX be the number of heads in two fair coin tosses. The PMF is pX(0)=0.25,pX(1)=0.5,pX(2)=0.25p_X(0)=0.25, p_X(1)=0.5, p_X(2)=0.25. Let Y=X2Y = X^2. Find E[Y]E[Y].

Step 1: Define the PMF of XX.

> pX(0)=0.25p_X(0)=0.25
> pX(1)=0.50p_X(1)=0.50
> pX(2)=0.25p_X(2)=0.25

Step 2: Apply the formula for E[g(X)]E[g(X)]. Here g(X)=X2g(X) = X^2.

>

E[Y]=E[X2]=βˆ‘x∈RXx2β‹…pX(x)E[Y] = E[X^2] = \sum_{x \in R_X} x^2 \cdot p_X(x)

>
E[Y]=(02)(0.25)+(12)(0.50)+(22)(0.25)E[Y] = (0^2)(0.25) + (1^2)(0.50) + (2^2)(0.25)

>
E[Y]=0β‹…0.25+1β‹…0.50+4β‹…0.25E[Y] = 0 \cdot 0.25 + 1 \cdot 0.50 + 4 \cdot 0.25

>
E[Y]=0+0.50+1.00=1.50E[Y] = 0 + 0.50 + 1.00 = 1.50

Answer: E[Y]=1.50E[Y] = 1.50.

:::question type="MCQ" question="A random variable XX has PMF P(X=0)=0.3P(X=0)=0.3, P(X=1)=0.4P(X=1)=0.4, P(X=2)=0.3P(X=2)=0.3. Let Y=2X+1Y = 2X+1. What is E[Y]E[Y]?" options=["1.0","2.0","3.0","4.0"] answer="3.0" hint="Use the linearity of expectation, or first find the PMF of YY." solution="Method 1: Using Linearity of Expectation
Step 1: Calculate E[X]E[X].
>

E[X]=(0)(0.3)+(1)(0.4)+(2)(0.3)=0+0.4+0.6=1.0E[X] = (0)(0.3) + (1)(0.4) + (2)(0.3) = 0 + 0.4 + 0.6 = 1.0

Step 2: Apply linearity of expectation for Y=2X+1Y = 2X+1.
>
E[Y]=E[2X+1]=2E[X]+1E[Y] = E[2X+1] = 2E[X] + 1

>
E[Y]=2(1.0)+1=2.0+1=3.0E[Y] = 2(1.0) + 1 = 2.0 + 1 = 3.0

Method 2: Finding PMF of Y (for verification)
Step 1: Determine the possible values of Y=2X+1Y = 2X+1 and their probabilities.
> If X=0X=0, Y=2(0)+1=1Y=2(0)+1=1. P(Y=1)=P(X=0)=0.3P(Y=1) = P(X=0) = 0.3.
> If X=1X=1, Y=2(1)+1=3Y=2(1)+1=3. P(Y=3)=P(X=1)=0.4P(Y=3) = P(X=1) = 0.4.
> If X=2X=2, Y=2(2)+1=5Y=2(2)+1=5. P(Y=5)=P(X=2)=0.3P(Y=5) = P(X=2) = 0.3.
Step 2: Calculate E[Y]E[Y].
>
E[Y]=(1)(0.3)+(3)(0.4)+(5)(0.3)E[Y] = (1)(0.3) + (3)(0.4) + (5)(0.3)

>
E[Y]=0.3+1.2+1.5E[Y] = 0.3 + 1.2 + 1.5

>
E[Y]=3.0E[Y] = 3.0

Answer: 3.0"
:::

---

Common Discrete Distributions

9. Bernoulli Distribution

A Bernoulli random variable models a single trial with two possible outcomes: success (1) or failure (0).

πŸ“ Bernoulli Distribution

A random variable XX follows a Bernoulli distribution with parameter p∈[0,1]p \in [0, 1], denoted X∼Bernoulli⁑(p)X \sim \operatorname{Bernoulli}(p), if its PMF is:

pX(x)={pifΒ x=11βˆ’pifΒ x=0p_X(x) = \begin{cases} p & \text{if } x=1 \\ 1-p & \text{if } x=0 \end{cases}

Mean: E[X]=pE[X] = p
Variance: Var⁑(X)=p(1βˆ’p)\operatorname{Var}(X) = p(1-p)

Worked Example:

A component has a probability of 0.90.9 of functioning correctly. Let X=1X=1 if the component functions correctly and X=0X=0 otherwise. Find the variance of XX.

Step 1: Identify the distribution and its parameter.

> X∼Bernoulli⁑(p)X \sim \operatorname{Bernoulli}(p) with p=0.9p=0.9.

Step 2: Apply the variance formula for Bernoulli distribution.

>

Var⁑(X)=p(1βˆ’p)\operatorname{Var}(X) = p(1-p)

>
Var⁑(X)=0.9(1βˆ’0.9)\operatorname{Var}(X) = 0.9(1-0.9)

>
Var⁑(X)=0.9(0.1)\operatorname{Var}(X) = 0.9(0.1)

>
Var⁑(X)=0.09\operatorname{Var}(X) = 0.09

Answer: Var⁑(X)=0.09\operatorname{Var}(X) = 0.09.

:::question type="NAT" question="A single experiment has a 70% chance of success. Let XX be a Bernoulli random variable representing the outcome (1 for success, 0 for failure). What is E[X]E[X]?" answer="0.7" hint="Recall the mean of a Bernoulli distribution." solution="Step 1: Identify the parameter pp.
> The probability of success is p=0.7p=0.7.
Step 2: Apply the formula for the expected value of a Bernoulli random variable.
>

E[X]=pE[X] = p

>
E[X]=0.7E[X] = 0.7

Answer: 0.7"
:::

---

10. Binomial Distribution

The binomial distribution models the number of successes in a fixed number of independent Bernoulli trials.

πŸ“ Binomial Distribution

A random variable XX follows a Binomial distribution with parameters nn (number of trials) and pp (probability of success), denoted X∼Binomial⁑(n,p)X \sim \operatorname{Binomial}(n, p), if its PMF is:

pX(x)=(nx)px(1βˆ’p)nβˆ’xforΒ x∈{0,1,…,n}p_X(x) = \binom{n}{x} p^x (1-p)^{n-x} \quad \text{for } x \in \{0, 1, \dots, n\}

Mean: E[X]=npE[X] = np
Variance: Var⁑(X)=np(1βˆ’p)\operatorname{Var}(X) = np(1-p)

Worked Example:

A fair coin is flipped 5 times. Let XX be the number of heads. Find the probability of getting exactly 3 heads.

Step 1: Identify the distribution and its parameters.

> This is a Binomial distribution with n=5n=5 (number of flips) and p=0.5p=0.5 (probability of heads for a fair coin).
> So, X∼Binomial⁑(5,0.5)X \sim \operatorname{Binomial}(5, 0.5). We want to find P(X=3)P(X=3).

Step 2: Apply the Binomial PMF formula.

>

P(X=3)=(53)(0.5)3(1βˆ’0.5)5βˆ’3P(X=3) = \binom{5}{3} (0.5)^3 (1-0.5)^{5-3}

>
P(X=3)=(53)(0.5)3(0.5)2P(X=3) = \binom{5}{3} (0.5)^3 (0.5)^2

>
P(X=3)=5!3!2!(0.5)5P(X=3) = \frac{5!}{3!2!} (0.5)^5

>
P(X=3)=5Γ—42Γ—1Γ—0.03125P(X=3) = \frac{5 \times 4}{2 \times 1} \times 0.03125

>
P(X=3)=10Γ—0.03125P(X=3) = 10 \times 0.03125

>
P(X=3)=0.3125P(X=3) = 0.3125

Answer: The probability of exactly 3 heads is 0.31250.3125.

:::question type="MCQ" question="An online server has a 0.8 probability of successfully processing a request. If 10 independent requests are made, what is the expected number of successful requests?" options=["2","4","8","10"] answer="8" hint="Identify the distribution and use its mean formula." solution="Step 1: Identify the distribution and parameters.
> This scenario fits a Binomial distribution, where n=10n=10 (number of trials/requests) and p=0.8p=0.8 (probability of success).
> So, X∼Binomial⁑(10,0.8)X \sim \operatorname{Binomial}(10, 0.8).
Step 2: Use the formula for the mean of a Binomial distribution.
>

E[X]=npE[X] = np

>
E[X]=10Γ—0.8E[X] = 10 \times 0.8

>
E[X]=8E[X] = 8

Answer: 8"
:::

---

11. Geometric Distribution

The geometric distribution models the number of Bernoulli trials required to get the first success.

πŸ“ Geometric Distribution

A random variable XX follows a Geometric distribution with parameter p∈(0,1]p \in (0, 1] (probability of success), denoted X∼Geometric⁑(p)X \sim \operatorname{Geometric}(p), if its PMF is:

pX(x)=(1βˆ’p)xβˆ’1pforΒ x∈{1,2,3,… }p_X(x) = (1-p)^{x-1} p \quad \text{for } x \in \{1, 2, 3, \dots\}

Mean: E[X]=1pE[X] = \frac{1}{p}
Variance: Var⁑(X)=1βˆ’pp2\operatorname{Var}(X) = \frac{1-p}{p^2}

Worked Example:

A quality control process involves testing items until a defective one is found. The probability of an item being defective is 0.050.05. What is the probability that the first defective item is found on the 5th test?

Step 1: Identify the distribution and its parameter.

> This is a Geometric distribution, as we are looking for the number of trials until the first success (defective item).
> The probability of success (finding a defective item) is p=0.05p=0.05.
> So, X∼Geometric⁑(0.05)X \sim \operatorname{Geometric}(0.05). We want to find P(X=5)P(X=5).

Step 2: Apply the Geometric PMF formula.

>

P(X=5)=(1βˆ’p)5βˆ’1pP(X=5) = (1-p)^{5-1} p

>
P(X=5)=(1βˆ’0.05)4β‹…0.05P(X=5) = (1-0.05)^4 \cdot 0.05

>
P(X=5)=(0.95)4β‹…0.05P(X=5) = (0.95)^4 \cdot 0.05

>
P(X=5)β‰ˆ0.8145β‹…0.05P(X=5) \approx 0.8145 \cdot 0.05

>
P(X=5)β‰ˆ0.0407P(X=5) \approx 0.0407

Answer: The probability is approximately 0.04070.0407.

:::question type="MCQ" question="A biased coin with P(H)=0.2P(H)=0.2 is flipped repeatedly until the first head appears. Let XX be the number of flips required. What is the expected number of flips?" options=["2","5","10","20"] answer="5" hint="Identify the distribution and use its mean formula." solution="Step 1: Identify the distribution and parameters.
> This scenario fits a Geometric distribution, where p=0.2p=0.2 (probability of success, i.e., getting a head).
> So, X∼Geometric⁑(0.2)X \sim \operatorname{Geometric}(0.2).
Step 2: Use the formula for the mean of a Geometric distribution.
>

E[X]=1pE[X] = \frac{1}{p}

>
E[X]=10.2E[X] = \frac{1}{0.2}

>
E[X]=5E[X] = 5

Answer: 5"
:::

---

12. Poisson Distribution

The Poisson distribution models the number of events occurring in a fixed interval of time or space, given a known average rate of occurrence, and events are independent.

πŸ“ Poisson Distribution

A random variable XX follows a Poisson distribution with parameter λ>0\lambda > 0 (average rate of events), denoted X∼Poisson⁑(λ)X \sim \operatorname{Poisson}(\lambda), if its PMF is:

pX(x)=eβˆ’Ξ»Ξ»xx!forΒ x∈{0,1,2,… }p_X(x) = \frac{e^{-\lambda} \lambda^x}{x!} \quad \text{for } x \in \{0, 1, 2, \dots\}

Mean: E[X]=Ξ»E[X] = \lambda
Variance: Var⁑(X)=λ\operatorname{Var}(X) = \lambda

Worked Example:

On average, 3 customers arrive at a service desk per hour. Assuming a Poisson process, what is the probability that exactly 2 customers arrive in the next hour?

Step 1: Identify the distribution and its parameter.

> This is a Poisson distribution, as we are counting events (customer arrivals) over a fixed interval (1 hour) with a known average rate.
> The average rate Ξ»=3\lambda = 3 customers per hour.
> So, X∼Poisson⁑(3)X \sim \operatorname{Poisson}(3). We want to find P(X=2)P(X=2).

Step 2: Apply the Poisson PMF formula.

>

P(X=2)=eβˆ’3322!P(X=2) = \frac{e^{-3} 3^2}{2!}

>
P(X=2)=eβˆ’3β‹…92β‹…1P(X=2) = \frac{e^{-3} \cdot 9}{2 \cdot 1}

>
P(X=2)=4.5eβˆ’3P(X=2) = 4.5 e^{-3}

>
P(X=2)β‰ˆ4.5Γ—0.0498P(X=2) \approx 4.5 \times 0.0498

>
P(X=2)β‰ˆ0.2241P(X=2) \approx 0.2241

Answer: The probability is approximately 0.22410.2241.

:::question type="NAT" question="A website receives an average of 5 new sign-ups per day. Assuming the number of sign-ups follows a Poisson distribution, what is the variance of the number of sign-ups per day?" answer="5" hint="Recall the variance of a Poisson distribution." solution="Step 1: Identify the parameter Ξ»\lambda.
> The average rate of sign-ups is Ξ»=5\lambda=5 per day.
Step 2: Apply the formula for the variance of a Poisson random variable.
>

Var⁑(X)=λ\operatorname{Var}(X) = \lambda

>
Var⁑(X)=5\operatorname{Var}(X) = 5

Answer: 5"
:::

---

Advanced Applications

Worked Example:

An experiment involves NN independent trials. Each trial ii has a success probability pip_i. Let XX be the total number of successes. Find E[X]E[X].

Step 1: Define indicator random variables for each trial.

> Let XiX_i be an indicator random variable for the ii-th trial:
>

Xi={1ifΒ trialΒ iΒ isΒ aΒ success0ifΒ trialΒ iΒ isΒ aΒ failureX_i = \begin{cases} 1 & \text{if trial } i \text{ is a success} \\ 0 & \text{if trial } i \text{ is a failure} \end{cases}

> For each XiX_i, E[Xi]=P(Xi=1)=piE[X_i] = P(X_i=1) = p_i.

Step 2: Express XX as a sum of indicator variables.

> The total number of successes XX is the sum of these indicator variables:
>

X=X1+X2+β‹―+XNX = X_1 + X_2 + \dots + X_N

Step 3: Use linearity of expectation.

>

E[X]=E[X1+X2+β‹―+XN]E[X] = E[X_1 + X_2 + \dots + X_N]

>
E[X]=E[X1]+E[X2]+β‹―+E[XN]E[X] = E[X_1] + E[X_2] + \dots + E[X_N]

>
E[X]=p1+p2+β‹―+pNE[X] = p_1 + p_2 + \dots + p_N

>
E[X]=βˆ‘i=1NpiE[X] = \sum_{i=1}^{N} p_i

Answer: E[X]=βˆ‘i=1NpiE[X] = \sum_{i=1}^{N} p_i. This demonstrates the power of linearity of expectation, as the trials do not need to be identically distributed or even independent for this result.

:::question type="MSQ" question="Consider an urn with 5 balls: 3 red and 2 blue. We draw 2 balls without replacement. Let XX be the number of red balls drawn. Which of the following statements are true?" options=["The range of XX is {0,1,2}\{0, 1, 2\}.","P(X=0)=0.1P(X=0) = 0.1.","E[X]=1.2E[X] = 1.2.","This is a Binomial distribution."] answer="The range of XX is {0,1,2}\{0, 1, 2\},P(X=0)=0.1P(X=0) = 0.1,E[X]=1.2E[X] = 1.2" hint="Calculate probabilities for each XX value. Remember that drawing without replacement implies dependence, ruling out Binomial." solution="Step 1: Determine the range of XX.
> We draw 2 balls.
> X=0X=0: (0R, 2B) (30)(22)=1Γ—1=1\binom{3}{0}\binom{2}{2} = 1 \times 1 = 1 way.
> X=1X=1: (1R, 1B) (31)(21)=3Γ—2=6\binom{3}{1}\binom{2}{1} = 3 \times 2 = 6 ways.
> X=2X=2: (2R, 0B) (32)(20)=3Γ—1=3\binom{3}{2}\binom{2}{0} = 3 \times 1 = 3 ways.
> Total ways to draw 2 balls from 5: (52)=10\binom{5}{2} = 10 ways.
> The range of XX is {0,1,2}\{0, 1, 2\}. Thus, 'The range of XX is {0,1,2}\{0, 1, 2\}.' is TRUE.

Step 2: Calculate P(X=0)P(X=0).
>

P(X=0)=NumberΒ ofΒ waysΒ toΒ drawΒ 0Β redTotalΒ ways=110=0.1P(X=0) = \frac{\text{Number of ways to draw 0 red}}{\text{Total ways}} = \frac{1}{10} = 0.1

> Thus, 'P(X=0)=0.1P(X=0) = 0.1.' is TRUE.

Step 3: Calculate E[X]E[X].
> First, find the full PMF:
> P(X=0)=0.1P(X=0) = 0.1
> P(X=1)=610=0.6P(X=1) = \frac{6}{10} = 0.6
> P(X=2)=310=0.3P(X=2) = \frac{3}{10} = 0.3
>

E[X]=(0)(0.1)+(1)(0.6)+(2)(0.3)E[X] = (0)(0.1) + (1)(0.6) + (2)(0.3)

>
E[X]=0+0.6+0.6=1.2E[X] = 0 + 0.6 + 0.6 = 1.2

> Thus, 'E[X]=1.2E[X] = 1.2.' is TRUE.

Step 4: Evaluate 'This is a Binomial distribution.'
> A Binomial distribution assumes independent trials. Drawing without replacement means the probability of drawing a red ball changes after each draw, so the trials are dependent. Therefore, this is NOT a Binomial distribution (it's a Hypergeometric distribution). Thus, 'This is a Binomial distribution.' is FALSE.

Answer: The range of XX is {0,1,2}\{0, 1, 2\},P(X=0)=0.1P(X=0) = 0.1,E[X]=1.2E[X] = 1.2"
:::

---

Problem-Solving Strategies

πŸ’‘ Recognizing Distribution Types
    • Bernoulli: Single trial, two outcomes (success/failure).
    • Binomial: Fixed number of independent trials, counting successes. Key phrases: 'out of nn trials', 'number of successes'.
    • Geometric: Number of trials until the first success. Key phrases: 'first success', 'until'.
    • Poisson: Counting events in a fixed interval (time/space) with a known average rate. Key phrases: 'average rate', 'number of events per unit'.
    • Hypergeometric (implied by 'without replacement'): Drawing from a finite population without replacement, counting items of a specific type. If trials are dependent, it's not Binomial.
πŸ’‘ Using Linearity of Expectation

For E[X+Y]=E[X]+E[Y]E[X+Y] = E[X]+E[Y], XX and YY do not need to be independent. This is powerful for complex problems where XX can be decomposed into simpler parts (e.g., indicator variables).

---

Common Mistakes

⚠️ Confusing PMF and CDF

❌ Students often mix up P(X=x)P(X=x) (PMF, probability at a single point) and P(X≀x)P(X \le x) (CDF, cumulative probability up to a point).
βœ… Always check if the question asks for an exact probability or a cumulative probability. Remember FX(x)F_X(x) is a step function for discrete RVs.

⚠️ Incorrectly Applying Variance Properties

❌ Assuming Var⁑(X+Y)=Var⁑(X)+Var⁑(Y)\operatorname{Var}(X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) for dependent variables or Var⁑(aX+b)=aVar⁑(X)+b\operatorname{Var}(aX+b) = a\operatorname{Var}(X)+b.
βœ… Var⁑(X+Y)=Var⁑(X)+Var⁑(Y)+2Cov⁑(X,Y)\operatorname{Var}(X+Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) + 2\operatorname{Cov}(X,Y). If X,YX,Y are independent, Cov⁑(X,Y)=0\operatorname{Cov}(X,Y)=0.
βœ… Var⁑(aX+b)=a2Var⁑(X)\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X). The constant bb does not affect variance.

---

Practice Questions

:::question type="NAT" question="A discrete random variable XX has the following PMF: P(X=1)=0.4P(X=1) = 0.4, P(X=2)=0.3P(X=2) = 0.3, P(X=3)=0.2P(X=3) = 0.2, P(X=4)=0.1P(X=4) = 0.1. Calculate E[X]E[X]." answer="1.9" hint="Apply the definition of expected value: βˆ‘xβ‹…pX(x)\sum x \cdot p_X(x)." solution="Step 1: Use the formula for expected value.
>

E[X]=(1)(0.4)+(2)(0.3)+(3)(0.2)+(4)(0.1)E[X] = (1)(0.4) + (2)(0.3) + (3)(0.2) + (4)(0.1)

>
E[X]=0.4+0.6+0.6+0.4E[X] = 0.4 + 0.6 + 0.6 + 0.4

>
E[X]=1.9E[X] = 1.9

Answer: 1.9"
:::

:::question type="MCQ" question="Let XX be a discrete random variable with PMF given by P(X=k)=cβ‹…kP(X=k) = c \cdot k for k=1,2,3k=1, 2, 3, and P(X=k)=0P(X=k)=0 otherwise. What is the value of cc?" options=["1/3","1/6","1/10","1/12"] answer="1/6" hint="The sum of all probabilities in a PMF must equal 1." solution="Step 1: Use the property that the sum of all probabilities must be 1.
>

βˆ‘k=13P(X=k)=1\sum_{k=1}^{3} P(X=k) = 1

>
P(X=1)+P(X=2)+P(X=3)=1P(X=1) + P(X=2) + P(X=3) = 1

>
cβ‹…1+cβ‹…2+cβ‹…3=1c \cdot 1 + c \cdot 2 + c \cdot 3 = 1

>
c(1+2+3)=1c(1+2+3) = 1

>
6c=16c = 1

>
c=16c = \frac{1}{6}

Answer: 1/6"
:::

:::question type="MSQ" question="Which of the following statements are true regarding the CDF FX(x)F_X(x) of a discrete random variable XX?" options=["FX(x)F_X(x) is always continuous.","FX(x)F_X(x) is non-decreasing.","lim⁑xβ†’βˆžFX(x)=1\lim_{x \to \infty} F_X(x) = 1.","P(X=x)=FX(x)βˆ’FX(xβˆ’1)P(X=x) = F_X(x) - F_X(x-1) for integer xx (assuming FX(xβˆ’1)F_X(x-1) is defined as the limit from the left at xβˆ’1x-1)."] answer="FX(x)F_X(x) is non-decreasing,lim⁑xβ†’βˆžFX(x)=1\lim_{x \to \infty} F_X(x) = 1,P(X=x)=FX(x)βˆ’FX(xβˆ’1)P(X=x) = F_X(x) - F_X(x-1) for integer xx (assuming FX(xβˆ’1)F_X(x-1) is defined as the limit from the left at xβˆ’1x-1)." hint="Recall the definition and properties of a CDF for discrete random variables. Pay attention to continuity and how PMF relates to CDF." solution="Step 1: Evaluate ' FX(x)F_X(x) is always continuous.'
> For discrete random variables, the CDF is a step function, which is discontinuous at the values XX can take. Thus, this statement is FALSE.

Step 2: Evaluate ' FX(x)F_X(x) is non-decreasing.'
> This is a fundamental property of any CDF, discrete or continuous. As xx increases, the cumulative probability can only stay the same or increase. Thus, this statement is TRUE.

Step 3: Evaluate ' lim⁑xβ†’βˆžFX(x)=1\lim_{x \to \infty} F_X(x) = 1.'
> This is another fundamental property of any CDF. As xx approaches infinity, it covers all possible outcomes, so the cumulative probability must approach 1. Thus, this statement is TRUE.

Step 4: Evaluate ' P(X=x)=FX(x)βˆ’FX(xβˆ’1)P(X=x) = F_X(x) - F_X(x-1) for integer xx (assuming FX(xβˆ’1)F_X(x-1) is defined as the limit from the left at xβˆ’1x-1).'
> For a discrete random variable taking integer values, FX(x)=P(X≀x)F_X(x) = P(X \le x) and FX(xβˆ’1)F_X(x-1) (more precisely, lim⁑yβ†’xβˆ’FX(y)\lim_{y \to x^-} F_X(y) for step functions) is P(X≀xβˆ’1)P(X \le x-1).
> So, P(X=x)=P(X≀x)βˆ’P(X≀xβˆ’1)=FX(x)βˆ’FX(xβˆ’1)P(X=x) = P(X \le x) - P(X \le x-1) = F_X(x) - F_X(x-1). This correctly relates the PMF to the CDF for integer-valued discrete RVs. Thus, this statement is TRUE.

Answer: FX(x)F_X(x) is non-decreasing,lim⁑xβ†’βˆžFX(x)=1\lim_{x \to \infty} F_X(x) = 1,P(X=x)=FX(x)βˆ’FX(xβˆ’1)P(X=x) = F_X(x) - F_X(x-1) for integer xx (assuming FX(xβˆ’1)F_X(x-1) is defined as the limit from the left at xβˆ’1x-1)."
:::

:::question type="NAT" question="A coin is flipped until a head appears. The probability of getting a head on any flip is p=0.4p=0.4. What is the variance of the number of flips required?" answer="3.75" hint="Identify the distribution and use its variance formula." solution="Step 1: Identify the distribution and parameters.
> This scenario describes a Geometric distribution, as we are counting the number of trials until the first success (head).
> The probability of success is p=0.4p=0.4.
> So, X∼Geometric⁑(0.4)X \sim \operatorname{Geometric}(0.4).
Step 2: Use the formula for the variance of a Geometric distribution.
>

Var⁑(X)=1βˆ’pp2\operatorname{Var}(X) = \frac{1-p}{p^2}

>
Var⁑(X)=1βˆ’0.4(0.4)2\operatorname{Var}(X) = \frac{1-0.4}{(0.4)^2}

>
Var⁑(X)=0.60.16\operatorname{Var}(X) = \frac{0.6}{0.16}

>
Var⁑(X)=3.75\operatorname{Var}(X) = 3.75

Answer: 3.75"
:::

:::question type="MCQ" question="The number of errors in a software program follows a Poisson distribution with an average of 2 errors per 1000 lines of code. What is the probability of finding exactly 0 errors in a 1000-line segment?" options=["eβˆ’2e^{-2}","2eβˆ’22e^{-2}","eβˆ’1e^{-1}","2eβˆ’12e^{-1}"] answer="eβˆ’2e^{-2}" hint="Identify the Poisson parameter Ξ»\lambda and apply the PMF for X=0X=0." solution="Step 1: Identify the Poisson parameter Ξ»\lambda.
> The average number of errors is given as Ξ»=2\lambda=2 per 1000 lines.
Step 2: Apply the Poisson PMF formula for X=0X=0.
>

P(X=x)=eβˆ’Ξ»Ξ»xx!P(X=x) = \frac{e^{-\lambda} \lambda^x}{x!}

>
P(X=0)=eβˆ’2200!P(X=0) = \frac{e^{-2} 2^0}{0!}

>
P(X=0)=eβˆ’2β‹…11P(X=0) = \frac{e^{-2} \cdot 1}{1}

>
P(X=0)=eβˆ’2P(X=0) = e^{-2}

Answer: eβˆ’2e^{-2}"
:::

---

Summary

❗ Key Formulas & Takeaways

|

| Formula/Concept | Expression |

|---|----------------|------------| | 1 | PMF properties | βˆ‘pX(x)=1\sum p_X(x) = 1, pX(x)β‰₯0p_X(x) \ge 0 | | 2 | CDF definition | FX(x)=P(X≀x)=βˆ‘t≀xpX(t)F_X(x) = P(X \le x) = \sum_{t \le x} p_X(t) | | 3 | Expected Value | E[X]=βˆ‘xpX(x)E[X] = \sum x p_X(x) | | 4 | Variance | Var⁑(X)=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2 | | 5 | Standard Deviation | ΟƒX=Var⁑(X)\sigma_X = \sqrt{\operatorname{Var}(X)} | | 6 | Bernoulli PMF | px(1βˆ’p)1βˆ’xp^x (1-p)^{1-x} for x∈{0,1}x \in \{0,1\} | | 7 | Bernoulli Mean/Variance | E[X]=pE[X]=p, Var⁑(X)=p(1βˆ’p)\operatorname{Var}(X)=p(1-p) | | 8 | Binomial PMF | (nx)px(1βˆ’p)nβˆ’x\binom{n}{x} p^x (1-p)^{n-x} | | 9 | Binomial Mean/Variance | E[X]=npE[X]=np, Var⁑(X)=np(1βˆ’p)\operatorname{Var}(X)=np(1-p) | | 10 | Geometric PMF | (1βˆ’p)xβˆ’1p(1-p)^{x-1} p for x∈{1,2,… }x \in \{1,2,\dots\} | | 11 | Geometric Mean/Variance | E[X]=1pE[X]=\frac{1}{p}, Var⁑(X)=1βˆ’pp2\operatorname{Var}(X)=\frac{1-p}{p^2} | | 12 | Poisson PMF | eβˆ’Ξ»Ξ»xx!\frac{e^{-\lambda} \lambda^x}{x!} for x∈{0,1,2,… }x \in \{0,1,2,\dots\} | | 13 | Poisson Mean/Variance | E[X]=Ξ»E[X]=\lambda, Var⁑(X)=Ξ»\operatorname{Var}(X)=\lambda |

---

What's Next?

πŸ’‘ Continue Learning

This topic connects to:

    • Continuous Random Variables: Understanding how concepts like PMF and summation transform into PDF and integration for continuous outcomes.

    • Joint Distributions: Extending the concept of a single random variable to multiple random variables and their relationships.

    • Stochastic Processes: Building sequences of random variables over time, crucial for modeling dynamic systems in computer science.

Chapter Summary

❗ Random Variables β€” Key Points

A Discrete Random Variable (DRV) is a variable whose possible values are countable and often integer-valued, arising from a random experiment.
The Probability Mass Function (PMF), pX(x)=P(X=x)p_X(x) = P(X=x), assigns probabilities to each possible value xx of a DRV XX, satisfying pX(x)β‰₯0p_X(x) \ge 0 and βˆ‘xpX(x)=1\sum_x p_X(x) = 1.
The Cumulative Distribution Function (CDF), FX(x)=P(X≀x)=βˆ‘t≀xpX(t)F_X(x) = P(X \le x) = \sum_{t \le x} p_X(t), describes the probability that XX takes a value less than or equal to xx.
The Expected Value (Mean) of a DRV XX is E[X]=βˆ‘xxβ‹…pX(x)E[X] = \sum_x x \cdot p_X(x), representing the long-run average value of the variable. For a function g(X)g(X), E[g(X)]=βˆ‘xg(x)β‹…pX(x)E[g(X)] = \sum_x g(x) \cdot p_X(x).
The Variance of a DRV XX is Var⁑(X)=E[(Xβˆ’E[X])2]=E[X2]βˆ’(E[X])2\operatorname{Var}(X) = E[(X - E[X])^2] = E[X^2] - (E[X])^2, measuring the spread or dispersion of the distribution around its mean.
Key properties of expectation and variance include E[aX+b]=aE[X]+bE[aX+b] = aE[X]+b and Var⁑(aX+b)=a2Var⁑(X)\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X) for constants a,ba, b.
* Common discrete distributions (e.g., Bernoulli, Binomial, Poisson, Geometric, Hypergeometric) model specific types of random phenomena, each with distinct PMFs, means, and variances.

Chapter Review Questions

:::question type="MCQ" question="Let XX be a discrete random variable with the following probability mass function:
pX(x)={c(x+1)forΒ x=0,1,20otherwisep_X(x) = \begin{cases} c(x+1) & \text{for } x=0, 1, 2 \\ 0 & \text{otherwise} \end{cases}
What is the value of the constant cc?" options=["1/6","1/3","1/9","1/4"] answer="1/6" hint="Recall that the sum of all probabilities in a PMF must equal 1." solution="The sum of probabilities must be 1:
pX(0)+pX(1)+pX(2)=1p_X(0) + p_X(1) + p_X(2) = 1
c(0+1)+c(1+1)+c(2+1)=1c(0+1) + c(1+1) + c(2+1) = 1
c(1)+c(2)+c(3)=1c(1) + c(2) + c(3) = 1
c(1+2+3)=1c(1+2+3) = 1
6c=1β€…β€ŠβŸΉβ€…β€Šc=1/66c = 1 \implies c = 1/6
Thus, the value of cc is 1/6."
:::

:::question type="NAT" question="A fair six-sided die is rolled. Let XX be the number rolled. Calculate E[X2]E[X^2]." answer="15.166666666666666" hint="First, determine the PMF of XX. Then use the formula for the expectation of a function of a random variable, E[g(X)]=βˆ‘xg(x)pX(x)E[g(X)] = \sum_x g(x)p_X(x)." solution="For a fair six-sided die, the possible values for XX are {1,2,3,4,5,6}\{1, 2, 3, 4, 5, 6\}, and the PMF is pX(x)=1/6p_X(x) = 1/6 for each of these values.
We need to calculate E[X2]E[X^2].
E[X2]=βˆ‘x=16x2β‹…pX(x)E[X^2] = \sum_{x=1}^{6} x^2 \cdot p_X(x)
E[X2]=(12β‹…1/6)+(22β‹…1/6)+(32β‹…1/6)+(42β‹…1/6)+(52β‹…1/6)+(62β‹…1/6)E[X^2] = (1^2 \cdot 1/6) + (2^2 \cdot 1/6) + (3^2 \cdot 1/6) + (4^2 \cdot 1/6) + (5^2 \cdot 1/6) + (6^2 \cdot 1/6)
E[X2]=(1/6)β‹…(1+4+9+16+25+36)E[X^2] = (1/6) \cdot (1 + 4 + 9 + 16 + 25 + 36)
E[X2]=(1/6)β‹…91E[X^2] = (1/6) \cdot 91
E[X2]=91/6β‰ˆ15.166666666666666E[X^2] = 91/6 \approx 15.166666666666666"
:::

:::question type="MCQ" question="In a factory, light bulbs are produced, and the probability that a bulb is defective is 0.050.05. A quality control inspector randomly selects bulbs one by one until a defective bulb is found. What is the most appropriate distribution to model the number of bulbs inspected until the first defective one is found?" options=["Binomial Distribution","Poisson Distribution","Geometric Distribution","Bernoulli Distribution"] answer="Geometric Distribution" hint="Consider what each distribution models. Which one describes the number of trials until the first success in a sequence of independent Bernoulli trials?" solution="The scenario describes a sequence of independent Bernoulli trials (each bulb is either defective or not), where we are interested in the number of trials until the first 'success' (finding a defective bulb). This is the definition of a Geometric Distribution.

  • Bernoulli Distribution: Models a single trial with two outcomes (success/failure).

  • Binomial Distribution: Models the number of successes in a fixed number of trials.

  • Poisson Distribution: Models the number of events occurring in a fixed interval of time or space.

  • Geometric Distribution: Models the number of trials needed to get the first success."

:::

:::question type="NAT" question="Let XX be a discrete random variable with E[X]=3E[X] = 3 and Var⁑(X)=2\operatorname{Var}(X) = 2. Calculate Var⁑(5βˆ’2X)\operatorname{Var}(5-2X)." answer="8" hint="Recall the properties of variance for linear transformations: Var⁑(aX+b)=a2Var⁑(X)\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X)." solution="We are given E[X]=3E[X] = 3 and Var⁑(X)=2\operatorname{Var}(X) = 2.
We need to calculate Var⁑(5βˆ’2X)\operatorname{Var}(5-2X).
Using the property Var⁑(aX+b)=a2Var⁑(X)\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X), where a=βˆ’2a=-2 and b=5b=5:
Var⁑(5βˆ’2X)=(βˆ’2)2Var⁑(X)\operatorname{Var}(5-2X) = (-2)^2 \operatorname{Var}(X)
Var⁑(5βˆ’2X)=4β‹…Var⁑(X)\operatorname{Var}(5-2X) = 4 \cdot \operatorname{Var}(X)
Substitute the given value for Var⁑(X)\operatorname{Var}(X):
Var⁑(5βˆ’2X)=4β‹…2\operatorname{Var}(5-2X) = 4 \cdot 2
Var⁑(5βˆ’2X)=8\operatorname{Var}(5-2X) = 8
The expected value E[X]E[X] is not needed for this calculation."
:::

What's Next?

πŸ’‘ Continue Your CMI Journey

Having established a solid foundation in discrete random variables, their properties, and common distributions, your next steps in probability theory involve extending these concepts. You will delve into Continuous Random Variables, exploring their probability density functions (PDFs) and cumulative distribution functions (CDFs), along with their unique characteristics. Subsequently, you will learn about Joint Distributions for multiple random variables (both discrete and continuous), which are crucial for understanding relationships and dependencies between variables, and explore Transformations of Random Variables to derive distributions of new variables based on existing ones. These topics are fundamental for advanced statistical inference and stochastic processes.

🎯 Key Points to Remember

  • βœ“ Master the core concepts in Random Variables before moving to advanced topics
  • βœ“ Practice with previous year questions to understand exam patterns
  • βœ“ Review short notes regularly for quick revision before exams

Related Topics in Probability Theory

More Resources

Why Choose MastersUp?

🎯

AI-Powered Plans

Personalized study schedules based on your exam date and learning pace

πŸ“š

15,000+ Questions

Verified questions with detailed solutions from past papers

πŸ“Š

Smart Analytics

Track your progress with subject-wise performance insights

πŸ”–

Bookmark & Revise

Save important questions for quick revision before exams

Start Your Free Preparation β†’

No credit card required β€’ Free forever for basic features