Introduction to Discrete Random Variables

Welcome! In this chapter, we are moving from basic probability (like the chance of rolling a 6) to something more powerful: Discrete Random Variables. Think of a random variable as a way to map the outcomes of a random event to numbers. For example, if you toss three coins, the "random variable" could be the number of heads you get. It’s "discrete" because you can count the outcomes (you can’t get 1.5 heads!). This topic is essential for predicting long-term averages and understanding risks in real-world scenarios like insurance, gaming, and quality control.

1. What is a Discrete Random Variable?

A random variable (usually written as a capital letter like \(X\)) represents a numerical value associated with the outcome of an experiment. A discrete random variable can only take specific, distinct values (like 0, 1, 2...).

The Probability Distribution

A probability distribution is simply a list or table showing all possible values of \(X\) and their corresponding probabilities. We write the probability that the variable \(X\) takes a specific value \(x\) as \(P(X = x)\).

The Two Golden Rules:
1. Every individual probability must be between 0 and 1: \(0 \leq P(X = x) \leq 1\).
2. The sum of all probabilities in the distribution must equal 1: \(\sum P(X = x) = 1\).

Quick Tip: If you are solving a problem and the probabilities don't add up to 1, something is wrong! This is a great way to check your work.

2. Expected Value \(E(X)\)

The Expected Value, written as \(E(X)\), is the long-term average of the random variable if you were to repeat the experiment many, many times. It is also called the mean (\(\mu\)).

How to calculate it:
Multiply each possible value of \(x\) by its probability, then add them all together:
\(E(X) = \sum x \cdot P(X = x)\)

Example: Imagine a simple game where you win \$10 with probability 0.2 and win \$2 with probability 0.8.
\(E(X) = (10 \cdot 0.2) + (2 \cdot 0.8) = 2 + 1.6 = 3.6\)
On average, you "expect" to win \$3.60 per game. Note that you can't actually win \$3.60 in a single game; it's just the average over time!

Key Takeaway:

The Expected Value is the theoretical mean. If a question asks for the "average outcome" or "fair price" of a game, they are asking for \(E(X)\).

3. The Binomial Distribution

The Binomial Distribution is a special type of discrete distribution that applies when we have a repeated "trial" with only two possible outcomes: Success or Failure.

When can you use Binomial? (Remember "BINS")

Don't worry if you're unsure when to use this; just check the BINS criteria:
B – Binary: There are only two outcomes (Success or Failure).
I – Independent: One trial does not affect the next (like flipping a coin).
N – Number: There is a fixed number of trials (\(n\)).
S – Success: The probability of success (\(p\)) stays the same for every trial.

We write this as: \(X \sim B(n, p)\)
Where \(n\) is the number of trials and \(p\) is the probability of success.

4. Mean and Variance of a Binomial Distribution

If you know a variable follows a Binomial Distribution, calculating its mean and variance becomes very simple using these formulas:

Mean (Expected Value):
\(E(X) = n \cdot p\)

Variance:
\(Var(X) = n \cdot p \cdot (1 - p)\)
Note: The standard deviation is simply the square root of the variance.

Example: If you throw a fair die 60 times and "Success" is rolling a 6:
\(n = 60\)
\(p = 1/6\)
\(E(X) = 60 \cdot (1/6) = 10\). This means we expect to see ten 6s.

5. Using Technology (GDC) for Binomial Probabilities

In the IB AI course, you will almost always use your Graphic Display Calculator (GDC) to find binomial probabilities rather than calculating them by hand. There are two main functions you need to know:

Binomial PDF (Probability Density Function)

Use this when you want to find the probability of an exact number of successes.
Example: "What is the probability of getting exactly 5 heads in 10 tosses?"
Calculator notation: \(P(X = k)\)

Binomial CDF (Cumulative Distribution Function)

Use this when you want to find the probability of a range of successes.
Example: "What is the probability of getting at most 3 heads?" (\(P(X \leq 3)\)) or "Between 2 and 5 heads?"
Calculator notation: \(P(X \leq k)\)

Common Mistake: Be careful with words like "more than" or "less than."
If \(X\) is the number of successes in 10 trials:
- "Less than 4" means \(P(X \leq 3)\).
- "More than 4" means \(P(X \geq 5)\), which your calculator might require you to enter as \(1 - P(X \leq 4)\) depending on the model.

6. Summary and Checklist

Checklist for Success:
- Can I identify if a variable is discrete? (Can I count it?)
- Do my probabilities in a table add up to 1?
- Can I calculate \(E(X)\) by multiplying \(x\) and \(P(X=x)\)?
- Do I know the BINS criteria for a Binomial Distribution?
- Do I know which button to press on my GDC for "exact" (PDF) vs "cumulative" (CDF) probabilities?

Did you know? The Binomial Distribution was named after Jacob Bernoulli, a Swiss mathematician. This is why binomial trials are often called "Bernoulli trials"!

Key Takeaway:

The Binomial Distribution is all about consistency. If the probability \(p\) changes (like drawing cards from a deck without putting them back), it is not Binomial. Always check that \(p\) remains constant!