View source: R/simplifications-finite.R
invert.finite | R Documentation |
Access the inverse of a distribution. Specifically, if X
is a random
variable coming from a distribution, invert()
returns the
distribution of 1 / X
.
invert.finite(distribution)
distribution |
A probability distribution. |
An inverse distribution. Specifically, a distribution with subclass "inverse".
An error is returned if the original distribution
has 0 as a possible outcome
(i.e., eval_pmf(distribution, at = 0, strict = FALSE)
is non-zero),
because 0 does not have a reciprocal.
You can also obtain the inverse distribution by putting
the distribution in the denominator of /
.
flip()
, scale()
1 / (distionary::dst_pois(3.4) + 1)
invert(distionary::dst_norm(0, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.