Welcome to the Discrete Uniform Distribution!

In the world of statistics, we often deal with things that are unpredictable. But what if every single outcome is equally likely? Imagine rolling a perfectly balanced die or picking a name out of a hat where every slip of paper is the same size. This "fairness" is the heart of the Discrete Uniform Distribution.

In this chapter, we will learn how to identify these situations, calculate their probabilities, and use some clever formulas to find their average (mean) and spread (variance). Don't worry if the formulas look a bit intimidating at first—we'll break them down step-by-step!

1. What is a Discrete Uniform Distribution?

A Discrete Uniform Distribution occurs when a random variable \(X\) has a finite number of possible outcomes, and each outcome has the exact same probability of happening.

Conditions for Application

You can use this distribution when:
1. The outcomes are discrete (you can count them, like 1, 2, 3...).
2. There is a finite number of outcomes (\(n\)).
3. Each outcome is equally likely.

Analogy: Think of a raffle where 100 tickets are sold. If the winning ticket is picked fairly, every ticket holder has a 1 in 100 chance of winning. This is a uniform distribution!

The Probability Function

If there are \(n\) possible outcomes (for example, the integers from \(1\) to \(n\)), the probability of any specific outcome \(x\) is:
\(P(X = x) = \frac{1}{n}\)

Quick Review: Since all probabilities in a distribution must add up to 1, if you have \(n\) items, each one must be \(\frac{1}{n}\) because \(n \times \frac{1}{n} = 1\).

2. Calculating the Mean (Expected Value)

The Mean, or \(E(X)\), tells us the "average" outcome we would expect if we repeated the experiment many times.

The Formula

For a uniform distribution starting at 1 and ending at \(n\):
\(E(X) = \frac{n + 1}{2}\)

The Derivation (You need to know this!)

To find the expected value, we sum up (Outcome \(\times\) Probability) for all values:
\(E(X) = \sum x P(X=x)\)
Since \(P(X=x) = \frac{1}{n}\) for all \(x\), we can pull it out of the sum:
\(E(X) = \frac{1}{n} \sum_{x=1}^{n} x\)

Prerequisite Check: Remember from your Pure Math studies that the sum of the first \(n\) integers is \(\frac{n(n+1)}{2}\).
Substitute that in:
\(E(X) = \frac{1}{n} \times \frac{n(n+1)}{2}\)
The \(n\)'s cancel out, leaving us with:
\(E(X) = \frac{n + 1}{2}\)

Memory Tip: The mean is just the exact middle of your range! If you have numbers 1 to 5, the middle is \(\frac{5+1}{2} = 3\).

3. Calculating the Variance

The Variance, or \(Var(X)\), measures how "spread out" the outcomes are from the mean.

The Formula

For a uniform distribution from 1 to \(n\):
\(Var(X) = \frac{n^2 - 1}{12}\)

The Derivation (This is the tricky one!)

We use the formula: \(Var(X) = E(X^2) - [E(X)]^2\)

Step 1: Find \(E(X^2)\)
\(E(X^2) = \sum x^2 P(X=x) = \frac{1}{n} \sum_{x=1}^{n} x^2\)
Using the sum of squares formula \(\frac{n(n+1)(2n+1)}{6}\):
\(E(X^2) = \frac{1}{n} \times \frac{n(n+1)(2n+1)}{6} = \frac{(n+1)(2n+1)}{6}\)

Step 2: Subtract \([E(X)]^2\)
\(Var(X) = \frac{(n+1)(2n+1)}{6} - (\frac{n+1}{2})^2\)
To solve this, we find a common denominator (12):
\(Var(X) = \frac{2(n+1)(2n+1)}{12} - \frac{3(n+1)^2}{12}\)
Factor out \(\frac{n+1}{12}\):
\(Var(X) = \frac{n+1}{12} [2(2n+1) - 3(n+1)]\)
\(Var(X) = \frac{n+1}{12} [4n + 2 - 3n - 3]\)
\(Var(X) = \frac{n+1}{12} [n - 1]\)
\(Var(X) = \frac{n^2 - 1}{12}\)

Takeaway: You must be able to reproduce these steps in the exam if asked for a derivation!

4. Real-World Example: The Fair Spinner

Imagine a spinner with 8 equal sections labeled 1 to 8.
Here, \(n = 8\).

Probability: Every number has a probability of \(\frac{1}{8}\).
Mean: \(E(X) = \frac{8+1}{2} = 4.5\).
Variance: \(Var(X) = \frac{8^2 - 1}{12} = \frac{63}{12} = 5.25\).

5. Common Mistakes to Avoid

1. Using the wrong \(n\): Always count how many possible outcomes there are. If the outcomes are 0, 1, 2, 3, 4, then \(n = 5\), not 4!
2. Forgetting the \(+1\) or \(-1\): In the mean, it's \(n+1\). In the variance, it's \(n^2-1\).
3. Assuming it's continuous: This is the Discrete Uniform Distribution. This means \(X\) can only take specific values (like integers), not any value in between (like 2.5).

Summary Checklist

- Uniformity: Does every outcome have the same probability?
- \(P(X=x)\): Simply \(\frac{1}{n}\).
- Mean: \(\frac{n+1}{2}\) (The average/middle).
- Variance: \(\frac{n^2-1}{12}\) (The spread).
- Derivations: Can you use \(\sum r\) and \(\sum r^2\) to prove the formulas? (Check section 2 and 3 again if not!)

Did you know? The number 12 in the variance formula is a mathematical constant for this distribution—it doesn't change regardless of what \(n\) is!