Max Temp Confidence interval

This demo shows the confidence interval of the mean constructed using the += 2SE rule for two populations. The script contains data for the Max Daily Temperature (in Farenheit) from 1969-1999 for Fargo, North Dakota and Miami, Florida. The data was obtained from NOAA.

The edit boxes and button below allow you to generate a sample from each of these populations and contstruct a 95% confidence interval for the mean. The formula used to calculate this approximate confidence interval is:
[sample mean - 2*SE, sample mean + 2*SE]
Where SE is the standard error calculated by dividing the sample standard deviation by the square root of the sample size. In this example we know the entire population, so we can plot the population means.


Sample size: Number of sampling experiments: Draw consective samples:


CI from Fargo samples:




CI from Miami samples:



































When you have the "Draw consective samples" box checked, the first datum is drawn randomly from the population, and the remainder of the samples are drawn by simpling taking the max temperatures from the next N-1 days. This is NOT random sampling. Even though every datum in the population has an equal chance of being selected, the draws are not independent. Sampling in this way underestimates the population variance (because the points are autocorrelated). This makes the confidence intervals much too tight, and the true (population) mean will be outside of the 95% confidence interval in much greater than 5% of the trials.


Sampling when you have the "Draw consective samples" box "unchecked" gives you a true random sample. Notice that increasing the sample size will cause the confidence intervals to become (on average) shorter, but will not affect how often the mean falls within the confidence interval.


Notice that the confidence intervals for the temperature data from Miami are much more narrow than the Fargo data. Why is this?