This is an open-access article distributed under the terms of the Creative Commons Attribution License (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work, first published in JMIR Medical Education, is properly cited. The complete bibliographic information, a link to the original publication on https://mededu.jmir.org/, as well as this copyright and license information must be included.

Despite the increasing relevance of statistics in health sciences, teaching styles in higher education are remarkably similar across disciplines: lectures covering the theory and methods, followed by application and computer exercises in given data sets. This often leads to challenges for students in comprehending fundamental statistical concepts essential for medical research. To address these challenges, we propose an engaging learning approach—DICE (design, interpret, compute, estimate)—aimed at enhancing the learning experience of statistics in public health and epidemiology. In introducing DICE, we guide readers through a practical example. Students will work in small groups to plan, generate, analyze, interpret, and communicate their own scientific investigation with simulations. With a focus on fundamental statistical concepts such as sampling variability, error probabilities, and the construction of statistical models, DICE offers a promising approach to learning how to combine substantive medical knowledge and statistical concepts. The materials in this paper, including the computer code, can be readily used as a hands-on tool for both teachers and students.

The correct use and application of statistics plays a fundamental role in the health sciences, in turn providing objective and quantitative evidence to support decision-making in public health [

Simulation-based learning has previously been proposed as a tool to support engaging learning [

However, despite a broad acceptance of simulations as a helpful tool to learn statistical and epidemiological concepts [

The remaining part is structured as follows: we will first describe the proposed method—DICE—and explain the intended learning objectives and outcomes. We will then illustrate the use of DICE with an example of a time-to-event outcome. Finally, we will discuss some potential strengths and limitations of applying the method in a classroom setting.

DICE is an engaging learning method that enables students to use simple simulations to design, analyze, and interpret a realistic epidemiological study (note that the acronym DICE represents the learning steps involved, but not in order). The use of DICE as a learning tool combines problem-oriented learning [

DICE includes 6 major steps that cover the major stages of a scientific investigation.

Flowchart of the 6 steps involved in DICE (design, interpret, compute, estimate) with an illustrative pie chart showing the approximate time dedicated to each step. The curved arrows in step 2 indicate that these activities can be completed multiple times to calibrate the sample size and power of a study before moving on to the next step.

The key learning objectives and outcomes of DICE, as highlighted in

The main learning objectives and outcomes across the steps of DICE (design, interpret, compute, estimate). The steps of DICE include (1) identifying the health problem, (2) designing an investigation including power and sample size calculations with simulations, (3) generating a unique sample of data, (4) analyzing the sample according to the plan, (5) interpreting the findings carefully, and (6) writing a short abstract to be presented in class.

Each step is now practically explained with an example. The following example is inspired by 2 recent epidemiological studies [

During the first step of DICE, students should think about a particular problem, population, and area that they would like to investigate. This can be somewhat time-consuming and requires a decision about the nature of the research question (ie, causal, descriptive, or predictive) [

The second step addresses the overall design of the study, including the assessment methods for the specified variables. The step is further divided into three specific parts: (1) students should reflect on the appropriate study design (eg, experimental or observational), (2) put forward the possible mechanisms (confounding, interaction, etc) underlying all the random variables involved in the study, and (3) discuss plausible values for all of the parameters. These are discussed in more detail below.

Designing an investigation that includes power and sample size calculations with simulations requires careful consideration of available literature and substantive knowledge about the underlying health problem. We recommend allocating sufficient time for this step of planning a realistic simulation study.

In our example, we design a large, observational cohort study with a confounding effect by age. Information on physical activity (3.5 hours per week of moderate to vigorous physical activity [MVPA] vs less), together with age (≥80 years vs <80 years), is assessed at baseline in a short questionnaire. The mortality rate in a cohort of older people is likely to increase over time due to aging, among both physically active and inactive populations. Assuming a baseline mortality rate in the younger and physically inactive population of 7 deaths per 1000 person-years, we determined that 5000 individuals (about 1005 deaths during 10-year follow-up) would provide a statistical power of about 86% to detect at least a 20% lower mortality rate (age-adjusted hazard ratio 0.8) in the physically active population relative to the inactive population. A 2-sided Wald-type test for the age-adjusted hazard ratio conferred by physical activity equal to 1 with a type II error of 5% is conducted based on a multivariable Weibull survival model including physical activity and age as covariates.

Simulated sample distribution of the age-adjusted mortality hazard ratio comparing active versus inactive individuals under the null and alternative hypotheses (hazard ratio 0.8). The simulated statistical power was obtained by counting the number of studies that correctly rejected the null hypothesis with a 2-sided Wald-type test at a significance level of 5% based on a multivariable Weibull survival model. The number of simulations is 10,000, the sample size of each study is 5000, and the average number of deaths within each study is 1005.

Parameters and their distributions can be inspired by previous studies, textbooks, or substantive knowledge from group members. For example, if the exposure is defined as systolic blood pressure (mmHg), students can assume an approximately symmetric and bell-shaped distribution with a given mean and SD and derive the parameter from a normal distribution function. For this study, we need the following variables: (1)

During this step, students should write a few lines of code or a function capable of generating data according to the desired study and mechanism. Simulations can be used to calibrate the sample size and statistical power of the study. To achieve the desired statistical power (eg, 80%), the sample size can be changed accordingly during this step. This requires some time, and we recommend students try to adapt certain values for the parameters or underlying mechanisms from the previous step (

In our example, the first variable to be generated is baseline age (about 60% are older than 80 years of age), which is a confounding variable in the relationship between physical activity and mortality:

For the exposure model, the second variable to be generated is baseline physical activity as a function of age. People aged ≤80 years have a probability of being physically active of 50%, whereas the odds of being physically active among older people are 1/3 (67% lower odds) relative to younger people:

Of note, Bernoulli is a statistical function, whereas logit and ln are a mathematical function.

For the outcome model, individual time-to-death (in years) conditional on the variables physical activity and age is obtained under the Weibull survival model, as follows:

where γ is the parameter defining the departure from a simpler exponential (constant mortality rate) survival model. The value of γ is set to 1.1, indicating a slight increase in the mortality rate over the follow-up period in all the covariate patterns.

The natural logarithm of the baseline mortality rate (per 1 year) among young and inactive people is assumed to be 7 deaths per 1000 person-years, so the intercept is _{0}=ln(7/1000)=–4.962

The age-adjusted mortality hazard ratio comparing physically active versus inactive people is set to 0.80, as determined by _{1}=ln(0.80)=–0.2231.

The physical activity-adjusted mortality hazard ratio comparing older versus younger people is set to 4, computed as _{2}=ln(4)=1.386.

Given a random value for the survival probability

In addition, any randomly generated time-to-death beyond the follow-up time of 10 years is set to 10 and considered censored (ie, still alive at the end of the follow-up). An indicator variable for death or censored status is also created to inform any survival analysis.

Once the study has been designed with sufficient statistical power to detect the relevant effect, the next step is to draw one unique sample. Students will analyze and present only this sample in class. The uniqueness and reproducibility of the simulated data are guaranteed by setting a numerical sequence, called a seed, before obtaining realizations of the random variables. This is important for the exact replication of the study. Every group of students is asked to use a common seed in generating the analytical sample of data so that all groups replicate the study under the same conditions. Each group will have a different research question and an underlying health problem with varying parameters. The reason for choosing a seed in the beginning is to highlight the uniqueness of a single study generated under a known DGM. The easiest choice is to specify the seed according to the date of the DICE activity. In our example, we use the seed 20230413 (based on the year, month, and date: “YYYYMMDD”). However, for specific tasks such as power calculations or simulating a distribution of effects, the seed must be deleted to ensure variability in the simulations.

The outcome model is specified according to the process underlying the data, and it is estimated based on the only sample available. Students estimate the statistical model whose performance was evaluated in the initial step of the study design. In our example, we estimate a multivariable Weibull regression model including physical activity and age as covariates.

Students carefully interpret the estimated model and write about the inferential results. In our example, during the 10-year follow-up period, a total of 974 people died out of 5000. Compared with inactive people, the age-adjusted hazard ratio for active people was 11% lower (hazard ratio=0.89; 95% CI 0.78-1.03). A Wald-type 2-sided test indicates some compatibility between this sample of data and the hypothesis of a null age-adjusted mortality hazard ratio for physical activity (

Each group of students should then write a structured scientific abstract (200-250 words) summarizing all the previous steps suitable for an epidemiological conference. The findings and interpretation are then presented in class. Each group of students briefly presents their findings and reasoning behind the study design. Teachers and peers have the possibility of asking questions. The presentations of each group should not exceed 10 minutes per group.

Based on our experiences teaching with DICE and to conclude the steps of DICE shown in the practical example, we hope the key learning lessons for students will include the following: First, students should realize that the most challenging and time-consuming step is the design of the study and identifying a plausible distribution of the random variables involved, the mechanisms underlying the data, and all the parameters included. Second, students should understand that error probabilities (type I, type II, and power) in conducting a test of hypothesis can be easily evaluated by replicating the study many times under similar conditions (

Sampling variability of the estimated survival probability comparing physically active and physically inactive young participants based on 900 simulated studies. The thick dashed lines for both physically active and inactive groups show the functions that were set under the original data-generating mechanism.

We proposed an engaging learning method, DICE, to stimulate experimental, active, and enjoyable learning of statistical concepts, fostering key scientific skills in designing and conducting experiments. While the main strengths of this approach lie in its interactivity and group-based nature, we acknowledge several limitations.

First, the proposed simulation method is practically limited to only a few numbers of parameters that can be included in the design of a study. Each additional variable increases the complexity of the DGM exponentially. Thus, this approach is best suited for illustrative, simplified examples of realistic health problems. More sophisticated data derived from multivariate distributions would exceed the simplicity of the method but can, of course, be considered for more advanced classes.

Second, implementing DICE is resource-intensive and should not be done in a short time frame (eg, less than 1 hour). Although this is not a direct limitation of the method, it might be a limitation of its implementation in a classroom.

Third, the effectiveness of DICE in conveying statistical concepts in epidemiology has not been formally evaluated yet. This paper is a description and discussion of the method as implemented in class at a medical university. A formal evaluation of its effectiveness in learning statistics is being devised.

Based on the experiences of the authors in using DICE, we summarize the following points for its implementation in the classroom for graduate students in medical sciences, including public health and epidemiology.

First, to implement DICE in a classroom, we recommend a classroom size of approximately 20-40 students, with small groups of 3-5 students from heterogeneous scientific backgrounds. Each group should consist of students who have different strengths and learning styles. We experienced that this could improve interaction between students and increase the joy of learning statistics.

Second, throughout the group work, students are encouraged to discuss and reflect upon the study design, practice the generation and simulation of data under a certain mechanism, and communicate their findings and interpretation of the study. We experienced that some students require more support to understand and use the provided computer code, particularly in settings with fewer students experienced in coding. It can help to go through an example of a simulated study with Stata or R code in front of the class.

Third, DICE can be implemented within a full day of teaching or over several days. For a 1-day implementation, the morning can be used for students to frame their research question and develop the study using simulations (steps 1-3). The afternoon can then be reserved for steps 4-6, ending with the presentation of the abstracts. It is important to keep in mind that the first 2 steps require most of the time (

This paper introduces an engaging simulation-based method, DICE, to learn statistics in the health sciences. We argue that DICE can boost statistical reasoning and bridge the gap between substantive knowledge and statistics for all major steps of a scientific investigation. Students can learn fundamental statistical and epidemiological concepts with simulations and combine learning of technical aspects such as coding with theoretical concepts such as error probabilities. The materials in this paper can be readily used by teachers and students.

Computer code in Stata and R to replicate the example used in the paper.

data generating mechanism

design, interpret, compute, estimate

We would like to thank all students of the 2023 master’s in public health sciences at Karolinska Institutet for participating in the weekly DICE activities and giving us valuable feedback to improve this teaching method. In addition, the authors would like to thank Stephanie Pitt (Karolinska Institutet) for valuable insights into the draft of the manuscript.

All data generated or analyzed during this study are included in this published article and its supplementary information files.

NO supervised the project. RT wrote the original draft of the manuscript. Both authors contributed equally to the conceptualization, methodology, and software. The authors approved of the final version of the manuscript.

None declared.