sim_coin_tosses: Simulate a sequence of coin tosses

Description Usage Arguments Value Examples

Description

Simulate a sequence of coin tosses

Usage

1
sim_coin_tosses(n_sims, n, prob)

Arguments

n_sims

The number of simulations

n

The length of the coin toss sequence

prob

the probability of a head (1)

Value

An list of length n_sims, where each element is a vector of length n containing a coin toss sequence: 0 (tails), 1 (heads).

Examples

1
sim_coin_tosses(n_sims = 2, n = 4, prob = 1)

ST541-Fall2018/cointoss documentation built on May 31, 2019, 1:53 p.m.