Question: How do I make the Beta "Subjective" Distribution function work?

Hello community, I am new in this forum and sorry if the following seems rudimentary:

I am replicating a distribution function using Statistics[Distribution] as defined here:

Vose Software's Beta Subjective

I have tested numerically and the function works for this initial values: Min := 3; Mlikely := 8; Avg := 9; Max := 18;

But failed to complete with these values (which I tested works in another software) Min := 1000; Mlikely := 1400; Avg := 1500; Max := 2100;

What puzzles me is the inconsistency of handling the functions (be aware that the server kernel could be slow at times). I hope I don't have to give up and continue my custom distribution project in another software.

Here is the document: 

NULL

The Beta Subjective Distribution

 

 

restart

 

with(Statistics)

NULL

Min := 3; Mlikely := 8; Avg := 9; Max := 18

18

(1)

NULL

Mid := (Min+Max)*(1/2)

21/2

(2)

alpha := 2*(Avg-Min)*(Mid-Mlikely)/((Avg-Mlikely)*(Max-Min))

2

(3)

beta := alpha*(Max-Avg)/(Avg-Min)

3

(4)

NULLNULLNULLNULL

NULL

f := simplify(piecewise(Min <= x and x <= Max, (x-Min)^(alpha-1)*(Max-x)^(beta-1)/(Beta(alpha, beta)*(Max-Min)^(alpha+beta-1)), 0))

piecewise(x < 3, 0, x <= 18, (4/16875)*(x-3)*(-18+x)^2, 18 < x, 0)

(5)

NULL

NULL

MD := Distribution(PDF = unapply(f, x), Conditions = [`and`(Min < Mlikely and Mlikely < Max and Min < Avg and Avg < Max and Mlikely <> Avg, piecewise(Avg < Mlikely, Mlikely > Mid, Mid > Mlikely))])

_m2352873740384

(6)

NULL

NULL

NULL

NULL

NULL

X := RandomVariable(MD)

_R

(7)

NULL

evalf(Mean(X))NULL

9.

(8)

NULL

NULL

evalf(Mode(X))

{8.}

(9)

evalf(Quantile(X, .25))

HFloat(6.645331256340534)

(10)

NULL

A := Sample(X, 10^5)

Mean(A)

HFloat(8.989513601786443)

(11)

Mode(A)

HFloat(8.399525182283146)

(12)

Variance(A)

HFloat(9.029923294780689)

(13)

Skewness(A)

HFloat(0.29817612117709397)

(14)

Kurtosis(A)

HFloat(2.3706624578773154)

(15)

Quantile(A, .25)

HFloat(6.63427086578336)

(16)

NULL

Download Distribution-Beta-Subjective.mw

Please Wait...