0

I'm trying to use R to calculate using a "perfect" normal distribution. In other words, I don't want to specify it from some sample points - I have none - I just want to feed it the mean and standard deviation and compute quantiles.

It seems I should use qnorm and I would assume to call it like qnorm(mean=1000, sd=50, but it complains argument "p" is missing, with no default. p looks to be the sample data but that really should be irrelevant if I know the mean and sd. If I omit the parameters entirely it actually works fine, but if I enter these two parameters it seems to expect p. What gives?

Here is a minimal, complete, verifiable example:

> qnorm(mean=1000, sd=50)
Error in qnorm(mean = 1000, sd = 50) : 
  argument "p" is missing, with no default

Here is my concise problem statement:

"When using the qnorm function what must I supply for the variable p?"

Here is the desired behavior:

qnorm(mean=1000, sd=50)(.095)
> the answer!!!!!!
1
  • p is a vector of probabilities.
    – user3710546
    Jun 18, 2014 at 1:30

1 Answer 1

0

I understand - p is the actual input. qnorm always expects to return the number that is the answer; for some reason I expected a function that represented a normal distribution that you would then compute. e.g.

> qnorm(mean=1000, sd=75, p=0.9)
[1] 1096.116
3
  • Please add these in comments or merge it to your main question.
    – user3710546
    Jun 18, 2014 at 1:31
  • @Pascal add the answer to my main question?
    – djechlin
    Jun 18, 2014 at 1:34
  • By reading the help file, you get the answer. Anyway, it's closed.
    – user3710546
    Jun 18, 2014 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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