Let's say I'm analyzing the mean number of students per class for a school district. The district has imposed a hard limit on the maximum ratio: there can never be more than 30 students in a class. The district strictly enforces this rule and it is known to hold true.
I'd like to construct a confidence interval using a Student's t-distribution. For the sake of argument, we'll assume that all assumptions and conditions for this are met. The data are independent, randomly-sampled and appear approximately normally-distributed on a histogram.
What happens if the sample yields a large-ish standard error and has a mean close to 30, resulting in a confidence interval like this?
We are 95% confident that the true mean students per class lies between 28 students and 31 students.
Obviously, a mean of 31 students per class is impossible, because none of the district's classes have more than 30 students. What should be done in cases like this? Should the confidence interval be left as-is, or should it be "capped" to the values that are actually possible (i.e. "between 28 students and 30 students")?