sand15

765 Reputation

11 Badges

10 years, 218 days

MaplePrimes Activity


These are replies submitted by sand15

Point 1:
There exist two definitions of the Geometric distribution

  1. [def 1]  "N-1 failures followed by a success"
  2. [def 2]  "N failures followed by a success".

With p (probability of success) equal to 1/3 :

  1. [def 1]  gives (2/3)^4 * (1/3) = 16 / 729
  2. [def 2] gives (2/3)^5 * (1/3) = (32 / 729) * (1/3)

Redardless to the definition, the result "(32 / 729)" seems wrong.
But the result is not 0 neither

Point 2:
As you said, the value of the argument "N" must be an integer : a correct implementation should return an error if the number N of failures is not a POSITIVE INTEGER.
I thing you put your finger on the issue I am often railing against : Maple does not implement discrete distributions in a rigourous way and works on floationg points instead on integers.

@Carl Love 
Hi Carl,

Why did you not suggest to use  Statistics:-Sample(Uniform(-r, r), N) ?
Is it due to a reason of efficiency ?
Maybe RandomTools:-Generate is "lighter" than Statistics:-Sample in terms of memory size ?

Thank you for your answer

@Carl Love 

These double quotes is really a thing I do not master.

Thank you a lot
 

@Carl Love 

Thanks for this very clear position of yours.

My "should I suppress ?" question was motivated by the fact that the pseudo-solution I found looked more to tinkerink than to serious job.
The thing that bothered me in "suppressing"  was that someone (you) had already taken the trouble to make a response : obviously It would have been unsmart to delete the question without refering to you.
Thus my "I propose to suppress myself my question"  was an implicit request for your position.

Your answer is perfectly clear, the question will remain.

Thanks for this interesting exchange

@Carl Love 

Thanks Carl.

Probably I expressed myself poorly : I know that ?dsolve,numeric opens an help page where I can read the name of all the methods, but what  I was asking for was "does it exist a variable of type list (for instance), somewhere in the MAPLE librairies, which conains all these names and that I could retrieuse ?
Otherwise I have to construct this list manually (ok this one is not too long).
But look to the options of the methods (rkf45 has 27 options for example).



In fact I was coming back on Mapleprimes to suppress this question for I have found some tricks to retrieve the desired informations
For instance :  dsolve(..., numeric, method = bob)
returns an error messsage which contains the list of all the known methods : it is then a very simple thing to copy/paste this message in any text file and keep only the list of the names.
Likewise dsolve(..., numeric, method = rkf45, alice=bob) returns an error message which contains the list of all the avaliable options of method rkf45.
After some tens of minutes I had recovered all the informations I was looking for.

Concerning the dsolve[interactive]() pane it was a little bit longer, but the maplet builder assistant helped me a lot.


I propose to suppress myself my question , is it a common practice here ?


Sorry for the inconvenience

@Carl Love Thanks for those precisions

@tomleslie 
@Carl Love

I spoke too quickly : if G is a directed graph, DrawGraph(G, style=planar) returns an error in Maple 2016 ... excepted in very simple cases

DrawGraph(Graph({[a, b], [b,c], [c, a]}), style=planar)          #works
DrawGraph(Graph({[a, x], [a,y], [b,x], [b,y]}), style=planar)  #does not work

In the few textbooks about graph theory I read, I did not found any specification that planarity is restricted to undirected graphs only.
But I am not sure of that ???

@tomleslie 
@Carl Love 

I finally succedeed in solving my problem.
The key idea (this is the mountain of the title) is to add a dimension to the polygons in order to generate a 3D plot (I use nox PLOT3D(....) instead of PLOT) and to oriente the drawing to obtain the desired flat representation.

As Carl wrote,PLOT places CURVES in front of POLYGONS, but PLOT3D is less strict (there is also a STYLE(HIDDEN) option that authorizes some variants)


Whilst waiting for a simpler solution I should nevertheless like to thank you for your comments



AUXILIARY QUESTION :
In Maple 2015.2 DrawGraph(G, style=planar) returns an error if G is a directed graph.
I just checked the same command performs well in Maple 2016 : was it an error in Maple 2015.2 or is it an evolution of Maple 2016 ?

@Carl Love 

I am now at the office (sand15athome) and I  just see some errors in my previous response (I wrote it in a hurry).
I apologize for this and send you something fairer

____________________________________________________________________________________

Thank you Carl.
I suspected Maple used some ranking based on the dimension (point, line, surface) of the structures to plot.
But I had some hope that a bypass could exist.
The reason is :

1 : DrawGraph displays edges only "outside" the rectangles that represent the vertices of the graph

2 : plottools:-getdata(DrawGraph(...)) returns a list of polygons where some correspond to edges from a point A to a point B while others are rectangles centered at points A and B.
So, "materially", the edges are really from A to B but they are hidden by theses rectangles ... so I suspected those last where placed in the foreground. ... hence my question

@Carl Love 

@Kitonum

@taro 

It has been a delight for me to read you discussion.
I believe I have naw a better understanding in "command1~", "map" and "`command1/command2`~"  roles.

Thank you all

 

@Kitonum  I thought naively that the two forms were equivalent.

Is it true that I use to write things like convert~(L, string) but I saw, somewhere in the many answers on Mapleprimes, that some guys sometimes write things like `command1/command2`~(...) instead of (and here I'm probably wrong) command1~(..., command2)

Probably I shouldn't try to be innovative when I do not master the things

Thanks again

@Carl Love  is a very interesting feature ! Great thanks for the trick

@Carl Love   ... but I have to confess I use it rarely for readability concerns.
The same holds for the tilde operator where I prefer to use the "map" function.

Thank you for your contribution

 

@acer  I thank you for your extensive answer.

Generally I use the "||" constructor but, in the present case, I wanted a nice render of the equations, so th "__" constructor.
I never imagined myself to combine the two as you do at the end of your answer.


If it is not much to ask I would like to know what is the best way to proceed in this situation :

Suppose you define the pressure p of a gaz by the EOS : p = K*v-n  where n is the polytropic index and K some suitable constant.
For some situations n is defined by the ratio cp/cv of the heat capacities at constant pressure (cp) and volume (cv).

In Physics textbooks it is common to write relations such that
p = K*v-n
n =  cp/cv

but if I do this in Maple, cp is evaluated as c with a subscript equal to  K*v-n (which is perfectly normal)
To preserve the physical representation I used to write

p := K*v-n
n :=  c__p/c__v  # to avoid evaluation of p

Is it a safe method to procced ?
Does it exist a better alternative ?

Thanks in advance ... and than you again for your previous answer

 

@Carl Love 

 

Mathematically speaking :

(FR) la fonction "sécante" est définie comme étant la fonction réciproque de la fonction "cosinus" ...

(FR -> EN) the function "secant" is defined as the reciprocal function of function "cosine" ...

 

So there is absolutely no doubt that the correct translation of reciprocal is réciproque


But, in day-to-day language, even among people who share mathematical background and use to using mathematics in their activities (excluding teachers and professors), it is very common to use the french word inverse (inverse in english) to refer to the reciprocal function.

This is very likely that this abuse of terms is related to the notation F-1 for the reciprocal of the function F.
Thus it is not unusual to hear that "the secant is the inverse function of the cosine function" (if it is not "the secant is the inverse of the cosine")

First 19 20 21 22 23 24 Page 21 of 24