I have a function F which is the CDF of the standard normal distribution. The inverse of F should be infinity at 1. However, I got 8.52 for below:

F[x_] := CDF[NormalDistribution[0, 1], x];
N@InverseFunction[F[#] &][1/2/0.5]

If I amend my code to N@InverseFunction[F[#] &][1], the output would even give me a complex number.

Why is the result of 1 different to 1/2/0.5?

How can I force it to produce the correct result?

  • 4
    $\begingroup$ Actually, why are you not using InverseCDF[] or Quantile[]? InverseCDF[NormalDistribution[], 1/2/0.5] $\endgroup$ – J. M.'s discontentment Sep 26 '18 at 2:17
  • $\begingroup$ Thanks. It works well. $\endgroup$ – H42 Sep 26 '18 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.