 # dnorm and pnorm - why are the x and q arguments different?

Hi,

Does anyone know why the argument for x and q are different in dnorm and pnorm?

It seems like they represent the same thing?

Thanks!

See `help(normal)`, which covers `qnorm` and `rnorm`, as well as `dnorm` and `qnorm`.

The `q` and `x` arguments are vectors of quantiles. `p` is a vector of probabilites and `n` is a number of observations. In each case, these are positional, so it doesn't really matter how whether identified in the argument

``````dnorm(x = your_vector)
``````

is equivalent to

``````dnorm(your_vector)
``````
``````x <- 0
dnorm(x = 0) == 1/sqrt(2*pi)
#>  TRUE
dnorm(x) == 1/sqrt(2*pi)
#>  TRUE
``````

As for the naming of the arguments, I speculate that these arise from conventions among statisticians.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.