Last chance! 50% off unlimited learning
Sale ends in
This is the density function and random generation from the inverse beta distribution.
dinvbeta(x, a, b, log=FALSE)
rinvbeta(n, a, b)
This is the number of draws from the distribution.
This is a location vector at which to evaluate density.
This is the scalar shape parameter
This is the scalar shape parameter
Logical. If log=TRUE
, then the logarithm of the
density is returned.
dinvbeta
gives the density and
rinvbeta
generates random deviates.
Application: Continuous Univariate
Density:
Inventor: Dubey (1970)
Notation 1:
Notation 2:
Parameter 1: shape
Parameter 2: shape
Mean:
Variance:
Mode:
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.
Dubey, S.D. (1970). "Compound Gamma, Beta and F Distributions". Metrika, 16, p. 27--31.
# 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