using sample to make quality control decisions
A beverage company fills its best-selling 300ml drinks by an
automatic dispensing machine. The machine is set to dispense a mean of 310ml per bottle. Uncontrollable factors in the process can shift the mean
away from 310ml and cause either underfill or overfill, both of which are
undesirable. In such a case the dispensing machine is stopped and
recalibrated. Regardless of the mean amount dispensed, the standard
deviation of the amount dispensed always has value 22ml. A quality
control engineer routinely selects 30 bottles from the production line to check
the amounts filled. On one occasion, the sample mean is x = 320ml the sample standard deviation is s = 25ml ounce. Determine if there is
sufficient evidence in the sample to indicate, at the 1% level of significance,
that the machine should be recalibrated.
solution:
#inputs:
sample_mean = 320
sample_std = 25
alfa = 0.01
population_mean = 310
population_std = 22
sample_size = 30
options(digits = 3)
#calculating statistic:
z_value = (sample_mean - population_mean) / (population_std / sqrt(sample_size))
#calculating rejection region
rejection_region = data.frame("lower" =seq(-Inf,qnormGC(alfa/2,mean = 0,sd= 1 ), by = 0.01),
"upper" = seq(- qnormGC(alfa/2,mean = 0, sd= 1 ), Inf, by = 0.01 ))
conclusion:
since the value is outside of the rejection region we accept H0 and decide not to recalibrated the machines.

Comments
Post a Comment