| dist_normal | R Documentation |
See stats::Normal.
dist_normal(mean = NULL, sd = NULL)
mean |
Scalar mean parameter, or |
sd |
Scalar standard deviation parameter, or |
Both parameters can be overridden with
with_params = list(mean = ..., sd = ...).
A NormalDistribution object.
Other Distributions:
Distribution,
dist_bdegp(),
dist_beta(),
dist_binomial(),
dist_blended(),
dist_dirac(),
dist_discrete(),
dist_empirical(),
dist_erlangmix(),
dist_exponential(),
dist_gamma(),
dist_genpareto(),
dist_lognormal(),
dist_mixture(),
dist_negbinomial(),
dist_pareto(),
dist_poisson(),
dist_translate(),
dist_trunc(),
dist_uniform(),
dist_weibull()
mu <- 0
sigma <- 1
d_norm <- dist_normal(mean = mu, sd = sigma)
x <- d_norm$sample(20)
d_emp <- dist_empirical(x)
plot_distributions(
empirical = d_emp,
theoretical = d_norm,
estimated = d_norm,
with_params = list(
estimated = list(mean = mean(x), sd = sd(x))
),
.x = seq(-3, 3, length.out = 100)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.