Elements of Mathematics
From First Principles for Data Scientists, AI Engineers and Quants
Some objects turn up in the Elements of Mathematics series because they are needed, not because the argument at hand is about them. The normal distribution appears in an option price. Euler's number appears in a discount factor. A Taylor expansion appears in the middle of a proof about something else.
Stopping to build each one where it appears would wreck the flow of the piece that needed it. Not building it at all would break the promise this series makes, which is that nothing is used without being explained.
So they live here. Each entry is self-contained and can be read on its own. Articles link to the relevant entry at the point of use, and you can follow the link or take the one-line summary and carry on.
This page grows as the series does. Entries are added when an article first needs them.
Contents
- A. The bell curve, and the function with no formula: what and actually are, and why no elementary formula exists
- B. Euler's number, and why it appears in discounting: where comes from and what is actually doing
- C. Taylor expansion: approximating a curve by a polynomial, and the error term that makes it honest
- D. The characteristic function: compressing a whole distribution into one function you can multiply
A. The bell curve, and the function with no formula
Used by: Ito's calculus, in the Black-Scholes formula.
In one line: is the area under the bell curve to the left of , and it has no formula in terms of ordinary functions, so it gets a name instead.
What the bell curve is
The standard normal distribution is the curve
Read that as: take , square it (so negative and positive give the same answer, making the curve symmetric), halve it, and put a minus sign in front. Feed that to the exponential function, which turns large negative numbers into numbers very close to zero. So the curve is tall in the middle, where is small, and falls away fast in both directions. The at the front is a scaling constant, and its job is explained below.
The symbol is a Greek lower-case phi. It is a name, not an operation.
What is
is the area under that curve to the left of :
Read that as: the elongated S is an integral sign, which means "the area under". The underneath and the on top say the area runs from the far left up to the point . The at the end says is the variable being swept across, and it is a different letter from only to avoid using one symbol for two jobs in the same expression.
Since the total area under the whole curve is 1, is a probability: the chance a standard normal random draw comes out below . That is why it appears in an option price. in the Black-Scholes formula is literally the probability the option finishes in the money.
Three values worth knowing, which pin the shape down:
| meaning | ||
|---|---|---|
| half the area is left of centre, by symmetry | ||
| the source of the "95% confidence interval" | ||
| the mirror image |
The part that surprises people
There is no formula for in terms of the functions you know. No combination of powers, roots, exponentials, logarithms and trigonometric functions equals that integral. This is not a gap in anyone's cleverness: it was proved impossible, by Liouville in the 1830s, in much the same spirit as proving no formula solves the general fifth-degree polynomial.
So the integral is given a name and treated as a function in its own right. The conventional name is the error function:
That is the same shape of integral, with the constants arranged differently by historical accident. Converting between them is a change of scale:
Where the comes from: the bell curve uses and erf uses , so substituting converts one into the other. The and the shift the range from erf's to a probability's .
The Python companion code implements exactly this identity, which is why an option price in this series depends on no library beyond math.erf.
Why the is there
The scaling constant exists to make the total area equal 1, and the fact that it involves is one of the pleasant surprises in mathematics. There is no circle anywhere in sight.
The move: you cannot integrate directly, so square the problem instead. Squaring turns one integral into a double integral over the plane, and a double integral over the plane can be done in circular coordinates, where the circle finally appears.
Write , the quantity we want. Then
The second step uses different letters for the two copies, which is legal because each is a definite integral producing a number, and the letter used inside is irrelevant. Multiplying two integrals then combines into one integral over the whole plane.
Now is the squared distance from the origin, so in circular coordinates it is just , and the area element becomes . That extra factor of is what rescues the calculation:
The inner integral is now elementary, because is exactly the derivative pattern needs: it evaluates to . The outer one contributes . So and .
That is where the in the bell curve comes from, and the is the angle swept by a full circle. The circle was hiding in the fact that depends only on distance from the origin.
This is one of the derivations worth seeing once. If you skipped it, the only thing to carry is that the constant makes the total area 1.
B. Euler's number, and why it appears in discounting
Used by: Ito's calculus, in the discount factor .
In one line: is what compound interest converges to when compounded continuously, and is the factor converting a future amount into its value today.
Where the number comes from
Invest £1 at 100% interest for a year. Paid once at the end, you have £2. Paid twice a year at 50% each, you have , because the first payment earns interest during the second half. Paid monthly at each:
Keep going, and the total does not run away to infinity. It settles:
| compounded | value |
|---|---|
| once a year | 2.00000 |
| monthly | 2.61304 |
| daily | 2.71457 |
| hourly | 2.71813 |
| continuously | 2.71828… |
Read that as: means "what this settles down to as grows without bound". Not what it equals at any particular , but the value it approaches. That the limit exists at all is guaranteed by the completeness property, which is the subject of the first article in this series: the sequence increases and stays below 3, and a sequence that increases and stays bounded has to converge to something.
What does
At a continuously compounded rate for time , an amount grows by . So to go the other way, from a future amount to what it is worth today, you multiply by .
With and year, . A pound a year from now is worth about 95 pence today.
In the Black-Scholes formula, is the strike price discounted back to today, because that is when the price is being quoted, while the strike is paid at expiry.
C. Taylor expansion
Used by: Ito's calculus, where the second-order term refuses to vanish.
In one line: approximate a curve near a point by a straight line, then a parabola, then a cubic, with an error term that tells you what the approximation costs.
The idea
Near any point, a smooth curve looks almost like a straight line. That line is the tangent, and its slope is the derivative. Taking the tangent as an approximation to the curve is the first-order Taylor expansion:
Read that as: to find the value a small step away, start where you are and add the slope times the step. , said "f prime of x", is the slope of at .
That is exact for a straight line and wrong for anything curved, so add a term measuring the curving:
, "f double prime", is the derivative of the derivative: how fast the slope itself is changing. The appears because differentiating gives , and the factor has to be cancelled for the term to come out right.
You can keep going, dividing by , then , then at the -th term.
Why the second term usually gets thrown away
For a small step , the terms shrink fast: is small, is much smaller, smaller still. If , then . So for smooth functions along smooth paths, everything past the first term is negligible, and ordinary calculus proceeds by discarding it.
This is exactly what stochastic calculus cannot do. Along a Brownian path, the typical step over a short interval is not proportional to but to , so the squared step is proportional to itself, which is the same size as the first-order term. The term ordinary calculus discards is the same order as the term it keeps.
Ito's lemma is that observation, written down. Nothing more.
D. The characteristic function
Used by: Ito's calculus, in the Fourier route to an option price.
In one line: a way of compressing an entire probability distribution into a single function, chosen so that adding independent random quantities becomes multiplying their functions.
What it is
For a random quantity , its characteristic function is
Read that as: means "the average value of", over all the ways could come out. is the imaginary unit, the number whose square is . is a dial you can turn: the characteristic function is not one number but a whole function of .
Why the imaginary exponential? Because traces a circle as varies rather than growing without bound, the average is guaranteed to exist for every distribution, including ones with tails so heavy they have no mean. A real exponential would blow up.
Why it is useful
Two properties do all the work.
It determines the distribution completely. Two random quantities with the same characteristic function have the same distribution. Nothing is lost in the compression, so anything you want to know can in principle be recovered from it.
Adding becomes multiplying. If and are independent,
Adding random quantities is otherwise an unpleasant operation requiring an integral over all the ways the two could combine. In characteristic function form it is multiplication.
That is the trick behind the Fourier route to an option price: instead of integrating a payoff against a distribution directly, write down the characteristic function of the log price, which is short and explicit, and recover the price from it.