|
|
|
|
|
by timr
1344 days ago
|
|
> This is wrong. That is a very meaningful transformation. It is the standard way (https://stats.stackexchange.com/questions/240338) to turn a uniform distribution into a Bernoulli distribution. The OP didn't do what was described in the SO post. They did something else -- they calculated the ratio of two binomial random variables, and presented that as a percentage. Also, no, the SO comment you've cited doesn't describe how to generate a "Bernoulli distribution" (not a thing, btw; it's called a binomial distribution) from a uniform distribution. It tells how to make a single Bernoulli trial...but even that isn't what OP did. This is how you actually do what you're discussing (draw from the Binomial CDF given a uniform RNG, via a table): https://math.stackexchange.com/questions/1427288/how-to-samp... |
|
So this Wikipedia article is a fever dream? https://en.wikipedia.org/wiki/Bernoulli_distribution
> they calculated the ratio of two binomial random variables, and presented that as a percentage.
Ok, now I'm confused. I 100% agree with that statement. I thought your whole point was that OPs code was not a valid way to sample from a binomial distribution?
But then what is your criticism? Are you arguing that the Binomial distribution does not model the original experiment correctly?