EZ

Eduzan

Learning Hub

Eduzan
Eduzan / 02 Quantitative Analysis

QTA 2: Random Variables

Worked examples are fully visible. Check-yourself items are study aids you can reveal one at a time.

Probability is built on events, and an event is an abstract object: the coin landing heads, the borrower failing to pay. Abstractions are awkward to work with, because ordinary arithmetic has nothing to grip. A random variable removes the awkwardness by attaching a number to every outcome in the sample space, so that algebra and calculus become available for describing uncertainty.

Formally, a random variable is a function. It takes an outcome w from the sample space and returns a number, and that number is called a realization.

X is the function; x is the realization it produced.

Notation keeps the two apart: upper-case letters such as X, Y and Z name random variables, and the matching lower-case letters name realizations.

Coding outcomes as numbers

Some phenomena arrive already numeric, so the return on a portfolio of stocks needs no translation. Others have to be coded. Corporate default is the standard illustration: give the variable the value one whenever the bond has defaulted, and zero while it is still paying, and a question about credit turns into a quantity that can be averaged and summed. So the restriction to numeric values costs little.

Questions then take a standard shape. Suppose X records the face showing after one throw of a fair die, with x the result of that throw. Asking how often a five comes up is asking for Pr(X = x) when x = 5. Two functions carry almost all of the descriptive work from there: the probability mass function, giving the chance attached to one value, and the cumulative distribution function, giving the chance of landing at or below a value.

Check yourself
Why is the expected value of a random variable a constant rather than a random variable?
The variable is a function that can return different numbers on different occasions. An expectation averages across all of them, weighting each by its probability, so the uncertainty is integrated away and one fixed number remains.
End of lesson.