This package provides a framework for performing elementary probability calculations on finite sample spaces. It is built around the concept of a *probability space*, which is an object of outcomes and an object `probs`

of probabilities associated with the outcomes.

There are two ways to represent a probability space in the `prob`

package. The first is with a data frame that has a `probs`

column. Entries of `probs`

should be nonnegative and sum to one. The second way is with a list having two components: `outcomes`

and `probs`

. The component `outcomes`

is a list containing elements of the most arbitrary sort; they can be data frames, vectors, more lists, whatever. The `probs`

component is a vector (of the same length as `outcomes`

), which associates to each element of `outcomes`

a nonnegative number. As before, the only additional requirement is that the `sum`

of `probs`

be one.

There are functions in the `prob`

package to address many topics in a standard course in elementary probability. In particular, there are methods for setting up sample spaces, counting tools, defining probability spaces, performing set algebra, calculating probability and conditional probability, tools for simulation and checking the law of large numbers, adding random variables, and finding marginal distributions. See `vignette("prob")`

for details.

There are some functions included to set up some of the standard sample spaces usually encountered in an elementary probability course. Examples include tossing a coin, rolling a die, drawing from a 52 card deck, *etc*. If you know of topics that would be of general interest and could be incorporated in the `prob`

package framework, I would be happy to hear about them. Comments and suggestions are always welcomed.

The `prob`

package is a first step toward addressing probability in `R`

, and has been written in the spirit of simplicity. The procedures work best to solve problems that are manageable in scope. Users that wish to investigate especially large or intricate problems are encouraged to modify and streamline the code to suit their individual needs.

Characteristic functions for the base probability distributions have been included. For details, type `vignette("charfunc")`

at the command prompt.

Package: | prob |

Version: | 0.9-5 |

Date: | 2013-11-20 |

Depends: | combinat, fAsianOptions, hypergeo, VGAM |

LazyLoad: | no |

License: | GPL version 3 or newer |

URL: | http://prob.r-forge.r-project.org, http://people.ysu.edu/~gkerns |

G. Jay Kerns <gkerns@ysu.edu>

Maintainer: G. Jay Kerns <gkerns@ysu.edu>

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.