Question: how to create distribution and use random variable for at least k events

Custom distribution
restart;
with(Statistics):
Density := 2*exp(-t^2)*sqrt(Pi);
Dist := int(Density, t);

a.

RealDist := Distribution(Dist(t-1));
Error, (in Statistics:-Distribution) unexpected argument(s): Pi(t)*(erf(t))(t)

b.

RealDist := Distribution(PDF = (t->2*exp(-t^2)*sqrt(Pi)), CDF = (t->Dist(t)), Mean = 1);

RealDist := Distribution(PDF = (t->2*exp(-t^2)*sqrt(Pi)), CDF = (t->Dist(t)));
X:=RandomVariable(RealDist(t-1));
Error, (in Statistics:-Distribution) invalid input: IsKnownDistribution expects its 1st argument, dn, to be of type name, but received module () export CDF, Conditions, Mean, PDF, Type; option Distribution, Continuous; end module

Please Wait...