MATH 314 Quiz 08

Given on 2026-09-09

    1. Write a Python class named BernoulliDistribution that has three methods mean, var, and std. The constructor should accept as an argument the probability , with a default value of 0.5. The method mean should return the probability . The method var should return the variance of the Bernoulli distribution: . The method std should return the standard deviation of the Bernoulli distirbution: . Don't recalculate the variance in the standard deviation method, instead use the method var.