sbinom: The Binomial Distribution

Description Usage Arguments Value See Also Examples

View source: R/binom.R

Description

Descriptive statistics for the Binomial distribution with parameters size and prob.

Usage

1
2
sbinom(size, prob, statistic = c("all", "mean", "median", "sd", "var",
  "skew", "kurt"))

Arguments

size

number of trials (zero or more).

prob

probability of success on each trial.

statistic

desired descriptive statistic

Value

named numeric vector

See Also

Binomial

https://en.wikipedia.org/wiki/Binomial_distribution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
support <- 0:2
plot(support, dbinom(support, 2, 1/2))
sbinom(2, 1/2)

support <- 0:20
plot(support, dbinom(support, 20, 1/2))
sbinom(20, 1/2)

support <- 0:20
plot(support, dbinom(support, 20, 0.7))
sbinom(20, 0.7)

support <- 0:40
plot(support, dbinom(support, 40, 0.5))
sbinom(40, 0.5)

schuelkem/sdist documentation built on Nov. 5, 2019, 8:45 a.m.