rstpet: Random St. Petersburg Paradox lottery draws

View source: R/rstpet.r

rstpetR Documentation

Random St. Petersburg Paradox lottery draws

Description

Random St. Petersburg Paradox lottery draws

Usage

rstpet(size, log2 = FALSE)

Arguments

size

the number of draws

log2

Logical. If TRUE, returns log2 of results

Details

In this lottery, the gain is 1 with a probability 1/2, 2 with probability 1/4, 4 with probability 1/8, and so on.

Value

a vector of length size.


HervePerdry/M1SP documentation built on Dec. 16, 2024, 8:19 p.m.