Using the Error Function (Erf) Instead
 
These areas can also be found by using the "Error Function" or "Erf", which is the area starting at z=0 when  .
.
(Internally this is what Mathematica does, treating Erf[x] as a built-in like Sin[x].)
So the integral of the standard normal distribution from 0 to z is also given by 0.5 Erf[ ].
].
For example, here is the area under the normal curve from z=0 to z=1, calculated to 20 places, two ways.
 ![N[(areaLeftZNormal[1] - areaLeftZNormal[0]), 20]](../HTMLFiles/normal_51.gif) 
  
 ![N[Erf[1/2^(1/2)]/2, 20]](../HTMLFiles/normal_53.gif) 
  
Or, going the other way
 ![N[Erf[1], 20]](../HTMLFiles/normal_55.gif) 
  
 ![N[2 (CDF[NormalDistribution[0, 1/2^(1/2)], 1] - 1/2), 20]](../HTMLFiles/normal_57.gif) 
  
 Mathematica also defines ![Erfc[z] = 1 - Erf[z]](../HTMLFiles/normal_59.gif) (Erf complement) which gives us another way to define f[z] = areaLeftOfZNormal[z].
 (Erf complement) which gives us another way to define f[z] = areaLeftOfZNormal[z].
 ![f[z_] := Erfc[-z/2^(1/2)]/2](../HTMLFiles/normal_60.gif) 
 ![Plot[f[z], {z, -3, 3}]](../HTMLFiles/normal_61.gif) 
 ![[Graphics:../HTMLFiles/normal_62.gif]](../HTMLFiles/normal_62.gif) 
  
Inverting this gives
 ![p = f[z] = Erfc[-z/2^(1/2)]/2  ,   where 0≤p≤1, and - ∞≤z≤∞  z = fInv[p] = -2^(1/2) InverseErfc[2p]](../HTMLFiles/normal_64.gif) 
 ![fInv[p_] := -2^(1/2) InverseErfc[2p]](../HTMLFiles/normal_65.gif) 
 ![Plot[fInv[p], {p, 0, 1}]](../HTMLFiles/normal_66.gif) 
 ![[Graphics:../HTMLFiles/normal_67.gif]](../HTMLFiles/normal_67.gif) 
  
So the total probability under the standard (μ=0,σ=1) Normal curve, for z ≤ 1 is
 ![RowBox[{f, [, 1., ]}]](../HTMLFiles/normal_69.gif) 
  
And the value of z for which the probability is 0.841345 is
 ![RowBox[{fInv, [, 0.841345, ]}]](../HTMLFiles/normal_71.gif) 
  
Created by Mathematica (October 2, 2003)