Collection of notes for various classes I've taken.
The Uniform random variable, denoted by $X$, models a situation where every outcome in a given interval is equally likely. This distribution can be either discrete or continuous, but the continuous version is more common.
A discrete uniform distribution applies to a finite set of possible outcomes, with each outcome having the exact same probability.
The probability mass function (PMF) of a discrete Uniform random variable is:
\[P(X=x) = \frac{1}{n}\]for any value $x$ in the set of $n$ possible outcomes.
\[E(X) = \frac{a+b}{2}\]where $a$ and $b$ are the minimum and maximum values in the set, assuming the values are consecutive integers.
\[Var(X) = \frac{n^2 -1}{12}\]Example: Rolling a fair die
When you roll a fair six-sided die, each of the outcomes ${1, 2, 3, 4, 5, 6}$ has an equal probability of appearing. Here, $n = 6$. The probability of rolling any specific number, say a 4, is $P(X=4) = \frac{1}{6}$.
The expected value is $E(X) = \frac{1+6}{2} = 3.5$. This means that over many rolls, the average value will be 3.5.
The variance is $Var(X) = \frac{6^2 - 1}{12} = \frac{35}{12} \approx 2.92$.
This distribution is defined on a finite interval $[a, b]$, where $a$ and $b$ are the lower and upper bounds, respectively. The probability density function (PDF) is constant across this interval.
The probability density function (PDF) of a continuous Uniform random variable is:
\[f(x) = \begin{cases} \frac{1}{b - a} & \text{for } a \le x \le b \\ 0 & \text{otherwise} \end{cases}\]The cumulative distribution function (CDF) is:
\[F(x) = \begin{cases} 0 & \text{for } x < a \\ \frac{x - a}{b - a} & \text{for } a \le x \le b \\ 1 & \text{for } x > b \end{cases}\]The probability of a single value is:
\[P(c \leq X \leq d) = (d-c)\cdot \frac{1}{b-a}\]The expected value (mean) and variance are given by:
\[E(X) = \frac{a + b}{2}\] \[Var(X) = \frac{(b - a)^2}{12}\]Example: Bus arrival time
Imagine a bus arrives at a stop sometime between 8:00 AM and 8:15 AM, with every moment in this interval being equally likely. The arrival time can be modeled by a continuous uniform distribution on the interval $[a,b] = [0, 15]$ minutes.
The PDF is $f(x) = \frac{1}{15-0} = \frac{1}{15}$ for $0 \le x \le 15$.
The probability that the bus arrives between 8:05 AM and 8:10 AM is:
$P(5 \le X \le 10) = (10 - 5) \cdot \frac{1}{15-0} = 5 \cdot \frac{1}{15} = \frac{5}{15} = \frac{1}{3} \approx 33.3\%$
The expected arrival time is $E(X) = \frac{0+15}{2} = 7.5$ minutes past 8:00 AM, which is 8:07:30 AM.