Description
r coding and general stat problems
Unformatted Attachment Preview
Biostatistics for Laboratory Scientists (2024)
Homework Assignment 3
(Due Wednesday, February 28, 2024)
The homework is due at 10.30am in the dropbox on the Course Plus page (you can find the dropbox under
the ’Resources’ tab in the upper right). For exercises involving R code, please knit a document from your R
markdown (Rmd) file. Generate a single pdf file for your entire submission and give it a name that makes it
identifiable (calling it 140.615.HW.Number.Lastname.Firstname or similar). Show your work.
1. What critical values should be used for a confidence interval for the mean of the population in each of
the following situations:
(a) A 90% confidence interval based on n=12 observations.
(b) A 95% confidence interval based on n=30 observations.
(c) A 80% confidence interval based on n=18 observations.
2. A study of 400 glaucoma patients yields a sample mean of 140 mm and a sample standard deviation of
25 mm for the the following summaries for the systolic blood pressure readings. Construct the 95% and
99% confidence intervals for µ, the population average systolic blood pressure for glaucoma patients.
3. We measure a treatment response on a set of 6 mice from a particular strain, and get the following data:
107 101 93 94 96 114
Imagine that the data are independent draws from some normal distribution.
(a) Calculate a 95% confidence interval for the population mean.
(b) Calculate a 95% confidence interval for the population standard deviation.
(c) Calculate a 95% confidence interval for the population variance.
Derive the answers without calling the function t.test().
4. Consider data on the treatment response of 12 mice from strain A and 9 mice from strain B.
Strain A:
Strain B:
132,72,102,115,59,103,86,159,60,94,80,97
101,96,93,106,81,77,106,97,74
(a) Assume that the measurements from strain A are independent draws from a normal distribution
with mean µA , that the the measurements from strain B are independent draws from a normal
distribution with mean µB , and that the population standard deviation within each strain is the
same. Calculate a 95% confidence interval for the difference between the strain means µA − µB .
Derive the answer analytically, and also using the R function t.test().
(b) Using the R function t.test() derive a 95% confidence interval for the difference between the
strain means µA − µB allowing for the possibility that the population standard deviations between
the strains might be different.
(c) Which of the two approaches do you prefer? What do you conclude?
Purchase answer to see full
attachment