mybin: Binomial Simulation

Description Usage Arguments Value Examples

View source: R/mybin.R

Description

This function simulates a binomial experiment of succeeding 0 to x amount of times in a trial of a given size over a set amount of iterations. The results are then plotted onto a bar graph and outputted to a table to show the probability of something succeeding 0 to x amount of times over all the iterations.

Usage

1
mybin(iter = 100, n = 10, p = 0.5)

Arguments

iter

number of iterations

n

size of trials

p

probability of success

Value

Barplot and table outlining the respective probability of 0 to n successes given p probability in a trial of size n over iter iterations

Examples

1
2
mybin(10000, 10, 0.7)
mybin(200, 10, 0.7)

eric7chen/MATH4753chen0122 documentation built on April 25, 2021, 1:47 a.m.