mybin: Simulate a binomial experiment

View source: R/mybin.r

mybinR Documentation

Simulate a binomial experiment

Description

Simulates a binomial experiment with given iteration, sample size, and probability of success. Outputs a barplot and returns a table of the results.

Usage

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

Arguments

iter

number of iterations (default iter=100)

n

sample size (default n=10)

p

probability of success (default p=0.5)

Details

From: MATH 4753 Lab 5

Value

table of relative frequencies

Examples

sim100 = mybin(iter = 100, n = 10, p = 0.7)
sim1000 = mybin(iter = 1000, n = 10, p = 0.7)


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