Manipulation of Discrete Random Variables with discreteRV

A prominent issue in statistics education is the sometimes large disparity between the theoretical and the computational coursework. discreteRV is an R package for manipulation of discrete random variables which uses clean and familiar syntax similar to the mathematical notation in introductory probability courses. The package offers functions that are simple enough for users with little experience with statistical programming, but has more advanced features which are suitable for a large number of more complex applications. In this paper, we introduce and motivate discreteRV, describe its functionality, and provide reproducible examples illustrating its use.

Eric Hare , Andreas Buja , Heike Hofmann

CRAN packages used

discreteRV, devtools

CRAN Task Views implied by cited packages


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Hare, et al., "The R Journal: Manipulation of Discrete Random Variables with discreteRV", The R Journal, 2015

BibTeX citation

  author = {Hare, Eric and Buja, Andreas and Hofmann, Heike},
  title = {The R Journal: Manipulation of Discrete Random Variables with discreteRV},
  journal = {The R Journal},
  year = {2015},
  note = {},
  doi = {10.32614/RJ-2015-015},
  volume = {7},
  issue = {1},
  issn = {2073-4859},
  pages = {185-194}