Welcome to Discrete Random Variables!

In this chapter, we transition from looking at single events to looking at the "big picture" of probability. We use Discrete Random Variables to model real-life patterns, like the number of customers arriving at a shop or how many times you have to flip a coin to get "Heads." Understanding these patterns allows us to make predictions and calculate risks, which is the heart of statistical science.

Don't worry if the formulas look a bit intimidating at first; we will break them down into simple steps that anyone can follow!

1. The Basics: What is a Random Variable?

A random variable (usually written as \(X\)) is a rule that assigns a number to each outcome of an experiment. It is discrete if it can only take specific, separate values (like 1, 2, 3...) rather than any value on a scale.

Probability Distributions

A probability distribution is simply a list or formula showing all possible values of \(X\) and the probability of each one occurring. We write this as \(P(X = x)\).

Two Golden Rules:
1. Every individual probability must be between 0 and 1: \(0 \le P(X=x) \le 1\).
2. All probabilities in a distribution must add up to 1: \(\sum P(X=x) = 1\).

Example: Let \(X\) be the score on a fair 4-sided die. The values are {1, 2, 3, 4}, each with a probability of 0.25. If you add them up (\(0.25 \times 4\)), you get 1!

Quick Review Box: If you are missing one probability in a table, just add up the others and subtract from 1!

2. Expectation and Variance

How do we find the "average" of a pattern? We use the Expectation and the Variance.

Expectation \(E(X)\)

The Expectation (or Mean, \(\mu\)) is the long-term average value. To find it, multiply each value by its probability and add them all up:
\(E(X) = \mu = \sum x P(X = x)\)

Variance \(Var(X)\)

The Variance (\(\sigma^2\)) measures how spread out the values are. The easiest formula to use is:
\(Var(X) = E(X^2) - [E(X)]^2\)

Steps to find Variance:
1. Calculate \(E(X)\) first.
2. Square each value of \(x\), multiply by its probability, and add them up to get \(E(X^2)\).
3. Subtract the square of your first answer from your second answer.

Memory Aid: Think of the variance formula as "The Mean of the Squares minus the Square of the Mean."

Key Takeaway: The Standard Deviation (\(\sigma\)) is simply the square root of the variance: \(\sigma = \sqrt{Var(X)}\).

3. Coding: Transforming Variables

Sometimes we want to change our data (e.g., converting a score into a cash prize). We use these simple rules for Expectation Algebra:

1. Expectation: \(E(a + bX) = a + bE(X)\). (It follows the rules exactly!)
2. Variance: \(Var(a + bX) = b^2 Var(X)\). (Adding a constant \(a\) doesn't change the spread, and the multiplier \(b\) is squared!)

Common Mistake to Avoid: Never subtract a constant from the variance. Even if you shift the data by -10, the "spread" remains the same, so the variance doesn't change!

4. The Discrete Uniform Distribution

This is the simplest model. It's used when every outcome is equally likely, like a fair die or a fair spinner.

If \(X\) is uniform over the values \(\{1, 2, \dots, n\}\):
\(E(X) = \frac{n + 1}{2}\)
\(Var(X) = \frac{1}{12}(n^2 - 1)\)

Example: For a standard 6-sided die (\(n=6\)), the average score \(E(X)\) is \(\frac{6+1}{2} = 3.5\).

5. The Binomial Distribution \(X \sim B(n, p)\)

You met this in A Level Maths, but in Further Maths, we look closer at its properties. Use this when you have a fixed number of trials (\(n\)) and two outcomes (Success or Failure).

Key Properties:
Mean: \(E(X) = np\)
Variance: \(Var(X) = np(1 - p)\)

Did you know? A Binomial variable is just the sum of \(n\) independent Bernoulli trials (trials where \(n=1\)). This is why the mean is just \(n \times p\)!

6. The Poisson Distribution \(X \sim Po(\lambda)\)

This models the number of events occurring in a fixed interval of time or space (e.g., the number of emails received in an hour).

Conditions for a Poisson Model:
- Events occur randomly and independently.
- Events occur at a constant average rate (\(\lambda\)).
- Events cannot occur simultaneously.

The "Magic" Property:
In a Poisson distribution, the Mean and Variance are equal!
\(E(X) = \lambda\)
\(Var(X) = \lambda\)

Quick Review: If you're asked if a Poisson model is suitable for a data set, check if the calculated mean and variance are similar. If they are very different, Poisson is a bad choice!

Combining Poissons: If \(X \sim Po(\lambda)\) and \(Y \sim Po(\mu)\) are independent, then their sum is also Poisson: \(X + Y \sim Po(\lambda + \mu)\).

7. The Geometric Distribution \(X \sim Geo(p)\)

The Geometric distribution models the number of trials up to and including the first success. Think of it as the "How long must I wait?" distribution.

Formulas:
- Probability of success on the \(r\)-th trial: \(P(X = r) = (1 - p)^{r-1}p\)
- Probability it takes more than \(r\) trials: \(P(X > r) = (1 - p)^r\)
- Mean: \(E(X) = \frac{1}{p}\)
- Variance: \(Var(X) = \frac{1 - p}{p^2}\)

Example: If the probability of winning a game is 0.2, the average number of games you need to play to win once is \(\frac{1}{0.2} = 5\) games.

8. Linear Combinations of Independent Variables

This is where Further Maths gets exciting! What if we have two different random variables, \(X\) and \(Y\), and we want to find the mean and variance of them combined? If \(X\) and \(Y\) are independent:

Combining Means (Expectation)

\(E(X + Y) = E(X) + E(Y)\)
\(E(X - Y) = E(X) - E(Y)\)
\(E(aX + bY) = aE(X) + bE(Y)\)

Combining Variances (The Square Rule)

Crucial Rule: When you combine variables, variances always add (as long as they are independent). Even if you are subtracting the variables, the uncertainty (variance) increases!
\(Var(X + Y) = Var(X) + Var(Y)\)
\(Var(X - Y) = Var(X) + Var(Y)\) (Yes, it's still a plus!)
\(Var(aX \pm bY) = a^2 Var(X) + b^2 Var(Y)\)

Analogy: Imagine \(X\) and \(Y\) are two different shaky robots. If you put one robot on top of the other, the total "shakiness" (variance) gets worse, regardless of whether they are moving in the same or opposite directions!

Key Takeaway Summary:
- Use Expectation for averages and Variance for spread.
- Poisson is for counts in time; Geometric is for waiting until success.
- For independent variables: Means follow the sign, but Variances always add!