class: center, middle, inverse, title-slide # STA 225 2.0 Design and Analysis of Experiments ## Lecture 5 ### Dr Thiyanga S. Talagala ### 2021-11-09 --- <style> .center2 { margin: 0; position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } </style> <style type="text/css"> .remark-slide-content { font-size: 30px; } </style> ## Comparing Pairs of Treatment Means (cont.) **Tukey's Test** use the distribution of the **studentized range statistic**. `$$q= \frac{\bar{y}_{max} - \bar{y}_{min}}{\sqrt{MS_E/n}}$$` where, `\(\bar{y}_{max}\)` is the largest sample mean and `\(\bar{y}_{min}\)` is the smallest sample mean. `\(q_\alpha(a, f)\)`, where `\(a\)` is the number of treatments and `\(f\)` is the number of degrees of freedom associated with the `\(MSE\)`. --- ## Tukey's Test For equal sample sizes `$$T_\alpha = q_\alpha(a, f)\sqrt{\frac{MSE}{n}}$$` When sample sizes are not equal `$$T_\alpha = \frac{q_\alpha(a, f)}{\sqrt{2}}\sqrt{MSE(\frac{1}{n_i} + \frac{1}{n_j})}$$` This is sometimes called **Tukey-Kramer procedure**. --- ## Example `\(q_{0.05}(5, 20) = 4.23\)` Hence `\(T_{0.05} = 4.23\sqrt{\frac{7.56}{5}} = 5.201352\)` `\(\bar{y}_{1.}=9.8\)` `\(\bar{y}_{2.}=15.2\)` `\(\bar{y}_{3.}=17.6\)` `\(\bar{y}_{4.}=21.6\)` `\(\bar{y}_{5.}=11.4\)` --- If any pairs of treatment means differ in absolute value more than 5.20 imply that the corresponding pair of population means are significantly different. Example `\(\bar{y}_{1.} - \bar{y}_{2.} = 9.8-15.2 = -5.4\)` --- ## Estimation of the Model Parameters `$$y_{ij} = \mu + \tau_i + \epsilon_{ij}$$` Estimator of the overall mean (grand mean) `$$\hat{\mu} = \bar{Y}_{..}$$` Estimator of the treatment effect (difference between the treatment mean and grand mean) `$$\hat{\tau_i} = \bar{Y}_{i.} - \bar{Y}_{..}$$` where `\(i = 1, 2, ..., a\)` --- The point estimator for `\(\mu_i\)` `$$\hat{\mu_i} = \hat{\mu} + \hat{\tau_i} = \bar{Y}_{i.}$$` Confidence interval for `\(\mu_i\)` We assume that the errors are normally distributed, each `\(\bar{y}_i\)` is `\(NID(\mu_i, \sigma^2/n)\)`. We use MSE to estimate `\(\sigma^2\)`. Hence, `\(100(1-\alpha)\)` percent confidence interval on the `\(i\)`th treatment mean `\(\mu_i\)` is [ `\(\bar{y}_{i.} - t_{\alpha/2, N-a}\sqrt{\frac{MSE}{n}}\)` , `\(\bar{y}_{i.} + t_{\alpha/2, N-a}\sqrt{\frac{MSE}{n}}\)`] --- `\(100(1-\alpha)\)` percent confidence interval on the difference in any two treatment means, `\(\mu_i - \mu_j\)`, would be [ `\(\bar{y}_{i.} - \bar{y}_{j.} - t_{\alpha/2, N-a}\sqrt{\frac{2MSE}{n}}\)` , `\(\bar{y}_{i.} - \bar{y}_{j.} + t_{\alpha/2, N-a}\sqrt{\frac{2MSE}{n}}\)`] This is **one-at-a-time** confidence intervals. The confidence level `\(1-\alpha\)` applies to only one particular estimate. --- ## Example In a study of the effectiveness of different rust inhibitors from brands (B1, B2, B3, B4) were tested. Altogether, 40 experimental units were randomly assigned to the 4 brands, with 10 units assigned to each brand. ``` b1 b2 b3 b4 1 40.0 42.1 49.4 58.1 2 39.8 41.8 47.8 59.9 3 38.6 40.8 49.3 61.0 4 39.4 42.0 47.9 60.2 5 40.3 41.7 48.7 58.6 6 40.4 41.1 49.6 58.6 7 38.8 40.0 49.3 60.4 8 39.6 40.8 49.1 58.2 9 38.4 41.9 49.9 59.7 10 39.7 41.5 49.7 59.3 ``` --- # Acknowledgement Some of the slide content is based on Montgomery, D. C. (2017). Design and analysis of experiments. John wiley & sons.