mynbinsim: Simulate a negative binomial experiment

View source: R/mynbinsim.r

mynbinsimR Documentation

Simulate a negative binomial experiment

Description

Simulates a negative binomial experiment with given iteration, and probability of success for each trial. Outputs a barplot and returns a table of the results.

Usage

mynbinsim(iter = 100, p = 0.5)

Arguments

iter

number of iterations (default iter=100)

p

probability of success for each trial (default p=0.5)

Details

From: MATH 4753 Lab 5

Value

table of relative frequencies of probabilities

Examples

sim100 = mynbinsim(100, 0.5)
sim1000 = mynbinsim(1000, 0.5)


bbydino/ISSA-ROCK-AND-ROLL documentation built on April 27, 2022, 10:03 p.m.