MATH 314 Quiz 08
Given on 2026-09-09
-
- Write a Python class named
BernoulliDistributionthat has three methodsmean,var, andstd. The constructor should accept as an argument the probability, with a default value of 0.5. The methodmeanshould return the probability. The method varshould return the variance of the Bernoulli distribution:. The method stdshould return the standard deviation of the Bernoulli distirbution:. Don't recalculate the variance in the standard deviation method, instead use the method var.
- Write a Python class named