numberNeededSim: Number-Needed Simulation

View source: R/numberNeededSim.R

numberNeededSimR Documentation

Number-Needed Simulation

Description

You pick random numbers from 0 to 1, until their sum exceeds some target number. What's the expected value of the number of numbers you have to pick?

Usage

numberNeededSim(target = 1, reps = 1000,
                seed = NULL, table = TRUE)

Arguments

target

the target number

reps

number of simulations to perform

seed

The user may provide a seed-value for random-number generation.

table

Does the user want a table of the results?

Value

side effects

Author(s)

Homer White homerhanumat@gmail.com

Examples

numberNeededSim(seed = 3030)

homerhanumat/bcscr documentation built on Jan. 14, 2023, 4 a.m.