proportionofrolls: Proportion of Rolls

Description Usage Arguments Details Value Examples

Description

A function that simulates rolling a pair of fair dice. The goal of the function is to empirically calculate the proportion of times the sum of the dice take on certain numbers, given a specified number of rolls.

Usage

1
proportionofrolls(Rolls = 100, DiceSum = c(3, 10, 11))

Arguments

Rolls

The number of times you roll the pair of dice

DiceSum

A numeric vector, these are possible values for the sum of the dice. Elements of the vector can take any integer value between 2 and 12. The function will calculate the proportion of rolls for which the sum of the dice equals one of the specified integers.

Details

The output should be the proportion of times the sum of the dice take on any of the values specified in your numeric vector input among the simulated rolls.

Value

a numeric value

Examples

1
proportionofrolls(Rolls=100,DiceSum=c(8,9,10,11,12))

epicentered/ExampleInClass documentation built on May 16, 2019, 4:54 p.m.