beta prior More...
#include <prior.h>
Public Member Functions | |
BetaPrior (double al, double bt) | |
Initialize with parameters alpha=al, beta=bt. | |
BetaPrior (const BetaPrior &original) | |
copy constructor | |
double | pdf (double x) const |
return beta pdf | |
double | dpdf (double x) |
return derivative of beta pdf | |
double | rand (void) |
draw a random number | |
PsiPrior * | clone (void) const |
draw a random number using rejection sampling | |
double | mean (void) const |
return the mean | |
double | std (void) const |
return the standard deviation | |
void | shrink (double xmin, double xmax) |
shrink the prior if it is broader than the range between xmin and xmax | |
int | get_code (void) const |
return the typcode of this prior | |
double | cdf (double x) const |
return the typcode of this prior | |
double | getprm (unsigned int prm) const |
double | ppf (double p, double start=NULL) const |
beta prior
This defines a beta prior distribution that is defined on an interval. It's pdf is defined by
if . It is zero otherwise.