def normal_hypothesis(distribution: dist.Distribution, size: int): sample = distribution.create_sample(size) characteristics = Characteristics(sample) hypothesis = Hypothesis() hyp_distribution = dist.NormalDistribution(characteristics.mean(), characteristics.variance()) hypothesis.check_hypothesis(sample, hyp_distribution)
def uniform_hypothesis(distribution: dist.Distribution, size: int): sample = distribution.create_sample(size) characteristics = Characteristics(sample) hypothesis = Hypothesis() hyp_distribution = dist.UniformDistribution(characteristics.min(), characteristics.max()) hypothesis.check_hypothesis(sample, hyp_distribution)
def laplace_hypothesis(distribution: dist.Distribution, size: int): sample = distribution.create_sample(size) characteristics = Characteristics(sample) hypothesis = Hypothesis() hyp_distribution = dist.LaplaceDistribution( characteristics.mean(), characteristics.variance() / (2**0.5)) hypothesis.check_hypothesis(sample, hyp_distribution)
def chekc_hypoth(an: Analyzer): size = len(an.get_data()[0]) for i in range(0, size): hypothesis = Hypothesis() print(an.get_axis_name(i)) hypothesis.check_hypothesis(an.get_axis_data(i))