Related Experiment Video
Updated: Oct 11, 2025

An R-Based Landscape Validation of a Competing Risk Model
Published on: September 16, 2022
Teaching: confidence, prediction and tolerance intervals in scientific practice: a tutorial on binary variables
Sonja Hartnack1, Malgorzata Roos2
1Section of Epidemiology, Vetsuisse Faculty, University of Zurich, Winterthurerstr. 270, 8057, Zurich, Switzerland. Sonja.Hartnack@access.uzh.ch.
Background:
One of the emerging themes in epidemiology is the use of interval estimates. Currently, three interval estimates for confidence (CI), prediction (PI), and tolerance (TI) are at a researcher's disposal and are accessible within the open access framework in R. These three types of statistical intervals serve different purposes. Confidence intervals are designed to describe a parameter with some uncertainty due to sampling errors. Prediction intervals aim to predict future observation(s), including some uncertainty present in the actual and future samples. Tolerance intervals are constructed to capture a specified proportion of a population with a defined confidence. It is well known that interval estimates support a greater knowledge gain than point estimates. Thus, a good understanding and the use of CI, PI, and TI underlie good statistical practice. While CIs are taught in introductory statistical classes, PIs and TIs are less familiar.
Results:
In this paper, we provide a concise tutorial on two-sided CI, PI and TI for binary variables. This hands-on tutorial is based on our teaching materials. It contains an overview of the meaning and applicability from both a classical and a Bayesian perspective. Based on a worked-out example from veterinary medicine, we provide guidance and code that can be directly applied in R.
Conclusions:
This tutorial can be used by others for teaching, either in a class or for self-instruction of students and senior researchers.
Related Concept Videos
Interpretation of Confidence Intervals
Confidence intervals have confidence coefficients that are crucial for their interpretation. The most common confidence coefficients are 0.90, 0.95, and 0.99, which can be written as percentages–90%, 95%, and 99%, respectively.
Suppose a person calculates a confidence interval with a confidence coefficient of 0.95. In that case, they can...
Confidence Intervals
A...
Uncertainty: Confidence Intervals
Prediction Intervals
However, the point estimate is most likely not the exact value of the population parameter, but close to it. After calculating point estimates, we construct interval estimates, called confidence intervals or prediction intervals. This prediction interval comprises a range of values unlike the point estimate and is a better predictor of the observed sample value, y.
Confidence Coefficient
Confidence Interval for Estimating Population Mean
A confidence interval for the mean is a range of values that provides an estimate of the population mean. As the...

