Skip to contents

Boss Completion

Usage

boss_completion(rates, base_rate = NULL, attempts = NULL, verbose = TRUE)

Arguments

rates

A numeric vector of probabilities as floats between 1 and 0. When base_rate is defined must sum to 1

base_rate

A probability between 1 and 0. In the case where there is a fixed rate of receiving an item table roll

attempts

Number of attempts. Rounds to nearest int, rounds negatives to 0. Enables function to return probability of completion for number of attempts

verbose

Enables printed output

Value

Returns a list $conv should always converge to 1.0. $count is the expected attempts for the given parameters. $prob element is passed only when attempts is not NULL. It is the %prob of completion for given attempts

Examples

object <- boss_completion(rates = c(7 / 24, 7 / 24, 3 / 24, 2 / 24, 2 / 24, 2 / 24, 1 / 24), base_rate = 1/20, attempts = 673, verbose = FALSE)
object$prob # gives probability of completion
#> [1] 63.24
object$count # expected completion attempts
#> [1] 673
object$conv # optional, check if your solution converged successfully. Should be 1.0
#> [1] 1