Brian Dunning's FileMaker Custom Functions

RandomBernoulli ( probability )

Returns random values from a Bernoulli distribution (0 or 1)

  Average rating: 4.3 (36 votes) Log in to vote

Jeremy Bante   Jeremy Bante

https://github.com/jbante/

Share on Facebook Share on Twitter

  Sample input:
List (
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 );
RandomBernoulli ( .3 )
)
  Sample output:
1
0
1
0
1
0
1
0
0
0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

When called repeatedly, RandomBernoulli creates values consistent with a Bernoulli random variable with probability of "event success" (1) given by the argument.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.