Welcome to Discrete Random Variables!

In this chapter, we are going to explore how to turn "chance" into "math." Imagine you are playing a board game. You know that rolling a 6 is a matter of luck, but if you roll the die 1,000 times, you can actually predict your average score. Discrete Random Variables allow us to model these real-world uncertainties using precise formulas. Whether it’s predicting how many customers walk into a shop or how many times you need to flip a coin to get "Heads," these tools make the unpredictable predictable.

Don't worry if the formulas look a bit intimidating at first; we will break them down step-by-step!

1. What is a Discrete Random Variable?

A Random Variable (usually written as a capital letter like \(X\)) is a quantity whose value depends on the outcome of a random event.
The term Discrete means it can only take specific, separate values (like 1, 2, 3...) rather than any value on a scale (like 1.234...).

The Probability Function:
We use \(P(X = x)\) to show the probability that the variable \(X\) takes a specific value \(x\). These are often shown in a table or a formula.

The Two Golden Rules:
1. Every individual probability must be between 0 and 1: \(0 \leq P(X=x) \leq 1\).
2. All probabilities in a distribution must sum to 1: \(\sum P(X=x) = 1\).
Quick Tip: If you are solving a problem and your probabilities don't add up to 1, check your addition! This is the most common mistake.

Summary Takeaway: A discrete random variable is just a way to list all possible outcomes of an event and the chances of them happening.

2. Expectation (Mean) and Variance

If you ran an experiment millions of times, what would the average result be? That is the Expectation, written as \(E(X)\) or \(\mu\).
Formula: \(E(X) = \sum x P(X = x)\)
Analogy: Think of it as a "weighted average" where values with higher probabilities pull the average closer to them.

Variance measures how "spread out" the results are from the mean. A high variance means the results are all over the place; a low variance means they are mostly close to the average.
Formula: \(Var(X) = E(X^2) - [E(X)]^2\)
To find \(E(X^2)\), you just square each \(x\) value before multiplying by its probability.

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

Quick Review Box:
- Expectation = Average outcome.
- Variance = Consistency of outcomes.
- Always calculate \(E(X)\) first, as you need it for the Variance formula!

3. Coding: Transforming Variables

Sometimes we change our data. For example, if \(X\) is a score in a game, maybe the new score is \(2X + 5\). How does this change our mean and variance?

The Rules of Linear Transformations:
- For Expectation: \(E(a + bX) = a + bE(X)\). (It follows the rules exactly!)
- For Variance: \(Var(a + bX) = b^2 Var(X)\).
Memory Aid: Variance hates addition! Adding a constant (\(a\)) doesn't change the spread of the data, so it is ignored. Multiplying by \(b\) makes the spread grow, but because variance is "squared" units, we use \(b^2\).

Key Takeaway: Adding a number shifts the whole graph but doesn't change the spread. Multiplying stretches the graph and increases the spread significantly.

4. Linear Combinations of Independent Variables

What if we have two independent variables, \(X\) and \(Y\), and we want to add them together? (For example, the total height of two randomly selected people).
Expectation: \(E(X \pm Y) = E(X) \pm E(Y)\)
Variance: \(Var(X \pm Y) = Var(X) + Var(Y)\)
Crucial Point: Even if you are subtracting variables (\(X - Y\)), you still add the variances! This is because combining two uncertain things always results in more total uncertainty (spread).

5. The Discrete Uniform Distribution

This is the simplest model. It's used when every outcome is equally likely.
Example: A fair 6-sided die. Every number has a probability of \(1/6\).

If \(X\) is uniform over the set \(\{1, 2, ..., n\}\):
- Mean: \(E(X) = \frac{n + 1}{2}\)
- Variance: \(Var(X) = \frac{1}{12}(n^2 - 1)\)
Did you know? These formulas only work if your values start at 1 and go up in steps of 1. If your values are \(\{4, 5, 6, 7\}\), it's still uniform, but you'd calculate the mean by finding the middle!

6. The Binomial Distribution

You likely remember this from AS Level. It models the number of "successes" in a fixed number of trials.
Notation: \(X \sim B(n, p)\)
New for Further Maths: You need to know the mean and variance formulas for Binomial:
- Mean: \(E(X) = np\)
- Variance: \(Var(X) = np(1 - p)\)

7. The Poisson Distribution

This is used for events that happen "randomly in time or space."
Example: The number of emails you receive in an hour, or the number of weeds in a square meter of grass.

Conditions (The "CRIS" criteria):
- C: Constant average rate (\(\lambda\)).
- R: Randomly and Independently occurring.
- I: In isolation (events cannot happen at the exact same time).
- S: Singly (one at a time).

Key Features:
- Notation: \(X \sim Po(\lambda)\).
- Mean and Variance: In a Poisson distribution, the mean and variance are the same! \(E(X) = Var(X) = \lambda\).
Quick Check: If a question gives you data where the mean is 5 and the variance is 20, a Poisson model is probably not suitable!

Summing Poissons: If you have two independent Poisson variables, \(X \sim Po(\lambda)\) and \(Y \sim Po(\mu)\), then \(X + Y \sim Po(\lambda + \mu)\). You just add the rates together!

8. The Geometric Distribution

The Geometric distribution models the number of trials until the first success occurs.
Example: Flipping a coin until you get your first "Heads."

Notation: \(X \sim Geo(p)\), where \(p\) is the probability of success.
Probabilities:
- To get the first success on the \(r^{th}\) trial: \(P(X = r) = (1 - p)^{r-1} p\).
- To wait more than \(r\) trials for a success: \(P(X > r) = (1 - p)^r\).
Analogy: To fail for 5 trials and then succeed on the 6th, you must have (Failure \(\times\) Failure \(\times\) Failure \(\times\) Failure \(\times\) Failure \(\times\) Success).

Properties:
- Mean: \(E(X) = \frac{1}{p}\)
- Variance: \(Var(X) = \frac{1 - p}{p^2}\)

Common Mistake to Avoid: Make sure you know if the question defines \(X\) as the "number of trials" (this syllabus) or the "number of failures before the first success." Always read carefully!

Final Summary of Key Models

1. Binomial: Fixed number of tries, count the successes.
2. Poisson: Fixed interval (time/space), count the occurrences.
3. Geometric: Keep trying until you succeed for the first time.
4. Uniform: Everything is equally likely.

Don't worry if this seems tricky at first! The best way to master these is to practice identifying which model fits the story in the question. You've got this!