Learn R Programming

PASWR (version 1.3)

bino.gen: Simulating Binomial Distribution

Description

Function that generates and displays m repeated samples of n Bernoulli trials with a given probability of success.

Usage

bino.gen(samples, n, pi)

Arguments

samples

number of repeated samples to generate

n

number of Bernoulli trials

pi

probability of success for Bernoulli trial

Value

simulated.distribution

Simulated binomial distribution

theoretical.distribution

Theoretical binomial distribution

Examples

Run this code
# NOT RUN {
bino.gen(1000, 20, 0.75)

# }

Run the code above in your browser using DataLab