Question: do not use numpy or scippy please. Using your program from problem 1 a . homework 3 b , create a Python program that assumes

do not use numpy or scippy please. Using your program from problem 1 a.
homework 3b, create a Python program that assumes two different gravel manufacturers submit their
sample results to a buyer. Supplier A used the screens as described in problem1 whereas supplier B
used a 7/8x7/8 mesh for their coarse screen and claims to have a statistically significant smaller gravel
size than supplier A. You must perform a statistical 1-sided t-test with an \alpha =0.95. Report your findings
to the user through the command line interface
program from problem 1
import random
import statistics
def simulate_crushing_operation():
# Parameters
population_size =1000000
sample_size =100
num_samples =11
mesh_screen1_size =1
mesh_screen2_size =3/8
# Simulate normally distributed population
population =[random.gauss(0,1) for _ in range(population_size)]
# Perform the rock crushing operation on 11 samples
for i in range(num_samples):
sample = random.sample(population, sample_size)
# Sieve the rocks based on mesh screen sizes
sieved_rocks =[rock for rock in sample if mesh_screen2_size < rock <= mesh_screen1_size]
# Calculate sample mean and variance
sample_mean = statistics.mean(sample)
sample_variance = statistics.variance(sample)
# Print results
print(f"Sample {i +1}- Mean: {sample_mean}, Variance: {sample_variance}")
# Calculate the mean and variance of the sampling mean
sampling_means =[statistics.mean(random.sample(population, sample_size)) for _ in range(num_samples)]
sampling_mean_mean = statistics.mean(sampling_means)
sampling_mean_variance = statistics.variance(sampling_means)
# Print overall results
print("
Overall Results:")
print(f"Mean of Sampling Mean: {sampling_mean_mean}")
print(f"Variance of Sampling Mean: {sampling_mean_variance}")
# Run the simulation
simulate_cing_operation()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!