## 9.2 CIs for difference between two independent samples Researchers were interested in the impact of diet on the lifetime of rats:

For rats, is the mean lifetime shorter for rats on a free-choice diet compared to rats on a healthy, restricted diet?

A study compared the lifetime of rats on a healthy, restricted diet (106 rats) and on a free-eating diet (89 rats).

The data set is large, so we only show an extract of the data (Fig. 9.1).

1. Explain why this study compares two independent samples.
2. What is the parameter of interest?
3. Use the numerical summary (Fig. 9.2 (jamovi); Fig. 9.3 (SPSS)) and the output from the analysis (Fig. 9.2 (jamovi); Fig. 9.4 (SPSS)) to write down the appropriate 95% CI, to estimate the difference between the population means.   FIGURE 9.1: Part of the data for the rat lifetime example: jamovi (left panel) and SPSS (right panel)

1. Which of these short statements best communicates this CI? Why are the other statements incorrect?

1. The sample mean lifetime is between $$223.34$$ and $$346.13$$ days.
2. The population mean difference in lifetimes is between $$223.34$$ and $$346.13$$ days.
3. We are 95% sure that the sample mean difference in lifetimes is between $$223.34$$ and $$346.13$$ days.
4. We are 95% sure that the difference between the population mean lifetimes is between $$223.34$$ and $$346.13$$ days.
5. If we repeated everything many times, 95% of the CIs constructed would contain the difference between the population mean. FIGURE 9.2: The jamovi output summarising the rat lifetimes data FIGURE 9.3: The SPSS output summarising the rat lifetimes data FIGURE 9.4: The SPSS output summarising the rat lifetimes data

1. The above statement communicating the CI isn't perfect. Why not? Write an improved statement communicating the CI.
2. What conditions must be met for this CI to be statistically valid? Is it reasonable to assume the CI is statistically valid? (You may, or may not, need to refer to Fig. 9.5.)
3. Explain the difference between the meaning of what is displayed in the two graphs shown in Fig. 9.5.   FIGURE 9.5: Boxplot (left panel) and error-bar chart (right panel) for the rat lifetime example

### References

Berger RL, Boos DD, Guess FM. Tests and confidence sets for comparing two mean residual life functions. Biometrics. 1988;44(1):103–15.