edits
This commit is contained in:
@@ -289,11 +289,11 @@ where $u = (x-\mu)/\sigma$, so $du = (1/\sigma) dx$.
|
||||
This shows that integrals involving a normal density with parameters $\mu$ and $\sigma$ can be computed using the *standard* normal density with $\mu=0$ and $\sigma=1$. Unfortunately, there is no elementary antiderivative for $\exp(-u^2/2)$, so integrals for the standard normal must be numerically approximated.
|
||||
|
||||
|
||||
There is a function `erf` in the `SpecialFunctions` package (which is loaded by `CalculusWithJulia`) that computes:
|
||||
There is a function `erf` in the `SpecialFunctions` package (which is loaded by `CalculusWithJulia`) defined by:
|
||||
|
||||
|
||||
$$
|
||||
\int_0^x \frac{2}{\sqrt{\pi}} \exp(-t^2) dt
|
||||
\text{erf}(x) = \frac{2}{\sqrt{\pi}}\int_0^x \exp(-t^2) dt
|
||||
$$
|
||||
|
||||
A further change of variables by $t = u/\sqrt{2}$ (with $\sqrt{2}dt = du$) gives:
|
||||
|
||||
Reference in New Issue
Block a user