> # Oskar Hagberg 2012-03-12 > # > # QUESTION > # Is the viscosity at 25C different from 800 iches? In which range may it be? > # > # DESCRIPTION OF THE EXPERIMENT > # To answer the question, 15 batches were collected, and the average computed to: > xbar = 812 > # PRELIMINARY LOOK AT DATA > # The average is 12 units separated from 800. The standard deviation is 25. Before > # computing, I cannot say if this can be explained by chance alone, but I have a feeling > # it can-. > > # Since the standard deviation > # is known, 25 centistokes, we assume the measurements are independend observations of > # N(mu,15^2). In this setting, we test > # H0: mu = 800 > # against > # H1 mu <> 815 > # > # DESCRIPTION OF THE ANALYSIS > # The average diameter is an estimator of mu that has standard error > (stderr = 25/sqrt(15)) [1] 6.454972 > # The distance of this estimator to the mean diameter under the null hypothisis is > (xdist = xbar-800) [1] 12 > # which is compared to the standard error: > (teststat = xdist/(stderr)) [1] 1.859032 > # Since this value is to the right of the origin, and it is appropriate to use a two-sided test > (p = 2*(1-pnorm(teststat))) [1] 0.0630226 > # A 95 % confidence interval is +/- 1.96*standard error: > c(xbar-1.96*stderr,xbar+1.96*stderr) [1] 799.3483 824.6517 > # This intervals covers 800, even if it is very close, which is in line with > # the small still >0.05 P-value > # Since background data were not given, no model validation can be performed. >