Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to calculate the numerical value of $\xi\in\mathbb{R}_{\geq0}$$$P(|U|<\xi)=0.95$$ where $U$ is standard-normal distributed.

How may I do that in Mathematica?

share|improve this question
1  
Quantile[NormalDistribution[0, 1], .95] might be what you want? –  Daniel Lichtblau Jan 23 '13 at 18:47
    
@DanielLichtblau Quantile[NormalDistribution[0,1],.975] –  ssch Jan 23 '13 at 19:00
    
@ssch Right you are, I was making a mental reversal somewhere (probably in my mind). –  Daniel Lichtblau Jan 23 '13 at 19:02
3  
Dear Kasper, the community has seriously downvoted you on this question because of the way it was asked and the fact that this was something you could have easily looked up in the Mathematica documentation. I have edited your question to be a bit less demanding in tone, and would encourange you to phrase your future questions on Mathematica.SE in a similar way, and to show what you tried. That said, welcome to Mathematica.SE and I hope that you find the site useful in future. –  Verbeia Jan 23 '13 at 21:40
1  
@Kasper But then why are you posting homework to a site that is not meant for such? –  Daniel Lichtblau Jan 24 '13 at 15:15

2 Answers 2

up vote 8 down vote accepted
Solve[Probability[Abs[u] < \[Xi], u \[Distributed] NormalDistribution[]] == 95/100, \[Xi]]

{{[Xi] -> Sqrt[2] InverseErf[19/20]}

Sqrt[2] InverseErf[19/20]// N

1.959963985

share|improve this answer
    
Including the lower bound gives: Sqrt[2] InverseErf[19/20] –  ssch Jan 23 '13 at 18:53
    
Shouldn't I include Abs[u], like this: Solve[Probability[Abs[u] < [Xi], u [Distributed] NormalDistribution[]] == 95/100, [Xi]] // N –  Kasper Jan 23 '13 at 18:58
    
@Kasper Yes, missed the Abs in the question. –  Sjoerd C. de Vries Jan 23 '13 at 19:53
 dist = TransformedDistribution[(Abs[u]), u \[Distributed] NormalDistribution[]];
 Quantile[dist .95]
 (* 1.95996 *)

or

InverseCDF[dist .95]
(* 1.95996 *)

or

Quantile[NormalDistribution[], .975] 
(*  1.95996  *)

or

InverseCDF[NormalDistribution[], .975]
(*  1.95996  *)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.