bin_distribution: bin_distribution

Description Usage Arguments Format Value Examples

View source: R/functions.R

Description

function which computes probabilities for getting exactly k successes in n trials with probability p

Usage

1

Arguments

trials

a non-negative integer which provides the number of trials

prob

a number between 0 and 1 which gives the probablity of a success on an individual draw

Format

An object of class numeric of length 1.

Value

an object of bindis class, binomial distribution of probabilities

Examples

1
2
3
4
5
default
dis1 <- bin_distribution(1, 0.5)

#example 2
dis2 <- bin_distribution(10, 0.2)

Thomas-Sperandeo/workout3 documentation built on May 5, 2019, 12:26 a.m.