petersburg: St. Petersburg paradox

Description Usage Arguments Value Examples

Description

This function simulates the average payout of a player in the lottery game and consequent probability problem proposed by Nicolas Bernoulli.

Usage

1
petersburg(x, bet = 0)

Arguments

x

The number of lotteries to simulate.

be

The price at which the player plays the game.

Value

The average payout across all simulated lotteries.

Examples

1
petersburg(10000, bet = 15)

benjcunningham/rcarlo documentation built on May 12, 2019, 11:56 a.m.