See stats::Binomial
Arguments
- size
Number of trials parameter (integer), or
NULL
as a placeholder.- prob
Success probability parameter, or
NULL
as a placeholder.
See also
Other Distributions:
Distribution
,
dist_bdegp()
,
dist_beta()
,
dist_blended()
,
dist_dirac()
,
dist_discrete()
,
dist_empirical()
,
dist_erlangmix()
,
dist_exponential()
,
dist_gamma()
,
dist_genpareto()
,
dist_lognormal()
,
dist_mixture()
,
dist_negbinomial()
,
dist_normal()
,
dist_pareto()
,
dist_poisson()
,
dist_translate()
,
dist_trunc()
,
dist_uniform()
,
dist_weibull()
Examples
d_binom <- dist_binomial(size = 10, prob = 0.5)
x <- d_binom$sample(100)
d_emp <- dist_empirical(x)
plot_distributions(
empirical = d_emp,
theoretical = d_binom,
estimated = d_binom,
with_params = list(
estimated = list(
size = max(x),
prob = mean(x) / max(x)
)
),
.x = 0:max(x)
)