Welcome to Discrete Random Variables!

Hello future Further Mathematician! This chapter is your foundation for understanding chance and probability in a structured, numerical way. While statistics might seem abstract, Discrete Random Variables (DRVs) help us predict and quantify outcomes, which is essential for everything from risk assessment to game theory.

Don't worry if this seems tricky at first. We are just learning how to translate real-world uncertain events (like rolling a die or counting defects) into easy-to-manage mathematical functions.


Section 1: Defining the Discrete Random Variable

1.1 What is a Random Variable?

A Random Variable (RV) is simply a variable whose value is determined by the outcome of a random phenomenon. We usually denote a random variable using a capital letter, like \(X\), \(Y\), or \(Z\).

  • The observed value that the variable takes is usually denoted by a lower-case letter, e.g., \(x\). So, \(P(X=x)\) means "the probability that the random variable \(X\) takes the specific value \(x\)."

1.2 Discrete vs. Continuous

In S1, we focus on Discrete Random Variables (DRVs). What does 'discrete' mean?

A DRV can only take a countable number of values. These values are usually integers (whole numbers).

  • Example of Discrete:
    • The number of cars passing a junction in an hour (0, 1, 2, 3, ...).
    • The score obtained when rolling a standard six-sided die (1, 2, 3, 4, 5, 6).
    • The number of heads when flipping a coin 10 times (0, 1, 2, ..., 10).

Analogy: Think of DRVs as counting marbles. You can have exactly 1, 2, or 3 marbles, but you can't have 2.5 marbles. (In contrast, a Continuous RV, like height or time, can take any value within a given range.)

Quick Review: Key Terms
  • Random Variable (X): A numerical outcome of a random event.
  • Discrete: Countable values, usually integers.

Section 2: Probability Distribution (PMF/PDF)

2.1 Defining the Probability Distribution

A Probability Distribution (sometimes called a Probability Mass Function, PMF, or Probability Distribution Function, PDF) tells us all the possible values a DRV can take, and the probability of observing each of those values.

It can be shown as a table, a graph (a vertical line graph), or a formula.

Essential Property:

Because the list covers every possible outcome, the sum of all probabilities must equal 1.

$$ \sum P(X=x) = 1 $$

2.2 Example Distribution Table

Let \(X\) be the random variable representing the number of times a certain machine breaks down in a week:

\(x\) 0 1 2 3
\(P(X=x)\) 0.15 0.40 0.35 \(k\)
Step-by-Step: Finding the Unknown Probability (k)
  1. We know the sum of all probabilities must be 1.
  2. \(0.15 + 0.40 + 0.35 + k = 1\)
  3. \(0.90 + k = 1\)
  4. \(k = 1 - 0.90 = 0.10\)

2.3 Calculating Probabilities from the Distribution

Once you have the full distribution, you can easily calculate combined probabilities:

  • \(P(X=2) = 0.35\) (Read directly from the table)
  • \(P(X \ge 2) = P(X=2) + P(X=3) = 0.35 + 0.10 = 0.45\)
  • \(P(X < 3) = P(X=0) + P(X=1) + P(X=2) = 0.15 + 0.40 + 0.35 = 0.90\)

Memory Aid: When dealing with inequalities (\(\le\), \(\ge\), \(<\), \(>\)), remember whether the endpoint is included. Since \(X\) is discrete, \(P(X \le 2)\) is NOT the same as \(P(X < 3)\) in this example, although they happen to include the same values (0, 1, 2). Be precise!

Key Takeaway

The Probability Distribution is the core tool. Always verify that \(\sum P(X=x) = 1\).


Section 3: The Cumulative Distribution Function (CDF)

Sometimes we are interested in the probability that the random variable is less than or equal to a certain value. This is where the Cumulative Distribution Function (CDF) comes in.

3.1 Definition of F(x)

The CDF, denoted by \(F(x)\), is defined as:

$$ F(x) = P(X \le x) = \sum_{t \le x} P(X=t) $$

It is simply a running total of the probabilities up to a given value \(x\).

3.2 Constructing the CDF

Using the previous breakdown example (where P(3) = 0.10):

\(x\) 0 1 2 3
\(P(X=x)\) 0.15 0.40 0.35 0.10
\(F(x) = P(X \le x)\) 0.15 0.55 0.90 1.00

Check: \(F(2) = P(X \le 2) = P(0) + P(1) + P(2) = 0.15 + 0.40 + 0.35 = 0.90\)

3.3 Using the CDF

The CDF is extremely useful for calculating probabilities quickly, especially those involving the complement rule:

  • Calculating P(X > x): Use the complement rule. $$ P(X > x) = 1 - P(X \le x) = 1 - F(x) $$ Example: \(P(X > 1) = 1 - F(1) = 1 - 0.55 = 0.45\). (Check: \(P(2) + P(3) = 0.35 + 0.10 = 0.45\). It works!)
  • Calculating P(a < X \le b): $$ P(a < X \le b) = F(b) - F(a) $$ Example: \(P(1 < X \le 3) = F(3) - F(1) = 1.00 - 0.55 = 0.45\).
Common Mistake Alert!

Since \(X\) is discrete, be very careful with strict inequalities:

  • \(P(X < 3)\) means \(P(X \le 2)\), which is \(F(2)\).
  • \(P(X \le 3)\) means \(F(3)\).
  • \(P(X > 3)\) means \(P(X \ge 4)\). If the maximum value is 3, this probability is 0.

Section 4: Measures of Central Tendency (Expectation)

If we ran the random experiment many, many times, what would be the average result? This is the Expectation, or Mean, of the random variable.

4.1 Expectation (Mean), \(E(X)\)

The expectation, denoted by \(E(X)\) or \(\mu\) (mu), is a weighted average where each possible outcome is weighted by its probability.

$$ E(X) = \mu = \sum x P(X=x) $$

Analogy: Imagine your grade in a class where tests are weighted differently. You multiply each test score by its weighting (probability) and add them up to get your final weighted average (Expectation).

Step-by-Step: Calculating E(X)

Using the breakdown example:

\(x\) 0 1 2 3
\(P(X=x)\) 0.15 0.40 0.35 0.10
\(x P(X=x)\) \(0 \times 0.15 = 0\) \(1 \times 0.40 = 0.40\) \(2 \times 0.35 = 0.70\) \(3 \times 0.10 = 0.30\)

$$ E(X) = 0 + 0.40 + 0.70 + 0.30 = 1.40 $$

Interpretation: In the long run, the company expects to have 1.4 machine breakdowns per week.

4.2 Expectation of a Function of X, \(E(g(X))\)

Sometimes you need the expectation of a function of \(X\), for example, \(E(X^2)\) or \(E(3X-5)\). The principle remains the same: multiply the function of \(x\) by its probability.

$$ E(g(X)) = \sum g(x) P(X=x) $$

For example, to find \(E(X^2)\):

\(x\) 0 1 2 3
\(x^2\) 0 1 4 9
\(P(X=x)\) 0.15 0.40 0.35 0.10
\(x^2 P(X=x)\) \(0 \times 0.15 = 0\) \(1 \times 0.40 = 0.40\) \(4 \times 0.35 = 1.40\) \(9 \times 0.10 = 0.90\)

$$ E(X^2) = 0 + 0.40 + 1.40 + 0.90 = 2.70 $$

Key Takeaway

Expectation is the weighted mean. \(E(X) = \sum x P(X=x)\). If you need \(E(X^2)\), square the \(x\) values BEFORE multiplying by the probability.


Section 5: Measures of Spread (Variance and Standard Deviation)

The mean tells us the center, but we also need to know how spread out the possible values are. This is measured by the Variance and the Standard Deviation.

5.1 Variance, Var(X)

Variance, denoted by \(\text{Var}(X)\) or \(\sigma^2\), measures the expected squared distance of the random variable from its mean.

There are two key formulas for variance. The second one (the computational formula) is nearly always easier and faster to use in exams.

1. Definition Formula:

$$ \text{Var}(X) = E((X - \mu)^2) = \sum (x - \mu)^2 P(X=x) $$

2. Computational Formula (The one you should use!):

$$ \text{Var}(X) = E(X^2) - [E(X)]^2 $$

or, using the notation \(\mu\):

$$ \text{Var}(X) = E(X^2) - \mu^2 $$
Step-by-Step: Calculating Var(X)

We already calculated two key values in Section 4:

  • \(E(X) = \mu = 1.40\)
  • \(E(X^2) = 2.70\)

Now, apply the computational formula:

$$ \text{Var}(X) = E(X^2) - [E(X)]^2 $$ $$ \text{Var}(X) = 2.70 - (1.40)^2 $$ $$ \text{Var}(X) = 2.70 - 1.96 $$ $$ \text{Var}(X) = 0.74 $$

Did You Know? Variance is measured in (units)\(^2\). Because the units are squared, variance is hard to interpret directly, which is why we usually move on to the Standard Deviation.

5.2 Standard Deviation, \(\sigma\)

The Standard Deviation (\(\sigma\)) is simply the square root of the Variance. It brings the measure of spread back into the original units of \(X\).

$$ \sigma = \sqrt{\text{Var}(X)} $$

In our example:

$$ \sigma = \sqrt{0.74} \approx 0.860 \text{ (to 3 s.f.)} $$
Common Mistake Alert!

When using the formula \(\text{Var}(X) = E(X^2) - [E(X)]^2\), students often forget to square \(E(X)\)! Remember: It’s the expectation of the square minus the square of the expectation.

Quick Review: Variance Mnemonic

VEX ME! (Variance is E of X squared Minus E of X, squared.)


Section 6: Coding and Transformations

What happens if we change the random variable? For instance, if the company pays a fee based on the number of breakdowns, \(X\)? If the cost \(C\) is calculated as \(C = 5X + 10\), how does the expected cost change? This is called coding or transformation.

Let \(Y = aX + b\), where \(a\) and \(b\) are constants.

6.1 Rules for Expectation \(E(Y)\)

Expectation is linear. If you transform \(X\), the mean shifts and stretches in exactly the same way.

$$ E(aX + b) = a E(X) + b $$

Example: If \(E(X) = 1.40\) and Cost \(C = 5X + 10\):
$$ E(C) = 5 E(X) + 10 = 5(1.40) + 10 = 7.00 + 10 = 17.00 $$ The expected cost is 17 units.

6.2 Rules for Variance \(\text{Var}(Y)\)

Variance measures spread. Adding a constant \(b\) simply shifts the entire distribution, but it does not change how spread out the data is. Therefore, \(b\) has no effect on the variance.

Multiplying by \(a\) scales the distribution, so the variance is multiplied by \(a^2\).

$$ \text{Var}(aX + b) = a^2 \text{Var}(X) $$

Example: If \(\text{Var}(X) = 0.74\) and Cost \(C = 5X + 10\):
$$ \text{Var}(C) = \text{Var}(5X + 10) $$ $$ \text{Var}(C) = 5^2 \text{Var}(X) = 25 \times 0.74 = 18.5 $$

Rule Summary:

Operation Effect on Expectation (\(E\)) Effect on Variance (\(\text{Var}\))
Adding a constant (e.g., \(X+b\)) Adds \(b\) No change
Multiplying by a constant (e.g., \(aX\)) Multiplies by \(a\) Multiplies by \(a^2\)

Tip for Struggling Students: Remember that the constant \(b\) is just a fixed fee or base amount. If everyone's score goes up by 10 points (adding \(b\)), the average goes up by 10, but the spread among the scores stays the same.


Final Chapter Summary: The Big Three Formulas

Always have these three core formulas memorized and ready to use:

1. Expectation (Mean):
$$ E(X) = \sum x P(X=x) $$

2. Variance (Computational Form):
$$ \text{Var}(X) = E(X^2) - [E(X)]^2 $$

3. Transformation of Variance:
$$ \text{Var}(aX + b) = a^2 \text{Var}(X) $$

Master these, and you have mastered Discrete Random Variables!