Before we can price an option or measure portfolio risk, we need a language for uncertainty. That language is probability, and its central object is the random variable. This lesson builds it from the ground up.
Intuition
Imagine flipping a coin or watching tomorrow's stock return. We do not know the outcome in advance, but we can describe the set of possible outcomes and how likely each is. A random variable is simply a rule that attaches a number to each outcome, so that "the chance of heads" becomes "the chance the number equals 1". Once outcomes are numbers, we can average them, square them, and feed them into pricing formulas.
Formal definition
Start with a sample spaceΩ, the set of all possible outcomes of an experiment. A random variableX is a function
X:Ω→R,ω
References and further study
Know what to read—and why
Each source below is selected for this course. Use the study note to connect it to the lesson, then cite the original source in submitted work.
Copyright rule: MatheLinux links to the official source and stores only the citation. It does not copy or host external books, papers, videos, or datasets. Learners must quote sparingly, cite the source, and follow the source's own licence or terms.
Submit work
Before you continue
Lesson close · Mathematical Foundations of Quantitative Finance
Consolidate Random Variables & Distributions
Use this checkpoint to recall the lesson before marking it complete. The concepts below come from this lesson's authored sections.
Key concepts covered
01Intuition
02Formal definition
03A short derivation: CDF of the exponential
04Worked numerical example
05A catalog of the workhorse distributions
What you should know now
□Explain Random Variables & Distributions in your own words and state the assumptions.
□Reproduce the main argument, derivation, or implementation without copying the lesson.
Stuck? Send a blocker
One sentence on what stopped you (definition, derivation, lab control, time). This feeds Module-1 product metrics — not a public comment thread.
Progress
□
Check one example against units, boundary conditions, or edge cases.
□Name one modeling or implementation limitation and when it matters.
Sequence
Continue to Expectation, Variance & Moments, the next prerequisite step in this course.
It maps each raw outcome ω to a real number. Events like "X≤x" are subsets of Ω, and probability assigns them a number in [0,1].
The cumulative distribution function (CDF) collects everything we need:
FX(x)=P(X≤x).
FX is non-decreasing, right-continuous, with FX(−∞)=0 and FX(+∞)=1.
If X takes countably many values, it is discrete and described by a probability mass function (PMF):
pX(x)=P(X=x),∑xpX(x)=1.
If FX is differentiable, X is continuous and described by a probability density function (PDF):
fX(x)=dxdFX(x),∫−∞∞fX(x)dx=1.
For a continuous variable P(X=x)=0; probability lives in intervals: P(a≤X≤b)=∫abfX(x)dx.
A short derivation: CDF of the exponential
The exponential distribution with rate λgreaterthan0 has density fX(x)=λe−λx for x≥0. Let us derive its CDF. For x≥0,
FX(x)=∫0xλe−λtdt.
Use the antiderivative dtd(−e−λt)=λe−λt:
FX(x)=[−e−λt]0x=−e−λx−(−e0)=1−e−λx.
Check the endpoints: FX(0)=0 and FX(∞)=1, as required. The density integrates to 1, confirming it is a valid distribution.
Worked numerical example
Let X be Binomial with n=3 trials and success probability p=0.5 (think: number of up-days in 3 days, each up with probability 0.5). Its PMF is
pX(k)=(kn)pk(1−p)n−k.
Compute each value:
k
(k3)
pX(k)
0
1
1⋅0.50⋅0.53=0.125
1
3
3⋅0.51⋅0.52=0.375
2
3
3⋅0.52⋅0.51=0.375
3
1
1⋅0.53⋅0.50=0.125
The masses sum to 0.125+0.375+0.375+0.125=1, as they must. The probability of at least 2 up-days is P(X≥2)=0.375+0.125=0.5.
Two building-block cases worth memorizing: the Bernoulli (n=1) with P(X=1)=p, P(X=0)=1−p; and the continuous Uniform on [a,b] with constant density fX(x)=1/(b−a) on the interval, giving P(a≤X≤b)=1.
A catalog of the workhorse distributions
It pays to keep a short mental table of the distributions you will meet constantly. Each is just a different choice of PMF or PDF, and each models a different kind of uncertainty.
Distribution
Type
Models
Key parameter(s)
Bernoulli
Discrete
A single yes/no trial
p
Binomial
Discrete
Number of successes in n trials
n,p
Uniform
Continuous
Equally likely values on an interval
a,b
Exponential
Continuous
Waiting time until an event
λ
Normal
Continuous
Sums of many small shocks (returns)
μ,σ
The exponential deserves a closer look because it is the model for waiting times, the time until a default, a trade, or a market jump. Its defining feature is the memoryless property: having waited s units of time tells you nothing about how much longer you must wait,
This follows directly from the CDF: P(Xgreaterthans+t∣Xgreaterthans)=e−λ(s+t)/e−λs=e−λt. No other continuous distribution on the positive reals has this property, which is exactly why exponential waiting times are the simplest possible model for the timing of unpredictable events.
The binomial, meanwhile, is just a sum of n independent Bernoulli variables, which is why a binomial option-pricing tree is built by chaining single up/down steps. As n grows large the binomial begins to look like the bell-shaped normal, a foreshadowing of the Central Limit Theorem you will meet later in this module.
Why quants care
Every pricing model is a statement about the distribution of a future quantity. The Black-Scholes model assumes the log-return of a stock is normal; a credit model assumes default times are (roughly) exponential; a binomial tree literally walks a binomial random variable forward in time. Knowing whether a quantity is discrete or continuous tells you whether to sum a PMF or integrate a PDF, and the CDF is exactly what you invert to simulate scenarios or read off a Value-at-Risk quantile. Master the random variable and the rest of quantitative finance becomes applied calculus on distributions.
Adapted from MIT OpenCourseWare (18.03 / 18.S096), CC BY-NC-SA.
Mark this lesson complete to track progress
Problems
P1
For a Binomial(n=3, p=0.5) random variable, compute P(X >= 2), the probability of at least 2 successes. Give a decimal.
P2
An Exponential random variable has rate lambda = 0.5. Using F(x) = 1 - e^{-lambda x}, compute P(X <= 2). Give a decimal.
Knowledge check
Q1.A random variable X is best described as which of the following?
Q2.For a continuous random variable with density f, what is P(X = x) for a single point x?
Q3.Which property must every valid PDF satisfy?
Q4.The CDF of an Exponential(lambda) random variable is:
Submit work
Choose one lesson task
Optional human feedback—not required to mark the lesson complete. Pick a brief, submit it, or continue without submitting.
Optional
Human-graded work is a Pro course feature
The free lesson, quiz, and problem checks remain available. Pro members can choose a brief below, submit work, and receive a score and written feedback.