next up previous contents index
suivant: La fonction erfc : monter: Les réels précédent: La distribution de Dirac   Table des matières   Index


La fonction erf : erf

erf a comme argument un nombre a.
erf calcule les valeurs de la fonction erf au point a.
On a par définition :

erf (x) = $\displaystyle {\frac{{2}}{{\sqrt{\pi}}}}$$\displaystyle \int_{0}^{{x}}$e-t2dt

On a :

erf (+ $\displaystyle \infty$) = 1

erf (- $\displaystyle \infty$) = - 1

En effet on sait que :

$\displaystyle \int_{0}^{{+\infty}}$e-t2dt = $\displaystyle {\frac{{\sqrt{\pi}}}{{2}}}$

On tape :
erf(1)
On obtient :
0.84270079295
On tape :
erf(1/(sqrt(2)))*1/2+0.5
On obtient :
0.841344746069
Remarque
Il y a une relation entre les fonctions erf et normal_cdf :
normal_cdf (x) = $ {\frac{{1}}{{2}}}$ + $ {\frac{{1}}{{2}}}$erf ($ {\frac{{x}}{{\sqrt{2}}}}$)
En effet :
normal_cdf (x) = $ {\frac{{1}}{{2}}}$ + $ {\frac{{1}}{{\sqrt{2\pi}}}}$$ \int_{0}^{{x}}$e-t2/2dt
donc avec le changement de variables t = u*$ \sqrt{{2}}$ on a :
normal_cdf (x) = $ {\frac{{1}}{{2}}}$ + $ {\frac{{1}}{{\sqrt{\pi}}}}$$ \int_{0}^{{\frac{x}{\sqrt{2}}}}$e-u2du = $ {\frac{{1}}{{2}}}$ + $ {\frac{{1}}{{2}}}$erf ($ {\frac{{x}}{{\sqrt{2}}}}$)
On vérifie en tapant :
normal_cdf(1)=0.841344746069



Documentation de giac écrite par Renée De Graeve