solution
The 10% rule:
(a) In the example discussing the 10% rule, we used two hypothetical waters with pollutant concentration distributions  (indicating that the water is in compliance) and  (indicating that the water is impaired), respectively. Use simulation to evaluate the performance of the 10% rule by estimating the probability of making mistakes when sample size is low (n=10) and large (n=100) and discuss the implications of the poor performance.
(b) Use the function viol.sim to calculate the error rates for the impaired water (with pollutant concentration distribution  with sample sizes n = 6, 12, 24, 48, 60, 72, 84, 96 and present the result in a plot. Repeat the same for a water that is not impaired.
(c) Write a short essay on the 10% rule, discussing the consequences of the rule in terms of the probability of making two type of mistakes – declaring a water to be impaired while the water is in compliance and vice versa.