dist_beta(shape1, shape2)
The non-negative shape parameters of the Beta distribution.
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.89834477 0.94101682 0.97299612 0.52707313 0.11212477 0.51148485
#> [7] 0.23684017 0.81834373 0.03827251 0.99996339
#>
#> [[2]]
#> [1] 0.9548452 0.9371726 0.8271528 0.8845451 0.5323125 0.7956519 0.8512287
#> [8] 0.9823409 0.9798821 0.8093483
#>
#> [[3]]
#> [1] 0.01673987 0.20720428 0.03357355 0.06163490 0.37960513 0.23298043
#> [7] 0.26666862 0.17816355 0.36809034 0.21915731
#>
#> [[4]]
#> [1] 0.46107535 0.38497520 0.50106196 0.09165313 0.46808946 0.30638060
#> [7] 0.56519807 0.22134744 0.42139522 0.27983224
#>
#> [[5]]
#> [1] 0.22161909 0.19996242 0.37210877 0.32185224 0.30939230 0.02912269
#> [7] 0.42962043 0.25773658 0.21096519 0.63729008
#>
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