- publishing free software manuals
GNU Scientific Library Reference Manual - Third Edition (v1.12)
by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi
Paperback (6"x9"), 592 pages, 60 figures
ISBN 0954612078
RRP £24.95 ($39.95)

Get a printed copy>>>

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,
p(0) = 1 - p
p(1) = p
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.

ISBN 0954612078GNU Scientific Library Reference Manual - Third Edition (v1.12)See the print edition