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)
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.
n = length(y)
n
## [1] 9
se.y = sd.y / sqrt(n)
se.y
## [1] 5.317685
The standard error of the mean is 5.31
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.
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.
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)
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")
mean.hours = mean(rmortis$hours)
mean.hours
## [1] 5.684211
The average time to rigor mortis is 5.68 hours.
sd.hours = sd(rmortis$hours)
sd.hours
## [1] 2.362374
The standard deviation is 2.36 hours.
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.
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.
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)
The data below document the flash duration, in milliseconds, of a sample of 35 male fireflies of the species Photinus Ignitus.
Calculate the sample mean and the sample standard deviation.
Calculate the standard error and interpret it.
Calculate the approximate 95% confidence interval for the mean flash duration.
Interpret the confidence interval you calculated above.
Draw a strip chart with the mean and standard error superimposed on the data.
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: