% Normal CDF N(x) -- LaTeX source for card 3 of the Options Widget % Compile: pdflatex normal-cdf.txt (or rename to .tex) \documentclass[11pt]{article} \usepackage{amsmath,amssymb} \usepackage[margin=1in]{geometry} \begin{document} \section*{Normal CDF \ $N(x)$} \begin{align*} N(x) &= \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{x} e^{-t^2/2}\,dt \\[4pt] N(x) &= \frac{1}{2}\left[1 + \operatorname{erf}\left(\frac{x}{\sqrt{2}}\right)\right] \end{align*} \subsection*{Meaning} \begin{tabular}{ll} $N(x)$ & probability a standard normal $\le x$ \\ $N(d_2)$ & $\approx$ risk-neutral prob.\ call ends ITM \\ $N(d_1)$ & call delta \\ $N(0)$ & $= 0.5,\quad N(1) \approx 0.841,\quad N(-1) \approx 0.159$ \\ \end{tabular} \subsection*{How the widget computes it} \begin{itemize} \item Via the complementary error function (same identity as above): \[ N(x) = \tfrac{1}{2}\,\operatorname{erfc}\!\left(-\frac{x}{\sqrt{2}}\right), \qquad \operatorname{erfc}(x) = 1 - \operatorname{erf}(x) \] \item $\operatorname{erfc}$ by the Numerical Recipes Chebyshev fit, with $z = |x|$ and $t = \dfrac{1}{1 + z/2}$: \begin{align*} P(t) &= -1.26551223 + t\,(1.00002368 + t\,(0.37409196 + t\,(0.09678418 \\ &\qquad + t\,(-0.18628806 + t\,(0.27886807 + t\,(-1.13520398 \\ &\qquad + t\,(1.48851587 + t\,(-0.82215223 + 0.17087277\,t)))))))) \\[4pt] \operatorname{erfc}(z) &\approx t\,\exp\!\left(-z^2 + P(t)\right) \end{align*} with $\operatorname{erfc}(-z) = 2 - \operatorname{erfc}(z)$ and $|\epsilon_{\text{rel}}| < 1.2\times10^{-7}$. \item Standard normal density (used for theta): \[ \varphi(x) = N'(x) = \frac{e^{-x^2/2}}{\sqrt{2\pi}} \] \end{itemize} \end{document}