dice: Theoretical Probability Distribution of Rolling Dice

Description Usage Arguments Details Value Examples

View source: R/clttools.R

Description

Mean and probability of rolling fair or loaded dice

Usage

1
dice(n, prob = NULL)

Arguments

n

number of trials

prob

probability assigned to each possible outcome

Details

The default probabilty equals to 1/n. All the assigned probabilites must between 0 and 1.

Value

Mean value and corresponding probabilities for all possible outcomes.

Examples

1
2
dice(n = 4)
dice(2, c(0.1, 0.2, 0.2, 0.1, 0.3, 0.1))

clttools documentation built on May 29, 2017, 11:43 p.m.

Search within the clttools package
Search all R packages, documentation and source code