A quality engineer for a drug manufacturer wants to determine the shelf life for a medication. The concentration of the active ingredient in the medication decreases over time. The engineer wants to determine when the concentration reaches 90% of the intended concentration. The engineer randomly selects 8 batches of medication from a larger population of possible batches and tests one sample from each batch at nine different times.

To estimate the shelf life, the engineer does a stability study. Because the batches are a random sample from a larger population of possible batches, batch is a random factor instead of a fixed factor.

- Open the sample data ShelfLifeRandomBatches.MTW.
- Choose .
- In Response, enter Drug%.
- In Time, enter Month.
- In Batch, enter Batch.
- In Lower spec, enter
`90`. - Click Options.
- In the drop-down list, select Batch is a random factor.
- Click OK and then click Graphs.
- Under Residuals Plots, choose Four in one.
- Click OK in each dialog box.

The p-value that compares the models with and without the Month by Batch interaction is 0.059. Because the p-value is less than the significance level of 0.25, the analysis uses the model with the Month by Batch interaction. The shelf life, which is approximately 53 months, is an estimate of the how long the engineer can be 95% confident that 95% of the drug is above the lower specification limit. The estimate applies to any batch that the engineer randomly selects from the process.

The marginal residuals may not follow a normal distribution with constant variance. The points on the normal probability plot do not follow the line well. One reason for the nonnormal behavior of the marginal residuals is that, when the final model includes the batch by time interaction, the variance of the marginal residuals depends on the time variable and may not be constant. You can use the conditional residuals to check the normality of the error term in the model.

- Choose .
- Click Graphs.
- In Residuals for plots, select Conditional regular.
- Click OK in each dialog box.