du.dist | R Documentation |
Calculate a U Shaped Distribution with support from -a to a. This is also the distribution of a harmonic oscillator.
du.dist(x, a = 1)
pu.dist(q, a = 1, lower.tail = T)
qu.dist(p, a = 1, lower.tail = T)
ru.dist(n, a = 1)
x |
Scalar - numeric - quantile. |
a |
Scalar - numeric - support for distribution (-a,a). |
q |
Scalar - numeric - quantile. |
lower.tail |
Scalar - logical - if true, probabilities are lower tail probabilities. |
p |
Scalar - numeric - probability. |
n |
Scalar - integer - number of observations. |
du.dist returns density function, pu.dist returns distribution function, qu.dist returns quantiles, and ru.dist returns random value(s).
Robinett, R.W. Quantum and classical probability distributions for position and momentum. Am. J. Phys. 63 (9) September 1995. pp 823-832.
## Example 1 - plot the distribution function
# x <- seq(-1.9,1.9,.001)
# y <- du.dist(x, a=2)
# plot(x,y, type="l", col="blue", main="U Shaped Distribution", xlab="quantile", ylab="density)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.