Practice Problem 1

Systolic blood pressure was measured (in units of mm Hg) during preventative health examinations on people in Dallas, Texas. Here are the measurements for some of these patients:

y = c(112, 128, 108, 129, 125, 153, 155, 132, 137)
  1. Calculate the mean and the standard deviation for these data.
mean.y = mean(y)
sd.y =sd(y)
mean.y; sd.y
## [1] 131
## [1] 15.95306

The mean is 131 mm Hg and the standard deviation is 15.93 mm Hg.

  1. What is the sample size?
n = length(y)
n
## [1] 9
  1. Calculate the standard error of the mean.
se.y = sd.y / sqrt(n)
se.y
## [1] 5.317685

The standard error of the mean is 5.31

  1. Using the 2SE rule of thumb, calculate an approximate 95% confidence interval for the mean. List the lower and upper limits.
lower.CI.limit = mean.y - (2 * se.y)
upper.CI.limit = mean.y + (2 * se.y)
lower.CI.limit; upper.CI.limit
## [1] 120.3646
## [1] 141.6354

The lower and upper limits of the confidence interval are 120.36 mm Hg and 141.63 mm Hg.

  1. How would we interpret the 95% confidence interval?

We can be about 95% certain that the population mean of systolic blood pressure lies in the range of values given by 120.36 mm Hg and 141.63 mm Hg.

  1. Draw a strip-chart with the mean and the standard errors overlaid on the data.
par(bty = "l") # Just draw x-axis and y-axis; no box around the plot

stripchart(y, vertical = TRUE, method = "jitter", jitter = 0.01, pch = 16, ylab = "Blood Pressure (in mm Hg)", col = "cadetblue1", cex = 1, las = 1, ylim = c(0, max(y)))

points(mean.y, pch = 16, cex = 1.2)

arrows( c(1), mean.y - se.y, c(1), mean.y + se.y,   angle = 90, code = 3, length = 0.1)

Practice Problem 7

Niderkorn’s (1872) measurements on 114 human corpses provided the first quantitative study on the development of rigor mortis. These data, given below, reflect the number of hours it took a body to achieve rigor mortis after death. Note the data have been rounded to the nearest hour (hence there are no decimal places).

rmortis = read.csv("http://whitlockschluter.zoology.ubc.ca/wp-content/data/chapter03/chap03q09Rigormortis.csv")
  1. What is the average time to rigor mortis for these data?
mean.hours = mean(rmortis$hours)
mean.hours
## [1] 5.684211

The average time to rigor mortis is 5.68 hours.

  1. What is the standard deviation?
sd.hours = sd(rmortis$hours)
sd.hours
## [1] 2.362374

The standard deviation is 2.36 hours.

  1. Calculate and interpret the standard error for the mean of these data.
n.hours = length(rmortis$hours)
n.hours
## [1] 114
se.hours = sd.hours / sqrt(n.hours)
se.hours
## [1] 0.2212566

The standard error is 0.22 hours, and this can be interpreted as the average difference we might expect, between our sample mean and the population, in a random sample of 114 cadavers.

  1. What is the approximate 95% confidence interval for the sample mean you estimated earlier? How would we interpret the lower and upper limits of this interval?
lower.CI = mean.hours - (2 * se.hours)
upper.CI = mean.hours + (2 * se.hours)
lower.CI; upper.CI
## [1] 5.241697
## [1] 6.126724

The approximate 95% interval is 5.24 and 6.12 hours. The interpretation would be that we can be about 95% certain that for the population at large the average time to rigor mortis falls between 5.24 and 6.12 hours.

  1. Draw a strip-chart with the mean and the standard errors overlaid on the data.
par(bty = "l") # Just draw x-axis and y-axis; no box around the plot

stripchart(rmortis$hours, vertical = TRUE, method = "jitter", jitter = 0.01, pch = 16, ylab = "Time to Rigor Mortis (in hours)", col = "cadetblue1", cex = 1, las = 1, ylim = c(0, max(rmortis$hours)))

points(mean.hours, pch = 16, cex = 1.2)

arrows( c(1), mean.hours - se.hours, c(1), mean.hours + se.hours,   angle = 90, code = 3, length = 0.1)

Your Turn …

The data below document the flash duration, in milliseconds, of a sample of 35 male fireflies of the species Photinus Ignitus.

  1. Calculate the sample mean and the sample standard deviation.

  2. Calculate the standard error and interpret it.

  3. Calculate the approximate 95% confidence interval for the mean flash duration.

  4. Interpret the confidence interval you calculated above.

  5. Draw a strip chart with the mean and standard error superimposed on the data.

  6. If you had twice the sample size, say for 70 male fireflies, would your estimated standard error be smaller or larger? What would be the consequence for the approximate 95% confidence interval – would it be wider or narrower than what you calculated above? Show your conclusions by: