Answered step by step
Verified Expert Solution
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 a
homework b 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 problem whereas supplier B
used a x mesh for their coarse screen and claims to have a statistically significant smaller gravel
size than supplier A You must perform a statistical sided ttest with an alpha Report your findings
to the user through the command line interface
program from problem
import random
import statistics
def simulatecrushingoperation:
# Parameters
populationsize
samplesize
numsamples
meshscreensize
meshscreensize
# Simulate normally distributed population
population randomgauss for in rangepopulationsize
# Perform the rock crushing operation on samples
for i in rangenumsamples:
sample random.samplepopulation samplesize
# Sieve the rocks based on mesh screen sizes
sievedrocks rock for rock in sample if meshscreensize rock meshscreensize
# Calculate sample mean and variance
samplemean statistics.meansample
samplevariance statistics.variancesample
# Print results
printfSample i Mean: samplemean Variance: samplevariance
# Calculate the mean and variance of the sampling mean
samplingmeans statisticsmeanrandomsamplepopulation samplesize for in rangenumsamples
samplingmeanmean statistics.meansamplingmeans
samplingmeanvariance statistics.variancesamplingmeans
# Print overall results
print
Overall Results:"
printfMean of Sampling Mean: samplingmeanmean
printfVariance of Sampling Mean: samplingmeanvariance
# Run the simulation
simulatecingoperation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started