def confidence_interval(num): x1 = population_mean(num) c = 0.95 z_value = (1 - c) / 2 d1 = population_standard_deviation(num) l1 = square_root(len(num)) return [x1 - z_value * d1 / l1, x1 + z_value * d1 / l1]
def z_score(num): average1 = population_mean(num) deviation1 = population_standard_deviation(num) score_list = [] for x in num: f = (x - average1) / deviation1 score_list.append(f) return score_list
def population_variance(num): deviation = population_standard_deviation(num) return square(deviation)
def Sample_Standard_Deviation(num): sample_average = sample_mean(num) return population_standard_deviation(sample_average)
def population_standard_deviation(self, data): self.result = population_standard_deviation(data) return self.result
def Sample_Standard_Deviation(num): return population_standard_deviation(num)
def population(self, a, b): self.result = population_standard_deviation(a, b) return self.result