Items tagged with quantile


I'm wondering if there is an available command that can evaluate the number of terms required to produce a desired outcome.

Specifically, I am interested in determining the probability of a Poisson distribution, given the parameter (mean) value and the probability outcome. I can obtain the desired result using trial and error / brute force, but I am curious to know if there is a more efficient way. 

Suppose that, lambda = 2.6 and the cumulative sum of the probabilities is 95%. I know that I must add the first 6 terms for P(x) in the series (x=0,1, ..,5) to sum to 0.95. Each term ...  P(x=0)= 0.07, P(x=1)=0.19, and so on.

However, how can we know that desired 95% outcome can be determined from the first 5 terms without trial & error?


I need a bimodal distribution. Since I could not find any among the ones provided by Maple, I created a simple one:

U := Distribution(PDF = (proc (t) options operator, arrow; piecewise(t < -5, 0, t < 5, -(1/2000)*t^4+(9/1000)*t^2+7/80, 0) end proc)):
X := RandomVariable(U):

#Plotting PDF and CDF works fine:
plot(PDF(X, t), t = -infinity .. infinity);

plot(CDF(X, t), t = -infinity .. infinity)

However, plotting the quantile function does not work:

plot(Quantile(X, z), z = 0 .. 1);

it has a decreasing part for z<1/2 and a discontinuity at z=1/2.
I can plot it correctly as
plot('Quantile'(X, z), z = 0 .. 1);

but I wonder why the first option does not work for such a simple distribution.



In Igor's "Multivariate Distributions in Maple"
he shows how to calculate the Multivariate Normal Distribution. Below I have provided some data
for expected values, covariances etc for a 3 random variable distribution.

Now I try to find the Quantile (with probability 0.05) for such a distribution however Maple fails.
How can I find the Quantile (with probability 0.05...

Phiinverse := (x) -> Quantile(Normal(0, 1), x) :


and the result is 5.691523310-2.147372008*I

Now, I can get a real-valued solution to this by using the equivalent
functionality from stats instead of Statistics.

PhiinvClassic:= (x) -> statevalf[icdf, normald[0, 1]](x):


Here is yet another finesse (new to me) in getting better performance for some floating-point computation involving the Statistics package.

> restart:

> X:=Statistics:-RandomVariable('Normal'(0,1)):


> restart:

> X:=Statistics:-Distribution(Normal(0,1)):
Page 1 of 1