4029 Reputation

17 Badges

6 years, 186 days

MaplePrimes Activity

These are questions asked by mmcdara

Hello everybody

I'm using discrete distributions from the Statistics package and I found a rather strange result.

In short the theoritical values of some statistics of a NegativeBinomial(1, P) Random Variable (P being the probability of success equal to 1e-4) are correctly computed, but their empirical estimators computed from a sample of this RV are roughly wrong.

For NegativeBinomial(1, P) is similar to Geometric(P) I asked Maple to compute the theoritical values of some statistics of Geometric(P) and next to assess their empirical values from a sample of Geometric(P).
Some discrepancies still remain but they can be explained by statistical fluctuations.

Could you please look to the attached file (an error on my part is still possible) and help me to fix this ?

Thanks in advance

PS : the histogram of Sample(NegativeBinomial(K, P), AnySizeYouWant) is obviously wrong (it should look like a decreasing exponential) 



Hello everybody

I have a variable U of type set, made of index names name[expression sequence] 
One example is 
U := {A[1], A[2], B[2]}

I want to build the set of all the expression sequence  ; in the example above this is {1, 2}
op~(U) does the job ... although I do not really understand why

I also want to buid the set of all the name ;  ( {A, B} in the example)
Here I have written something that performs correctly  ... but it is very uggly
parse~(substring~(convert~(U, string), 1..1));  # works only for names with a single character !!!

I do not know how to isolate the names ?
Is it possible to write something smarter ?

Thanks in advance

Hello all, 

A question concerning NetCdf files was asked in 2012 and is still unanswered today.
Browsing the questions only returns this item, suggesting the NetCdf topic is not a concern in the Maple community.
Nevertheless, does it exist some capabilities in reading and writting NetCDF files ?
If not, are there some planned development on the subject ?

Let's hope now for not having to wait four years for an answer, all responses will be greatly appreciated, even negative.


PS : NetCdf capabilities already exist in Sage or Mathematica

reference :

Question:Quantile function
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.



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


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



{-1.999102417, .1352239093, 1.997971857}






Hi everybody.

I often regret that Maple 18 and further versions (maybe some others before ?) do not represent lengthy and complex outputs by introducing substitution expressions (i.e. %1, %2, ...) as Maple 5 or 8 did.

An exemple can be found in the Maple V release 5 programming Guide (p95, expression %1 = ...)

To be more precise I provide you the output Maple 2015 gives on the same problem treated in "Introduction to Maple, André Heck (1993) Springer Verlag" ; page 86 (no advertising here !).

The problem is about solving a polynomial system in 3 indeterminates.
One of the (set of) solutions is quite complex and looks like (I represent just the beginning of the complete solution) :

{x = %1, y = -1/8*(%1^6 + 15*%1^4 ...) / %1^4 , z = ...}
%1 := RootOf(....)  

From at least Maple 18 this same solution takes this form

{x =  RootOf(....), y = -1/8*( RootOf(....)^6 + 15* RootOf(....)^4 ...) / %1^4 , z = ...}

My question is very simple : Does it exist a way to tell Maple to act as Maple 5/8 did ?

Thanks in advance.

PS1 : I tried things like subs(RootOf(....)=freeze(RootOf(....)), sols) but it is not perfect because I dit this manually, by a copy of RootOf(....) from the output and a paste into the subs(....) input (shame on me !)

PS2 : I use to work in worksheet mode, not document mode, and I would prefer an answer adapted to the worksheet mode.



First 31 32 33 34 Page 33 of 34