Sorry, you need to enable JavaScript to visit this website.

P2-12: Using R in a Probability Course

With Qing (Wendy) Wang (Wellesley College)


Introduction to Probability is a course that is commonly offered in a Mathematics or Mathematics & Statistics department. It is an important topic that leads to deep understanding of basic statistical inferential techniques, and therefore is often a requirement for statistics major or minor. However, due to the theoretical nature of the subject, teaching probability often involves mathematical derivations and proofs, but lacks data visualization or statistical computation. Using R in a probability course can fill in this missing piece naturally. Besides covering the traditional topics (e.g. probability and counting, random variables, distributions, moments, central limit theorem, etc.) by using mathematical deviations and proofs, I incorporated an R component throughout the semester to motivate intuition and enhance students’ understanding.

In the poster presentation I will share the following three examples:

  1. The famous Birthday problems can be simulated in R, which helps confirm the result via rigorous calculation easily.
  2. The Central Limit Theorem can be illustrated in R through a set of simulations, using different distributions and sample sizes, to emphasize the important conditions for the approximate normal distribution to hold.
  3. When teaching Universality of the Uniform, R can be used to visualize the distribution of the generated random values derived from the theorem.