prob_win: Win probability calculator

Description Usage Arguments Value Examples

View source: R/prob_win.R

Description

This function calculates the probability of one dice rolling a higher digit than a second dice. This function works for any two dice, even of different lengths. The probability calculated is the first dice beating the second.

Usage

1
prob_win(dice_a, dice_b)

Arguments

dice_a

The first dice, which we calculate the probability of winning against dice_b.

dice_b

The second dice, which we use to calculate the probability that dice_a beats.

Value

A single numeric decimal, representing probability of first die beating the second die.

Examples

1
prob_win(c(1, 2, 3, 4, 5, 6), c(1, 2, 3, 4, 5, 6))

andreyrisukhin/ntdice documentation built on Dec. 19, 2021, 3:34 a.m.