Learn R Programming

PASWR (version 1.0)

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.distributionSimulated binomial distribution
  • theoretical.distributionTheoretical binomial distribution

Examples

Run this code
bino.gen(1000, 20, 0.75)

Run the code above in your browser using DataLab