Skip to contents

Title

Usage

weighted_coin(prob = 0.75, outcome_set = c("tails", "heads"))

Arguments

prob

probability of success, default is .25

Value

probability and outcome as 0 and 1

Examples

weighted_coin()
#>   outcome prob
#> 1   tails 0.25
#> 2   heads 0.75
weighted_coin(prob = .55)
#>   outcome prob
#> 1   tails 0.45
#> 2   heads 0.55
weighted_coin(outcome_set = 0:1)
#>   outcome prob
#> 1       0 0.25
#> 2       1 0.75
weighted_coin(outcome_set = c(FALSE, TRUE))
#>   outcome prob
#> 1   FALSE 0.25
#> 2    TRUE 0.75
weighted_coin(outcome_set = c("fish", "no fish"))
#>   outcome prob
#> 1    fish 0.25
#> 2 no fish 0.75