Items tagged with statistics

Feed
Also available: statistics

What is the Maple Formula for the Excel function: =WEIBULL.DIST(A1,2,6.2,FALSE)

where A1..A26 is 0..26  ?  How do I plot it?

Thank you, Les

Hi everyone, 

I seek for creating a discrete random variable with the following characteristics. Let i be an integer between 1 and 100. The random variable is an integer, among i-x, i-x+1, i-x+2..., i-1, i+1, i+2... i+x. For example, with i=20 and x=5, the random variable is an integer between 15 and 25; with i=23 (and again x=5), the random variable is an integer between 18 and 28; and with i=98, the random variable is an integer among 93, 94... 97 and then 99, 100, 1, 2, 3.

Each possible value has the same probability, that is, 1/2x.

Any tips? Thank you in advance.

If input ["1","1","2","2","2","77"]

output a graph such as

1 has 2 times

2 has 3 times

77 has 1 time

Is there a command in Maple to produce a table of z values given F(z) where F is the CDF of the Standard Normal Distribution? I know of the command ProbabilityTable to generate a table of z, F(z) values.  What I would really like is F, Inv(F) table of values. I guess  I could write my own code to do this but was wondering if there is an easier way to do this.

I am finding that the  PDF command with Student's t-distribution in the Statistics package is not behaving as expected. Here is what I tried so far:

>restart;
>with(Statistics):
>X := RandomVariable(StudentT(nu));
    
>PDF(X,0.5);
                         Dirac(X - 0.5)

Note that PDF(X,0.5) is evaluating to Dirac(X-0.5) instead of the pdf of Student's t-distribution density function. 

Any help in identifying the issue is greatly appreciated. I am running Maple2015 on linuxmint 17.

Thanks!

i want to solve the system of equation ( 1 )  , (2)  ,  (3)   under the assumation that x , y have the CDF in (4)  ,  (5)
 

diff(L(lambda[1], lambda[2], alpha), lambda[1]) = n/lambda[1]+sum(x[i], i = 1 .. n)-(sum(2*x[i]*exp(lambda[1])/(exp(x__i*`λ__1`)-1+alpha), i = 1 .. n))

diff(L(lambda[1], lambda[2], alpha), lambda[1]) = n/lambda[1]+sum(x[i], i = 1 .. n)-(sum(2*x[i]*exp(lambda[1])/(exp(x__i*`λ__1`)-1+alpha), i = 1 .. n))

(1)

diff(L(lambda[1], lambda[2], alpha), lambda[2]) = m/lambda[2]+sum(y[j], j = 1 .. m)-(sum(2*y[j]*exp(lambda[2])/(exp(y__j*`λ__2`)-1+alpha), j = 1 .. m))

diff(L(lambda[1], lambda[2], alpha), lambda[2]) = m/lambda[2]+sum(y[j], j = 1 .. m)-(sum(2*y[j]*exp(lambda[2])/(exp(y__j*`λ__2`)-1+alpha), j = 1 .. m))

(2)

diff(L(lambda[1], lambda[2], alpha), alpha) = (n+m)/alpha-(sum(2/(exp(x[i]*`λ__1`)-1+alpha), i = 1 .. n))-(sum(2/(exp(y[j]*`λ__2`)-1+alpha), j = 1 .. m))

diff(L(lambda[1], lambda[2], alpha), alpha) = (n+m)/alpha-(sum(2/(exp(x[i]*`λ__1`)-1+alpha), i = 1 .. n))-(sum(2/(exp(y[j]*`λ__2`)-1+alpha), j = 1 .. m))

(3)

G(x, lambda[1], alpha) = 1-alpha/(exp(lambda[1]*x)-1+alpha)

G(x, lambda[1], alpha) = 1-alpha/(exp(lambda[1]*x)-1+alpha)

(4)

G(y, lambda[2], alpha) = 1-alpha/(exp(lambda[2]*x)-1+alpha)

G(y, lambda[2], alpha) = 1-alpha/(exp(lambda[2]*x)-1+alpha)

(5)

``

``


 

Download internet.mw

Application that allows us to measure the reliability of a group of data through a row and columns called cronbach alpha at the same time to measure the correlation of items through the pearson correlation of even and odd items. It can run on maple 18 to maple 2017. This will be useful when we are developing a thesis in the statistical part.

In Spanish

StatisticsSocialCronbachPearson.zip

Lenin Araujo Castillo

Ambassador of Maple

 

 

There is a horse a buggy ride around a small village which takes roughly 30 minutes.  Here is an example timing for 12 consecutive rides [34, 29, 32, 32, 28, 28, 27, 28, 39, 24, 27, 27].

How can I create a monte carlo simulation graph that would estimate the future times based on given data?  Do I randomly pick numbers from the given list for a simulation or generate random numbers based on mean and standard deviation generated from the data?

When would the best possible time to come back after 4 rides be?

Let us consider 

Statistics:-Mode(Binomial(n, p));
                        floor((1 + n) p)

Up to Wiki, the output is not correct. Simply no words.


 

with(Statistics):````

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

PDF(sin(X), t)

piecewise(t <= -1, 0, t < 1, 2^(1/2)*exp(-(1/2)*arcsin(t)^2)/(Pi^(1/2)*(-t^2+1)^(1/2)), 1 <= t, 0)

(1)

int(%, t = -1 .. 1)

2*erf((1/4)*Pi*2^(1/2))

(2)

evalf(%)

1.767540069

(3)

``


There were recently submitted a dozen Maple bugs by me and others. Maplesoft have brought no responses. They keep strategic silence. True merit is not afraid of criticism.

Download Bug_in_Statistics_PDF.mw

restart; with(Statistics):
X := RandomVariable(Normal(0, 1)): Y := RandomVariable(Uniform(-2, 2)):
Probability(X*Y < 0);

crashes my comp in approximately 600 s. Mma produces 1/2 on my comp in 0.078125 s.

Let us consider

with(Statistics):
X1 := RandomVariable(Normal(0, 1)):
X2 := RandomVariable(Normal(0, 1)):
X3 := RandomVariable(Uniform(0, 1)): 
X4 := RandomVariable(Uniform(0, 1)):
Z := max(X1, X2, X3, X4); CDF(Z, t);

int((1/2)*(_t0*Heaviside(_t0-1)-_t0*Heaviside(_t0)-Heaviside(1-_t0)*Heaviside(-_t0)+Heaviside(-_t0)+Heaviside(1-_t0)-1)*(1+erf((1/2)*_t0*2^(1/2)))*(2^(1/2)*Heaviside(_t0-1)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(_t0)*exp(-(1/2)*_t0^2)*_t0-2^(1/2)*Heaviside(-_t0)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0)-Pi^(1/2)*undefined*erf((1/2)*_t0*2^(1/2))*Dirac(_t0-1)+2^(1/2)*Heaviside(-_t0)*exp(-(1/2)*_t0^2)+2^(1/2)*Heaviside(1-_t0)*exp(-(1/2)*_t0^2)-Pi^(1/2)*undefined*Dirac(_t0)-Pi^(1/2)*undefined*Dirac(_t0-1)+Pi^(1/2)*Heaviside(_t0-1)*erf((1/2)*_t0*2^(1/2))-Pi^(1/2)*Heaviside(_t0)*erf((1/2)*_t0*2^(1/2))-exp(-(1/2)*_t0^2)*2^(1/2)+Pi^(1/2)*Heaviside(_t0-1)-Pi^(1/2)*Heaviside(_t0))/Pi^(1/2), _t0 = -infinity .. t)

whereas Mma 11 produces the correct piecewise expression (see that here screen15.11.16.docx).

Edit. Mma output.

reference :

Question:Quantile function
Posted:
Mikhail Drugov 88 

 

In the reference above, Mikhail has raised a problem concerning the function Statistics:-Quantile.
A problem of the same kind exists for the function Mode.

In fact  Mode returns the value of the mode only for unimodal distributions ; but for "bimodal" distributions it does not work properly.
Theoritically the mode is the value where the PDF reaches its maximum maximorum. Except in very particular cases this maximum is unique, even if common language speaks of "bimodal distributions" instead of "two bumped distributions".

Here is an example of a two bumped distribution (Z) obtained by mixing two gaussians distributions.
It has two bumps (z=-1, z=2) but only one mode (z=-2).
It could be hopefully acceptable that Mode returns the {-2, 2} (even if only -2 is the true mode), but Mode returns also the value of z that minimizes PDF(Z, z), which is not correct at all.


 

restart:
with(Statistics):

X := RandomVariable(Normal(-2,1)):
Y := RandomVariable(Normal(2,1)):

r    := 0.4:
f__Z := unapply((1-r)*PDF(X,t)+r*PDF(Y,t), t);
Z    := Distribution(PDF=f__Z):

proc (t) options operator, arrow; .1692568750*2^(1/2)*exp(-(1/2)*(t+2)^2)+.1128379167*2^(1/2)*exp(-(1/2)*(t-2)^2) end proc

(1)

plot(PDF(Z,t), t=-4..4);

 

Mode(Z);

{-1.999102417, .1352239093, 1.997971857}

(2)

 


 

Download ProblemWithMode.mw

 

Hello,

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

with(Statistics):
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.

 

 

I have a data point set:

x_val:=<250,300,350,397,451,497,547,593,647,691,745,788,840,897>:
y_val:=<0,0.5,2,6.3,23.2,48.7,71.2,83.4,90.1,92.8,94.7,95.7,96.9,97.8>:

I want to make a least square fit using this difficult function:
 

function:=x->1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350))

but both Statistics[Fit]:
 

with(Statistics):fit_nelog:=Fit(1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350)),<x_val|y_val>,x,parameternames=[k,E],output=[parametervector,residualsumofsquares]);

and DirectSearch[DataFit]:

with(DirectSearch):fit_nelog2:=DataFit(1-exp(-(k*exp(-(E/(8.314*873.15))*((873.15/x)-1)))*(0.026/350)),x_val,y_val,x,method=cdos);


give wrong k,E parameters. The correct parameter values were obtained with Excel Solver:

k=27843.3551042397

E=68.4

The approximately correct parameters were fitted when using logarithm form of the function.
How can I obtain correct parameter values in Maple using given form of the function?

1 2 3 4 5 6 7 Last Page 1 of 11