Create a Gamma distribution.
Create a new distribution.
The following is effectively a reimplementation of the BetaDistribution with parameters and . We reimplement the numeric CDF procedure, so that we can call trace in order to see when it is used.
>
|
myCDFNumeric := proc(t)
return evalf(piecewise(t<0, 0, t<1, 3*t*hypergeom([-2, 1], [2], t), 1));
end proc;
trace(myCDFNumeric):
|
This does not call the numeric CDF procedure - only the regular one (which in this case integrates the PDF expression symbolically):
But these calling sequences do lead to a call to myCDFNumeric:
{--> enter q, args = .5
<-- exit q (now in GetValue) = .8749999998}
| |
{--> enter q, args = 1/2
<-- exit q (now in GetValue) = .8750000000}
| |
For Median, it also depends on the numeric option (coincidentally, this call runs via Quantile):
{--> enter q, args = 0.
<-- exit q (now in extproc) = 0.}
{--> enter q, args = .25
<-- exit q (now in extproc) = .578124999999975}
{--> enter q, args = .25
<-- exit q (now in extproc) = .578124999999975}
{--> enter q, args = 0.
<-- exit q (now in extproc) = 0.}
{--> enter q, args = .25
<-- exit q (now in extproc) = .578124999999975}
{--> enter q, args = .216216216216226
<-- exit q (now in extproc) = .518508281839222}
{--> enter q, args = .206102270110636
<-- exit q (now in extproc) = .499627215365731}
{--> enter q, args = .206301958179384
<-- exit q (now in extproc) = .500004694760124}
{--> enter q, args = .206299474633007
<-- exit q (now in extproc) = .50000000116623}
{--> enter q, args = .206299474015915
<-- exit q (now in extproc) = .500000000000049}
{--> enter q, args = .206299474015889
<-- exit q (now in extproc) = .499999999999986}
| |
We create a parameterized distribution with PDF at appropriate values . The parameter must be a positive real number.
By setting infolevel, we can see when these assumptions are used.
Statistics:-PDF -- using the following implicit assumptions: {0 < a}
| |
It turns out that the Kurtosis of this distribution is independent of .
Statistics:-Kurtosis -- using the following implicit assumptions: {0 < a}
| |
The speed distribution for the molecules of an ideal gas.
Create random variable having this distribution.
Compute average molecular speed.
Compare with the Maxwell distribution.
Compute average kinetic energy.
Helium at 25C.
Most probable speed.
Use simulation to verify the results.