A random process, where each outcome is associated with some number.
Random Variable
A random variable is a function that maps outcomes from a probability space to real numbers.
Formally, where is the sample space.Technical requirement: For any Borel set , the preimage must be measurable (i.e., it must be an event we can assign probability to).
Types of Random Variables
discrete: Takes countably many values (e.g., coin flips, die rolls)
- Has a probability mass function (PMF):
- CDF is a step function
continuous: Takes any value in an interval (e.g., height, temperature)
- Has a probability density function (PDF):
- CDF is continuous:
Rolling a fair six-sided die
maps each face to its numberEach outcome has probability for (uniform distribution)
Flipping a coin 4 times and counting the number of heads:
The sample space contains all possible sequences of 4 flips .
Let be the random variable counting the number of heads.
For , the probability distribution is:This follows a binomial distribution with trials and probability of heads on each trial.
Random variables are a concise summary of probabilitiies / useful abstractions…
They let us:
- Apply functions and transformations
- e.g. the probability function → probability distribution.
- Calculate expected value, variance, standard deviation
- Answer practical questions like “What’s the probability of getting 10-15 emails in the next hour?”
- what’s the probability of being in a range of values?
- what value do I expect, if I just sample a random item?
- how much spread does the distribution have?
- how surprised would I be if the sampled item differs by so much?
- how many emails do I expect to get in the next 10 minutes, given a certain rate of email?
- would I be surprised if I got no emails in that time?
Two random variables can be independent, meaning the outcome of one does not affect the probability distribution of the other.
and are independent if:
for all Borel sets . For discrete random variables, this simplifies to for all possible values .
Functions of Random Variables
If is a random variable and , then is also a random variable.
Notatio:
PDF:
CDF:
We can go from directly, and then from to . by taking the derivative, but we can’t go from to directly
why?
Example: Mapping distribution of probability in C to F:
If you just do it naively like that the result might no longer be a normal / probability distribution.
Finding the distribution of
Method 1: Through CDFs (always works)
Then differentiate to getMethod 2: Direct PDF transformation (when is monotonic)
The derivative term (Jacobian) accounts for how stretches/compresses probability density.
Given , we want
Using Method 1:
Differentiating:
This is the standard normal PDF, confirming .