3 ms·
The author's solution to the toy problem is --- die = Die(12) expected_values(die, n=10000) gaussian = Gaussian(mu=4.0, sigma=2.0) expected_value(gaussian,
by toponaut 5y ago
The author's solution to the toy problem is
---
die = Die(12)
expected_values(die, n=10000)
gaussian = Gaussian(mu=4.0, sigma=2.0)
expected_value(gaussian, n=100000)
coin = Coin(fairness=0.75)
expected_value(coin, f=lambda x: np.where(x == "H", 1.0, 0.0)
---
After all this work, the answers to the problems are right there in the constraints.
ev_die = (sides+1)/2
ev_gaussian = mu
ev_coin = sign * fairness
What is the point?