Random Variables
A random variable is a bridge between the world of probability experiments and the world of numbers — it assigns a numerical value to every outcome of a random experiment.
Formal Definition
A random variable is a function $X: S \to \mathbb{R}$ that assigns a real number to each outcome in the sample space $S$ of a random experiment.
We typically denote random variables with capital letters ($X$, $Y$, $Z$) and their specific values with lowercase letters ($x$, $y$, $z$).
Discrete Random Variables
A random variable is discrete if it can take on a countable number of distinct values (finite or countably infinite).
Examples:
- Number of heads in 10 coin flips: $X \in \{0, 1, 2, \ldots, 10\}$
- Number of customers arriving per hour
- Number of defective items in a batch
Probability Mass Function (PMF):
$$P(X = x_i) = p_i$$
where $\sum_{i} p_i = 1$ and $0 \leq p_i \leq 1$ for all $i$.
Continuous Random Variables
A random variable is continuous if it can take on any value within an interval (uncountably many values).
Examples:
- Height of a randomly selected student
- Time to complete a test
- Temperature at noon tomorrow
Probability Density Function (PDF):
$$P(a \leq X \leq b) = \int_a^b f(x)\, dx$$
where $\int_{-\infty}^{\infty} f(x)\, dx = 1$ and $f(x) \geq 0$.