View source: R/dist_degenerate.R
| dist_degenerate | R Documentation |
The degenerate distribution takes a single value which is certain to be observed. It takes a single parameter, which is the value that is observed by the distribution.
dist_degenerate(x)
x |
The value of the distribution (location parameter). Can be any real number. |
We recommend reading this documentation on pkgdown which renders math nicely. https://pkg.mitchelloharawild.com/distributional/reference/dist_degenerate.html
In the following, let X be a degenerate random variable with value
x = k_0.
Support: \{k_0\}, a single point
Mean: \mu = k_0
Variance: \sigma^2 = 0
Probability density function (p.d.f):
f(x) = 1 \textrm{ for } x = k_0
f(x) = 0 \textrm{ for } x \neq k_0
Cumulative distribution function (c.d.f):
F(t) = 0 \textrm{ for } t < k_0
F(t) = 1 \textrm{ for } t \ge k_0
Moment generating function (m.g.f):
E(e^{tX}) = e^{k_0 t}
Skewness: Undefined (NA)
Excess Kurtosis: Undefined (NA)
stats::Distributions
dist <- dist_degenerate(x = 1:5)
dist
mean(dist)
variance(dist)
skewness(dist)
kurtosis(dist)
generate(dist, 10)
density(dist, 2)
density(dist, 2, log = TRUE)
cdf(dist, 4)
quantile(dist, 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.