# Question:why beta distribution is just a straight line

## Question:why beta distribution is just a straight line

Maple

as i do not know what is nu and omega in beta distribution, can i solve it by equating with mean of real data's mean and stardard derivation, to find nu and omega, but solution of nu is negative,

i guess this method may be wrong, as result diagram is not fitted with real data

and weibull using this method, can not be solved and said solution lost

what is the correct way to draw it?

moreover, i add t = 5..15, it said not a range error, how to focus or magnify the range of two lines which some part overlapped

restart;

with(ExcelTools):

with(ListTools):

with(DynamicSystems):

with(Statistics):

filename := "1171.HK";

open3 := Import(cat(cat("C://Coal//",filename),".xls"), filename, "B2:B100");

high3 := Import(cat(cat("C://Coal//",filename),".xls"), filename, "C2:C100");

low3 := Import(cat(cat("C://Coal//",filename),".xls"), filename, "D2:D100");

close3 := Import(cat(cat("C://Coal//",filename),".xls"), filename, "E2:E100");

with(Statistics):

n := 0;

A := Array([close3[n+20][1],close3[n+19][1],close3[n+18][1],close3[n+17][1],close3[n+16][1],

close3[n+15][1],close3[n+14][1],close3[n+13][1],close3[n+12][1],close3[n+11][1],close3[n+10][1],close3[n+9][1],

close3[n+8][1],close3[n+7][1],close3[n+6][1],close3[n+5][1],close3[n+4][1],close3[n+3][1],close3[n+2][1],close3[n+1][1]]):

Y := RandomVariable(EmpiricalDistribution(A));

X := RandomVariable(NormalDistribution(Mean(A),StandardDeviation(A)));

plot([proc (t) options operator, arrow; CDF(Y, t) end proc, proc (t) options operator, arrow; CDF(X, t) end proc], x=5..15, color = [red, blue], thickness = 2);

X := RandomVariable(Beta(nu, omega)):

sol := solve( {Mean(X)=Mean(A),Variance(X)=sqrt(StandardDeviation(A))}, [nu, omega]);

Y := RandomVariable(EmpiricalDistribution(A));

plot([proc (t) options operator, arrow; CDF(Y, t) end proc, proc (t) options operator, arrow; CDF(X, t) end proc], color = [red, blue], thickness = 2);

X := RandomVariable(Beta(nu, omega)):

sol := solve( {Mean(X)=Mean(A),Variance(X)=sqrt(StandardDeviation(A))}, [nu, omega]);

Y := RandomVariable(EmpiricalDistribution(A));