ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains classes and procedures for generating Bernoulli-distributed random numbers.
More...
Data Types | |
type | distBern_type |
This is the derived type for signifying distributions that are of type Bernoulli as defined in the description of pm_distBern. More... | |
interface | getBernRand |
Generate and return a scalar or array of rank 1 of length size or the same rank and size as p of Bernoulli-distributed random values (0 or 1 ) with probability of getting 1 set by the input success probability p .More... | |
interface | isHead |
Generate and return a scalar (or a vector of length size or an array of the same shape as the input p ) containing the odds of getting a head in a single (or a series) of coin-flipping experiment(s).More... | |
interface | setBernRand |
Return a scalar or array of arbitrary rank of Bernoulli-distributed random values (0 or 1 ), with the specified input success probability p . More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = SK_"@pm_distBern" |
This module contains classes and procedures for generating Bernoulli-distributed random numbers.
The Bernoulli distribution, named after Swiss mathematician Jacob Bernoulli, is the discrete probability distribution of a random variable which takes the value \(1\) with probability \(p\) and the value \(0\) with probability \(q = 1-p\).
Less formally, it can be thought of as a model for the set of possible outcomes of any single experiment that asks a yes–no question.
The Bernoulli distribution is a special case of the Binomial distribution with \(n = 1\) (with \(n\) the number of trials).
It is also sometimes called the two-point distribution because of having only two possible outcomes.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
character(*, SK), parameter pm_distBern::MODULE_NAME = SK_"@pm_distBern" |
Definition at line 45 of file pm_distBern.F90.