Learn R Programming

distributional (version 0.6.0)

dist_degenerate: The degenerate distribution

Description

[Stable]

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.

Usage

dist_degenerate(x)

Arguments

x

The value of the distribution (location parameter). Can be any real number.

Details

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)

See Also

Examples

Run this code
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)

Run the code above in your browser using DataLab