Skip to content

Normal distribution with R

1 message · Eik Vettorazzi

#
Hi James,

(qnorm(.9)-qnorm(.1))

 is the width of the 80% CI of a standard normal distribution. So its a 
kind of standardization the other way round calculating sd from this.
The same holds for arbitrary p1 and p2.  Without loss of generality 
(since the normal distribution is symmetric), assume p2>p1.
So within  the corresponding quantiles q1 and q2 are p2-p1 of the 
probability mass, which relates to x*sd, where x is the related width of 
the standard normal distribution (remember that sd is a scaling factor)

p1<-.412
p2<-.67777888
me<-4.3
sds<-2.7
q1<-qnorm(p1,me,sds)
q2<-qnorm(p2,me,sds)
sdc<-(q2-q1)/(qnorm(p2)-qnorm(p1))  #(qnorm(p2)-qnorm(p1))

So, with this known sd, its easy to calculate  the mean with

meanc<-q1-qnorm(p1)*sdc

because with P(.) as CDF of a standard normal distribution  it holds
P((q1-mean)/sd)=p1
inverting
P^(-1)(P(q1-mean)/sd))=(q1-mean)/sd=qnorm(p1)

hth.

guox at ucalgary.ca schrieb: