50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


LaplacesDemon (version 16.1.4)

dist.Inverse.Beta: Inverse Beta Distribution

Description

This is the density function and random generation from the inverse beta distribution.

Usage

dinvbeta(x, a, b, log=FALSE)
rinvbeta(n, a, b)

Arguments

n

This is the number of draws from the distribution.

x

This is a location vector at which to evaluate density.

a

This is the scalar shape parameter α.

b

This is the scalar shape parameter β

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Value

dinvbeta gives the density and rinvbeta generates random deviates.

Details

  • Application: Continuous Univariate

  • Density: p(θ)=θα1(1+θ)αββ(α,β)

  • Inventor: Dubey (1970)

  • Notation 1: θB1(α,β)

  • Notation 2: p(θ)=B1(θ|α,β)

  • Parameter 1: shape α>0

  • Parameter 2: shape β>0

  • Mean: E(θ)=αβ1, for β>1

  • Variance: var(θ)=α(α+β1)(β1)2(β2)

  • Mode: mode(θ)=α1β+1

The inverse-beta, also called the beta prime distribution, applies to variables that are continuous and positive. The inverse beta is the conjugate prior distribution of a parameter of a Bernoulli distribution expressed in odds.

The inverse-beta distribution has also been extended to the generalized beta prime distribution, though it is not (yet) included here.

References

Dubey, S.D. (1970). "Compound Gamma, Beta and F Distributions". Metrika, 16, p. 27--31.

See Also

dbeta

Examples

Run this code
# NOT RUN {
library(LaplacesDemon)
x <- dinvbeta(5:10, 2, 3)
x <- rinvbeta(10, 2, 3)

#Plot Probability Functions
x <- seq(from=0.1, to=20, by=0.1)
plot(x, dinvbeta(x,2,2), ylim=c(0,1), type="l", main="Probability Function",
     ylab="density", col="red")
lines(x, dinvbeta(x,2,3), type="l", col="green")
lines(x, dinvbeta(x,3,2), type="l", col="blue")
legend(2, 0.9, expression(paste(alpha==2, ", ", beta==2),
     paste(alpha==2, ", ", beta==3), paste(alpha==3, ", ", beta==2)),
     lty=c(1,1,1), col=c("red","green","blue"))
# }

Run the code above in your browser using DataLab