## 4029 Reputation

6 years, 186 days

## Maybe an issue with the NegativeBinomial...

Maple 2015

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 ?

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

## How to split indexed names ?...

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 ?

## Are NetCdf files supported by Maple ?...

Maple 2016

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.

years

PS : NetCdf capabilities already exist in Sage or Mathematica

## Statistics:-Mode does not work properly...

Maple

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):
 (1)
 > plot(PDF(Z,t), t=-4..4);
 > Mode(Z);
 (2)
 >

## Is it possible to obtain "à la Maple 5" ...

Maple

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 ?