manpagez: man pages & more
info gsl-ref
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

19.30 The Bernoulli Distribution

Function: unsigned int gsl_ran_bernoulli (const gsl_rng * r, double p)

This function returns either 0 or 1, the result of a Bernoulli trial with probability p. The probability distribution for a Bernoulli trial is,

Function: double gsl_ran_bernoulli_pdf (unsigned int k, double p)

This function computes the probability p(k) of obtaining k from a Bernoulli distribution with probability parameter p, using the formula given above.



© manpagez.com 2000-2025
Individual documents may contain additional copyright information.