dist <- dist_beta(shape1 = c(0.5, 5, 1, 2, 2), shape2 = c(0.5, 1, 3, 2, 5))
dist
#> <distribution[5]>
#> [1] Beta(0.5, 0.5) Beta(5, 1) Beta(1, 3) Beta(2, 2) Beta(2, 5)
mean(dist)
#> [1] 0.5000000 0.8333333 0.2500000 0.5000000 0.2857143
variance(dist)
#> [1] 0.12500000 0.01984127 0.03750000 0.05000000 0.02551020
skewness(dist)
#> [1] 0.000000 -5.916080 2.581989 0.000000 5.962848
kurtosis(dist)
#> [1] -1.5000000 1.2000000 0.0952381 -0.8571429 -0.1200000
generate(dist, 10)
#> [[1]]
#> [1] 0.57716209 0.95712676 0.51272391 0.93824073 0.99515628 0.04294426
#> [7] 0.36260647 0.31435554 0.00302847 0.41149750
#>
#> [[2]]
#> [1] 0.8014585 0.7617427 0.7515718 0.9677268 0.8482862 0.6388981 0.8219619
#> [8] 0.7697629 0.9109772 0.9994124
#>
#> [[3]]
#> [1] 0.236336080 0.115627217 0.216302708 0.074413319 0.329727704 0.316671953
#> [7] 0.244305850 0.241259576 0.120459703 0.001220667
#>
#> [[4]]
#> [1] 0.3989083 0.5600205 0.7817342 0.3174363 0.7904692 0.4308882 0.1958695
#> [8] 0.2407125 0.7796609 0.5371046
#>
#> [[5]]
#> [1] 0.39473277 0.05643909 0.34659362 0.62582410 0.33593872 0.40339891
#> [7] 0.42415031 0.26402567 0.32176762 0.26781893
#>
density(dist, 2)
#> [1] 0 0 0 0 0
density(dist, 2, log = TRUE)
#> [1] -Inf -Inf -Inf -Inf -Inf
cdf(dist, 4)
#> [1] 1 1 1 1 1
quantile(dist, 0.7)
#> [1] 0.7938926 0.9311499 0.3305670 0.6367425 0.3603577