Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Flip a weighted coin

$
0
0

@samantp wrote:

I am looking for a function/package that will let me flip a weighted coin in Julia, where I can specify the weight. e.g. some adjustable probability p, that determines the probability of heads.

I found the bitrand function in the Random package but to the best of my knowledge this does not have the option to specify a weight.
Does anyone know if there’s a package/function that can do this?
Thanks

Posts: 6

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles