Author 
Comment/Response 
Randy Silvers

03/13/07 01:11am
I've run into a bit of an oddity and I'm not sure of the cause though the repair is easy. I have a function which requires in the denominator the product:
ndcdf[beta*x] * (1  ndcdf[beta*x])
where ndcdf is the CDF of the Standard Normal distribution.
The computed value is fine except when beta*x is large and positive. For values exceeding about 8.5, the result is ComplexInfinity.
When beta*x is large in magnitude but negative, the result is positive and exceedingly large, as it should be. This contrasts with the value of ComplexInfiinty, when beta*x is large and positive. The fix is clearly to use:
ndcdf[Abs[beta*x]] * (1  ndcdf[Abs[beta*x]])
But, why is the kernel producing Complex Infinity here? The function is symmetric about x=0, so it should be the same for positive or negative, and should not vanish.
For example:
lst=Table[i,{i,12}]; llst=Join[1*Reverse[lst],{0},lst]
then
Map[1/(ndcdf[#](1ndcdf[#]))&,llst]
shows the symmetry for for integer values 8 or less, but ComplexInfinity for values greater than 8 and positive.
URL: sirandol@deakin.edu.au, 
