Each number in the below list resides in a quantile. When put in
order, there are 10 numbers, so the first is in the 0.1 quantile, the
second in the 0.2 etc.
Lets say we have 10 examples of systolic blood pressure from 30 year
olds:
104,95,106,105,110,150,101,98,85,104
What I want to do is in R, calculate the corresponding quantiles from
So, using the same mean and variance as the above random sample,
create a normal distribution. From this normal distribution, I want to
calculate 10 corresponding quantiles.
Then, I want to plot a qqplot of both data sets to see the
distribution.
One person told me to do this:
qnorm(c(0.25,0.5,0.75),mean=mean(x),sd=sd(x))
Output:
[1] 3.76997 5.50000 7.23003
...But this does not give me 10 corresponding quantiles?
Another person told me to do this:
x=c(104,95,106,105,110,150,101,98,85,104)
z=qnorm(p, mean(x), sd(x),)[order(order(x))]
But this seems to generate 10 new numbers. And not give corresponding
quantiles from a normal distribution.