FRM Part 1 · Quantitative Analysis · Chapter QTA 2

The previous chapter built probability, the language for how likely an event is. This chapter introduces the object that probability is almost always attached to in practice: a random variable, a number whose value is settled only once some experiment resolves. The loss on a trading book, the number of loans in a pool that default, the payoff of an option, a stock’s daily return: each one is a random variable, and almost every risk model is a statement about one of them.
Naming the uncertain number is the easy part. The work is describing how its possible values are spread out, because that spread is where the risk lives. The chapter builds that description in three layers. First come the functions that pin a distribution down completely: the probability mass function and the cumulative distribution function for discrete variables, and the probability density function for continuous ones. Then come the summary numbers that compress a distribution into a few figures a risk manager can compare at a glance, the expected value and the four moments. Last come the quantiles that sit directly beneath value at risk.
The discrete case comes first, because there the probabilities are visible as heights you can point at. The continuous case follows, and nearly every idea carries straight over with the sum replaced by an integral. One thread runs through the whole chapter: the distribution is the complete picture, and every summary number, however useful, throws part of that picture away.
A random variable is a function that assigns a number to each outcome of a random experiment. The outcome on its own might be a word, such as “default” or “no default”, but the random variable turns it into a number that can be added, averaged, and modeled. Label a default as 1 and survival as 0, and an event has become a random variable whose average and spread can now be discussed.
Written in symbols, the outcome is drawn from the sample space, and the random variable maps it to a number.
where ω (omega) is a single outcome in the sample space Ω (capital omega), X is the random variable, which is a function, and x is the number it returns for that outcome, called a realization. The convention is a capital letter for the variable and a lowercase letter for the value it takes.
Random variables come in two kinds, and the difference decides which tools apply. A discrete random variable takes values from a countable list, usually the whole numbers: the count of defaults in a pool, the number of trades that breach a limit, the notches of a rating downgrade. A continuous random variable can take any value in a range, with no gaps between neighboring values: a return, a price, a time to default. Discrete variables come first in this reading, because their probabilities sit as visible heights that you can point to, one value at a time.
A random variable is the number; its distribution is the map of how probable each value is. Two variables can range over the very same set of values and still behave nothing alike, because their distributions differ. So whenever a random variable is named, the next question is always what its distribution looks like. The variable by itself says nothing about risk.
For a discrete random variable, the probability mass function, or PMF, does the obvious job: it gives the probability of each value the variable can take. Two conditions make a function a valid PMF. Every probability sits between 0 and 1, and the probabilities add up to exactly 1 across everything the variable can be, since some value must occur.
where X is the discrete random variable, x is a value it can take, and p(x) is the probability that X equals x. The sum runs over every value in the variable’s support, the full list of values it can take.
One running example carries through the whole chapter. A bank holds a small pool of three comparable corporate loans, and over the coming year each loan either survives or defaults. Let X be the number of loans in the pool that default, so X can be 0, 1, 2, or 3. From its internal ratings and recovery models the bank assigns the probabilities in Exhibit 1. Read as a function, that table is the PMF.
| Defaults x | p(x) | x · p(x) |
|---|---|---|
| 0 | 0.20 | 0.00 |
| 1 | 0.40 | 0.40 |
| 2 | 0.30 | 0.60 |
| 3 | 0.10 | 0.30 |
| Total | 1.00 | 1.30 |
The probabilities add to 1, so the PMF is valid. The last column, each value times its probability, is quietly doing the work of the expected value, which the chapter reaches in a moment. First the probabilities need to be accumulated.
The cumulative distribution function, or CDF, answers a slightly different question. Not “what is the probability of exactly this value” but “what is the probability of this value or anything below it”. It is the running total of the PMF, swept from the bottom up.
where F(x) is the cumulative probability up to and including x, formed by summing the PMF over every value k at or below x.
For a discrete variable the CDF is a staircase. It stays flat between the possible values and jumps up at each value by exactly the PMF there. It starts at 0 below the smallest value and reaches 1 at the largest, and it never goes back down. Figure 2 puts the two functions side by side: the PMF as bars, and the CDF as the staircase that adds those bars up.
Reading the CDF as the probability of exactly a value. F(2) is the probability of 2 or fewer defaults, which is 0.90, not the probability of exactly 2, which is 0.30. To pull a single PMF value back out of the CDF, take the size of the jump:
The expected value of a random variable, written E[X], is its probability-weighted average. Multiply each value by its probability, then add the products. It is the single number that best answers “what is this variable on average”, and geometrically it is the center of gravity of the distribution.
where the sum runs over every value x the variable can take, each weighted by its probability p(x). For a continuous variable the sum becomes an integral, shown later in the reading.
Using the PMF in Exhibit 1, what is the expected number of defaults next year?
Step 1. Weight each value by its probability.
Step 2. Add the weighted terms.
Answer: E[X] = 1.3 defaults. Over many comparable years the pool averages 1.3 defaults, even though any single year can only ever deliver a whole number. The expected value is a planning figure for the long run, not a forecast of next year’s count.
Expectation is linear, and that single property does an enormous amount of work in later readings. Scale a variable and its expectation scales by the same factor; add a constant and its expectation shifts by that constant. Both together give the rule below.
where a and b are constants. Expectation also passes straight through a sum, so E[X + Y] = E[X] + E[Y], and this holds whether or not X and Y are independent.
Each default costs the desk a fixed workout and legal expense, and the pool carries a standing servicing cost whether or not anything defaults. Total loss is L = 1 + 4X, in millions of dollars: 1 million fixed, plus 4 million for every default. What is the expected loss?
Step 1. Apply the linearity rule.
Step 2. Substitute E[X] = 1.3 from Worked Example 1.
Answer: E[L] = 6.2 million dollars. The loss distribution never had to be rebuilt from scratch. Linearity carried the average straight through the transformation, which is exactly why expected losses across a whole book add up cleanly even when the individual positions move together.
The expected value locates a distribution, but two distributions with the same mean can look nothing alike. One might cluster tightly around the mean while the other sprawls; one might lean to the right while the other is symmetric. To describe a distribution beyond its center, risk managers use its moments. Four of them carry almost all the intuition that matters.
The first moment is the mean, E[X], the center. The other three are central moments, built from the deviation X minus the mean, so they describe the shape around that center rather than its location. The second central moment is the variance, the expected squared distance from the mean, which measures spread. Its square root is the standard deviation, which is back in the same units as the variable itself.
where μ (mu) = E[X] is the mean. The right-hand form, the mean of the squares minus the square of the mean, is usually the quicker one to compute by hand.
Find the variance and standard deviation of the default count X from Exhibit 1, where E[X] = 1.3.
Step 1. Compute E[X²] by weighting each squared value.
Step 2. Subtract the square of the mean.
Step 3. Take the square root for the standard deviation.
Answer: Var(X) = 0.81, and the standard deviation is 0.9 defaults. A typical year lands within roughly 0.9 defaults of the average of 1.3. That puts a number on how lumpy the pool’s default experience is, not just where it centers.
The third standardized moment is skewness, which measures asymmetry. Positive skew means a long right tail, the occasional large positive outcome; negative skew means a long left tail. The fourth standardized moment is kurtosis, which measures how heavy the tails are relative to a normal distribution, whose kurtosis is 3. Kurtosis above 3 means fatter tails and more frequent extreme moves, which is the usual state of affairs for financial returns. These two are called standardized because each is divided by the appropriate power of the standard deviation, which strips out the units and lets shapes be compared across variables of very different scales.
where σ (sigma) is the standard deviation. Cubing the deviation keeps the sign, so skewness can be positive or negative; raising it to the fourth power cannot be negative, so kurtosis is always positive.
Exhibit 2 collects the four moments, what each one reads off a distribution, and the value it takes for a normal distribution, the benchmark shape against which skewness and kurtosis are judged.
| Moment | Name | What it measures | Normal value |
|---|---|---|---|
| First | Mean (μ) | Center, or location, of the distribution | any |
| Second | Variance (σ²) | Spread of values around the mean | any |
| Third | Skewness | Asymmetry: positive is a long right tail, negative a long left tail | 0 |
| Fourth | Kurtosis | Tail heaviness and peakedness relative to the normal | 3 |
Computing variance as (E[X])² instead of E[X²] − (E[X])². The mean of the squares, E[X²] = 2.5 in the running example, is not the square of the mean, (E[X])² = 1.69, and the gap between the two is precisely the variance. Square each value first, then weight and sum to get E[X²]; only after that do you subtract the squared mean.
To judge how unusual a single outcome is, or to compare outcomes drawn from distributions on different scales, the trick is to standardize: subtract the mean and divide by the standard deviation. What comes out is a pure number with no units, the count of standard deviations the outcome sits from the mean.
where Z is the standardized variable. Standardizing always produces a variable with mean 0 and variance 1, whatever the original scale, which is why the normal table and the z-score work on any bell-shaped variable once it has been standardized.
A year brings 3 defaults. How unusual is that, given E[X] = 1.3 and standard deviation 0.9?
Step 1. Measure the distance from the mean, then scale by the standard deviation.
Step 2. Work out the ratio.
Answer: Z = 1.89. A three-default year sits about 1.9 standard deviations above the mean, a strong result but not an extreme one. The z-score places any outcome on one common ruler, so results from different pools, or from entirely different risks, can be lined up and compared on the same scale.
A continuous random variable can take any value in a range, so there are infinitely many possible values and no single one can carry positive probability. Ask for the probability that a return is exactly 4.000000 percent, and the honest answer is 0, because the exact value competes with infinitely many neighbors. Probability for a continuous variable lives in areas, not points, and the function that describes it is the probability density function, or PDF.
where f(x) is the PDF. Probability is the area under the density between two points; the total area under the whole density is 1, which mirrors the discrete rule that all the PMF probabilities sum to 1.
The integral sign looks heavier than it is. The exam does not ask you to evaluate an integral by hand for a continuous distribution. What it asks is the interpretation: probability is the area under the density over a range, and the whole area is 1. Carry that picture, not the calculus. Everywhere an integral appears in this reading, read it as “the area under the curve” and you have what the exam wants.
The PDF is the continuous cousin of the PMF, with one crucial difference: its height is a density, not a probability, and it can even exceed 1, as long as the total area stays 1. The CDF carries over unchanged in meaning, F(x) = P(X ≤ x), and is now a smooth rising curve rather than a staircase. Expectation carries over too, with the sum replaced by an integral, E[X] = ∫ x f(x) dx, though in words it is still the same probability-weighted average.
A density is not a probability, and it may exceed 1. A tightly concentrated continuous variable can have a PDF that peaks well above 1, because the height is probability per unit of the variable, not probability itself. Probability appears only when height is multiplied by width, that is, when you take the area under the curve over a range, and that area can never exceed the total, which is 1.
A quantile turns the CDF around. The CDF starts from a value and returns a probability; the quantile function starts from a probability and returns the value that sits at it. The p-quantile is the value where the CDF equals p, so it is the level with a fraction p of the probability below it. Because it reverses the CDF, the quantile function is often written as its inverse.
where qp is the p-quantile. For a discrete variable, the p-quantile is the smallest value whose cumulative probability reaches at least p. Value at risk is exactly a quantile of the loss distribution, which is why quantiles sit at the center of market risk measurement.
Two quantiles are used so often they have their own names. The median is the 0.5 quantile, the middle of the distribution, with half the probability on each side. The interquartile range, or IQR, is the distance from the 0.25 quantile to the 0.75 quantile, so it is the span that holds the central half of the outcomes. Like the standard deviation, the IQR is a measure of spread: a distribution with a wide IQR is more spread out than one with a narrow IQR. The one advantage of the IQR is that it ignores the extreme tails entirely, which makes it far less sensitive to a handful of outliers than the standard deviation is. A quick word on the mode, the most likely value, the peak of the PMF or PDF: for a symmetric single-peaked distribution the mean, median, and mode coincide, and skewness is what pulls them apart, dragging the mean furthest toward the long tail.
Using the default CDF, where F(0) = 0.20, F(1) = 0.60, F(2) = 0.90, and F(3) = 1.00, find the 0.75 quantile.
Step 1. Read up the CDF until the cumulative probability first reaches 0.75.
Answer: the 0.75 quantile is 2 defaults. In three years out of four the pool sees 2 or fewer defaults. For a discrete variable the quantile lands on the next attainable value rather than somewhere between values, which is what reading across the flat tread of the staircase CDF produces.
Rescaling and shifting a variable, Y = a + bX, is one of the most common operations in risk work: converting currencies, changing units, moving from a raw loss to a loss net of a fixed buffer. Its effect on each summary measure is clean and worth committing to memory. The constant a shifts the whole distribution sideways; the factor b stretches or compresses it and, if negative, flips it left to right.
The mean shifts and scales, exactly as linearity already promised. The variance ignores the shift completely and scales by the square of the factor, because variance is measured in squared units; the standard deviation therefore scales by the absolute value of the factor. Skewness and kurtosis describe pure shape, so a positive rescaling leaves them untouched; a negative factor flips the sign of skewness, since it reverses left and right, but leaves kurtosis alone. The median shifts and scales just like the mean, and the interquartile range, being a spread, behaves like the standard deviation and scales by the absolute value of the factor while ignoring the shift. Exhibit 3 lays out all seven.
| Measure | Result under Y = a + bX | What happens |
|---|---|---|
| Mean | E[Y] = a + b·E[X] | Shifts and scales |
| Variance | Var(Y) = b²·Var(X) | Shift drops out; scale squares |
| Standard deviation | σY = |b|·σX | Scales by the size of b |
| Skewness | same if b > 0; sign flips if b < 0 | Shape kept; direction flips for negative b |
| Kurtosis | unchanged | Shape measure, untouched by a and b |
| Median | med(Y) = a + b·med(X) | Shifts and scales, like the mean |
| Interquartile range | IQRY = |b|·IQRX | Shift drops out, like the SD |
Adding a constant never changes the spread. A guaranteed cash addition to a portfolio shifts its expected value but leaves its variance, its standard deviation, and its interquartile range exactly where they were. The shift moves the center; only the scale factor stretches or shrinks the risk. This is why the variance and IQR carry no term in a, while the mean and median both do.
A desk earns a base profit and loses money on each default. Its yearly profit is Y = 5 − 2X, in millions of dollars: a base of 5 million, reduced by 2 million per default. Find the expected profit, its variance and standard deviation, and state what happens to skewness. Recall E[X] = 1.3 and Var(X) = 0.81.
Step 1. Mean: shift and scale, here with b = −2.
Step 2. Variance: the shift drops out, and the factor squares.
Step 3. Standard deviation: scale by the size of the factor.
Answer: E[Y] = 2.4 million, Var(Y) = 3.24, and standard deviation 1.8 million. Because the factor is negative, the profit is a mirror image of the default count, so its skewness has the opposite sign to that of X, while its kurtosis is unchanged. The sign of b flips direction; it never touches the spread, which depends only on the size of b.
Using the default CDF (F(1) = 0.60, F(2) = 0.90), what is the probability of at least 2 defaults, P(X ≥ 2)?
“At least 2” is the complement of “1 or fewer”, so P(X ≥ 2) = 1 − F(1) = 1 − 0.60 = 0.40. Reading it straight off the PMF gives the same number, p(2) + p(3) = 0.30 + 0.10 = 0.40. The CDF route is faster because the complement of a “less than or equal to” event is exactly one minus a single CDF value.
A colleague says, “the density at this return is 1.4, so the probability of that return is 1.4.” What is wrong?
Two errors. First, a probability can never exceed 1, so 1.4 could not be a probability in any case. Second, for a continuous variable the PDF gives density, not probability, and the probability of any exact single value is 0. A density of 1.4 is perfectly legal; probability appears only when the density is integrated over a range, that is, when you take an area under the curve.
A loss is rescaled and shifted into M = 3X + 4. What happens to its median and its interquartile range compared with X?
The median follows the mean: it shifts and scales, so med(M) = 3·med(X) + 4. The interquartile range follows the standard deviation: it is a spread, so the shift of +4 drops out and only the factor of 3 acts, giving IQR of M = 3 × IQR of X. The +4 slides the whole distribution up the number line without changing how spread out it is, so any spread measure ignores it.
Why is the 0.95 quantile of a loss distribution the natural home of a 95 percent value at risk?
Value at risk asks for the loss level that is exceeded only a small fraction of the time. The 0.95 quantile of losses is the level with 95 percent of the probability below it and only 5 percent above, so losses worse than it occur just 5 percent of the time. That is precisely a 95 percent VaR, which is why quantiles, not means, are the language of tail risk.
A random variable is a rule that attaches a number to each outcome of a random experiment, for example the number of loans in a pool that default. Its distribution is the companion description that says how probable each of those numbers is. The variable is the quantity; the distribution is the full map of probabilities across everything the quantity can be.
A probability mass function, or PMF, gives the probability that a discrete random variable equals a specific value, so it is a probability at a point. A cumulative distribution function, or CDF, gives the probability that the variable is less than or equal to a value, so it accumulates the PMF from the bottom up. The CDF at a point is the running total of every PMF value at or below that point, and it climbs from 0 to 1.
A PMF is used for discrete variables and gives an actual probability at each value, since discrete values can carry positive probability. A probability density function, or PDF, is used for continuous variables, where any single exact value has probability zero, so the PDF gives density rather than probability. For a continuous variable, probability is the area under the PDF over a range, found by integration, not the height of the PDF at a point.
The expected value is the probability-weighted average of every value the random variable can take, so each value is multiplied by its probability and the products are summed. It is the long-run average you would see if the experiment were repeated many times under the same conditions. It is the balance point of the distribution, the center of mass of the probabilities.
No. The expected value is an average, so it often lands between the possible values and need not be attainable. A variable that takes only the whole numbers 0, 1, 2, and 3 can have an expected value of 1.3, even though 1.3 is not one of its outcomes. This is why the expected value is best read as a center of gravity rather than a prediction of the next result.
The first moment is the mean, which locates the center. The second central moment is the variance, which measures spread, and its square root is the standard deviation. The third standardized moment is skewness, which measures asymmetry, positive for a long right tail and negative for a long left tail. The fourth standardized moment is kurtosis, which measures how heavy the tails are relative to a normal distribution, whose kurtosis is 3.
A quantile is the value below which a given fraction of the distribution lies, so the p-quantile is the point where the cumulative distribution function equals p. The median is the 0.5 quantile, the middle of the distribution. The interquartile range is the distance from the 0.25 quantile to the 0.75 quantile, the span that holds the central half of the outcomes, and it is a measure of spread much like the standard deviation. Value at risk is itself a quantile of the loss distribution, which is why quantiles sit at the center of market risk measurement.
Adding a constant shifts every outcome by the same amount, so it moves the whole distribution sideways without changing how far the outcomes sit from each other or from the mean. Variance measures spread around the mean, and the spread is untouched by a uniform shift, so the constant drops out. Formally, for Y equal to a plus bX, the variance of Y is b squared times the variance of X, with no term in a. Only the scale factor b changes the spread; the shift a changes only the center.
Loading comments...
Add your Thoughts: