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!!!!!!
Zong
  • 6,160
  • 5
  • 32
  • 46
djechlin
  • 59,258
  • 35
  • 162
  • 290

1 Answers1

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
djechlin
  • 59,258
  • 35
  • 162
  • 290