dnorm(x, mean = 0, sd = 1, log = FALSE) # density pnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) # probability qnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE) # quantile rnorm(n, mean = 0, sd = 1) # random
x, q | numeric vectors in the range (-Inf, Inf) that specify the quantiles. |
p | a numeric vector in the range [0, 1] that specifies the probabilities. |
n | an integer scalar in the range [0, Inf) that specifies the number of random samples requested. If the input value is not an integer, it is truncated. If length(n) is greater than 1, the random function returns length(n) random samples. |
mean | a numeric vector in the range (-Inf, Inf) that specifies means. |
sd | a numeric vector in the range [0, Inf) that specifies standard deviations. |
log | a logical value. If FALSE (default), the density function returns the density itself. If TRUE, it returns the log of the density. |
lower.tail | a logical value. If TRUE (default), the probability supplied to the quantile function or returned by the probability function is P[X <= x]. If FALSE, it is P[X > x]. |
log.p | a logical value. If FALSE (default), the probability supplied to the quantile function or returned by the probability function is the probability itself. If TRUE, it is the log of the probability. |
rnorm(20, 0, 10) # sample of 20, mean 0, standard dev. 10# Generate a 20x5 matrix of independent Gaussians: matrix(rnorm(20*5), nrow=20)