[Stable]

dist_beta(shape1, shape2)

Arguments

shape1, shape2

The non-negative shape parameters of the Beta distribution.

See also

Examples

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.8733753 0.5346605 0.2526640 0.9560558 0.8215356 0.9993909 0.3012705
#>  [8] 0.9988739 0.9512054 0.2230264
#> 
#> [[2]]
#>  [1] 0.9833191 0.9972916 0.7980708 0.9666941 0.9902797 0.8028441 0.9053231
#>  [8] 0.4419452 0.8542000 0.7995125
#> 
#> [[3]]
#>  [1] 0.467965092 0.571617407 0.288118854 0.005429955 0.175408490 0.345958074
#>  [7] 0.349281056 0.398172399 0.399887024 0.506696848
#> 
#> [[4]]
#>  [1] 0.3643480 0.7510677 0.6359347 0.4559904 0.5548608 0.1731285 0.6913326
#>  [8] 0.5049936 0.4858810 0.8809583
#> 
#> [[5]]
#>  [1] 0.12809319 0.58909450 0.39518674 0.29316975 0.09213154 0.31372662
#>  [7] 0.50760526 0.11529071 0.47700512 0.19352940
#> 

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