Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications Dasfaa 2023 International Workshops Bdms 2023 Bdqm 2023 Gdma 2023 Bundlers 2023 Tianjin China April 17 20 2023 Proceedings Lncs 13922

Authors: Amr El Abbadi ,Gillian Dobbie ,Zhiyong Feng ,Lu Chen ,Xiaohui Tao ,Yingxia Shao ,Hongzhi Yin

1st Edition

3031354141, 978-3031354144

More Books

Students also viewed these Databases questions

Question

Evaluate the following derivatives. d dx ((In 2x)-5)

Answered: 1 week ago

Question

What is a verb?

Answered: 1 week ago

Question

Conduct an effective performance feedback session. page 360

Answered: 1 week ago