tnorm | R Documentation |
Density, distribution function, and quantile function for truncated normal distribution.
dtnorm(x, mean = 0, sd = 1, log = FALSE)
ptnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
qtnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
rtnorm(n, mean = 0, sd = 1)
x, q |
A numeric vector of quantiles. |
mean |
A numeric value of mean parameter for the normal distirbution. |
sd |
A numeric value of standard deviation for the normal distirbution. |
log, log.p |
A logical; if TRUE, the probability p is given as log(p). |
lower.tail |
A logical; if TRUE, the probability is P[X <= x], otherwise, P[X > x]. |
p |
A numeric vector of probabilities. |
The truncated normal distribution has the cumulative distribution function F(q) = 1-(1-G(q))/(1-G(0)), where G(q) is the cumulative distribution function of normal distribution with mean and sd.
'dtnorm' gives the desity, 'ptnorm' gives the distribution, and 'qtnorm' gives the quantile function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.