I'd like to show you an example of a designed experiment that uses a random factor. This is an example 3.11 from the book, and it's an experiment that was conducted in a textile company. They weave fabric on a very large number of looms. A typical number of looms in a weave loom might be 100 or 200 looms, and they'd like for these looms to be homogeneous so that they produce a fabric of uniform strength. Now, it's kind of awkward to take samples from 100 looms. So what the process engineering people did, is they decided to take a random sample of looms and then take sample of fabric from each of those looms. Well, they chose four looms at random, and then they chose four fabric samples from each loom, and tested them for strength. The data from this experiment is in the table you see in the middle of the slide. This is a random effects experiment, a random model. So the first thing we do, is we look at the analysis of variance. And the table at the bottom of the slide is the analysis of variance table for this experiment, and you can see that the f ratio 15.68 is highly significant. The p-value is less than 0.001. So that says that there are differences in the looms, and the process engineering people actually suspected that. So let's estimate the variance components. Well sigma square, the variance component for error is just the mean square for error in this ANOVA table, which is 1.90. And then the treatment sum of squares. Sigma square tall hat is mean square treatments minus mean square error divided by 4. And that turns out to be 6.96. Wow, that's a big value. Of course, we suspect that it was going to be big because the p-value was very small. The f0 said that sigma square tau is not 0. But look how big it actually is, the variance of any individual strength observation. Sigma square y hat would be estimated by the sum of those two variance components 1.90 and 6.96, and that turns out to be 8.86. So most of the variability in the material that you're seeing produced in this process, is due to differences between the looms. So now subsequent work would have to be done to try to isolate why the looms are different. Is it the way they're operated? Is it the way that they're maintained? Is it something to do with their age or their type? There's lots of things that would probably have to be investigated by the process engineering people. On the other hand, if they could eliminate the variability between the looms, look what would happen to the output of their product. Instead of having a variance of about 9, or a standard deviation of about 3, they could have a variance of about 2 or a standard deviation of about 1.5. Wow, they could cut the standard deviation of the output quality characteristic of their product by 50%. So there's a real incentive to try to find out why these looms are different. While we can't easily get confidence intervals on the variance component for treatments. We can get a confidence interval on the error variance very easily, and here's the equation for that. We can also get a confidence interval on something called the inner class correlation, and the inner class correlation is just a ratio of sigma square tau to the total variance sigma square tau plus sigma square. So it's a useful quantity. It's an interpretable quantity, and we can find confidence intervals on that fairly easily, but we can't get a confidence interval easily on sigma square tau. We can estimate the overall mean, and we can get a confidence interval on the overall mean. It turns out that that's very straightforward to do, and the equation for that confidence interval is shown down at the bottom of this slide. And there's a little derivation of that, and so if you want a confidence interval on the mean, you can do that. But if we really want to get a confidence interval on the individual parameters, the best way to do that is by using the so-called maximum likelihood approach. And the likelihood function is just a joint probability distribution of our sample observations, where we think of the observations as being fixed in the parameters unknown. And then we choose the parameters to maximize the likelihood function, and the equation that you see down at the bottom of the slide, that is the likelihood function for this type of experiment. Some computer packages use a method called residual maximum likelihood or REML, to estimate the variance components. This is the method used in JMP, and this is the JMP output for this loom experiment that we saw previously. Now, here are the estimates of the variance components. So I'm going to circle those on here for you, there they are. And I want you to notice that they are essentially exactly the same as the moment estimators. Anytime you have balance to data, that is the same number of observations in each cell of your experiment or in each treatment. The REML estimates will match the moment estimates, but notice that because we use REML, this method allows us to get confidence intervals on the variance components. The confidence interval on the on the residual mean square, ranges from about 1 to about 5. But look at the confidence interval on the variance component due to treatments, it goes from minus 5 up to almost 19. It's huge, it's probably so wide that it's not terribly useful. Why is it so wide? Why is that interval so long? Well, it's probably because we only used four looms, if we had used more looms, we would more than likely have gotten a narrower confidence interval. So just because we're able to get the confidence interval, it doesn't always mean that it's going to be as useful as we might like.