def test_Sample_random_Sampling(self): self.assertNotEqual(population(10, 30), generator_int_and_float(10, 30))
def setUp(self) -> None: self.sample = generator_int_and_float(10, 35)
def setUp(self) -> None: seed(5) self.testData = randint(0, 10, 20) self.statistics = Statistics() self.x = 1 self.sample = generator_int_and_float(10, 35)
def generator_int_and_float(self, data, x): self.result = generator_int_and_float(data, x) return self.result
from Calculator.Subtraction import subtraction from Calculator.Division import division from Calculator.Multipule import mul from Calculator.Square_root import sqr from Statistics.Standard_Deviation import stddev from Statistics.NListWithSeed import generator_int_and_float from Statistics.Mean import mean import math import statistics sample = generator_int_and_float(10, 35) def confidence_interval_bottom(probability, data): num = data num_values = len(num) sd = stddev(num) avg = mean(num) p = probability if p == 80: z = 1.282 return round(subtraction(division(sqr(num_values), mul(z, sd)), avg), 1) elif p == 85: z = 1.440 return round(subtraction(division(sqr(num_values), mul(z, sd)), avg), 1) elif p == 90: z = 1.645 return round(subtraction(division(sqr(num_values), mul(z, sd)), avg),
def population(data, sample_size): pp = random.choices(generator_int_and_float(data, sample_size), k=sample_size) return pp