bin_probability: bin_probability

Description Usage Arguments Value Examples

View source: R/functions.R

Description

function which computes binomial probability for k successes in n trials

Usage

1
bin_probability(trials, success, prob)

Arguments

trials

a non-negative integer which provides the number of trials

success

a non-negative integer, smaller or equal to n, which provides the number of successes in n trials

prob

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

Value

an object of numeric class, binomial probability for given successes and trials

Examples

1
2
3
4
5
#default
prob1 <- bin_probability(1, 1, 0.5)

#multiple number of successes
prob2 <- bin_probablity(10, 1:5, 0.3)

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