Message Boards Message Boards

0
|
9021 Views
|
4 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Find z-score?

Hello, everyone. I know how to calculate the probability with Mathematica:

Probability[ x >= 1.0, x ~ NormalDistribution[] ]

The answer is 0.158655.

My question is, how can I find the z-score of normal distribution when the probability is given? For example, I want to find the value of z in the below pseudo-code:

Probability[ x >= z, x ~ NormalDistribution[] ] == 0.05

Or is there any ready-made function that can compute z-score directly in Mathematica? Thank you!

POSTED BY: Kui Chen
4 Replies

Also InverseCDF[]:

InverseCDF[NormalDistribution[], 0.95]
(*  1.64485  *)

InverseCDF[NormalDistribution[], 95/100]
(*  Sqrt[2] InverseErfc[1/10]  *)
POSTED BY: Michael Rogers

Thanks a lot! I think this is the best solution!

POSTED BY: Kui Chen

By numeric:

  NSolve[Probability[x >= z, x \[Distributed] NormalDistribution[]] == 5/100, z, Reals]
  (* {{z -> 1.64485}} *)

By symbolic:

   Solve[Probability[x >= z, x \[Distributed] NormalDistribution[]] == 5/100, z] // Quiet

   (* {{z -> Sqrt[2] InverseErfc[1/10]}} *)
POSTED BY: Mariusz Iwaniuk

Thank you! I found NSolve is better than Solve because the latter will give a warning message.

POSTED BY: Kui Chen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract