Calculate the payout after each round of the coin toss game
Source:R/chanceGames.R
calc_score_for_coin_game.Rd
Calculate the payout after each round of the coin toss game
Usage
calc_score_for_coin_game(
toss_results,
starting_capital = 100,
heads_factor = 2,
tails_factor = 0.5,
min_bet = 0,
max_payout = Inf,
betting_fraction = 1,
insurance_payoffs = c(0, 1),
use_insurance = FALSE,
insurance_cost = 0.1
)
Arguments
- toss_results
A sequence of 1s and 2s, representing heads and tails
- starting_capital
Initial amount of money
- heads_factor
Factor to multiply bet by if heads
- tails_factor
Factor to multiply bet by if tails
- min_bet
Minimum bet
- max_payout
Maximum payout
- betting_fraction
Fraction of funds to bet
- insurance_payoffs
a list of the payoffs for insurance, one for each side of the coin
- use_insurance
Whether to use insurance
- insurance_cost
Cost of insurance