MrMarc

3163 Reputation

18 Badges

17 years, 131 days

MaplePrimes Activity


These are answers submitted by MrMarc

I came across one answer

www.jaapspies.nl/mathfiles/problem2005-2A.pdf

that states that:

In the end ’success’ and ’failure’ are completely symmetric in this story. In all
possible stages of the process success and failure have the same probability, so
the probability the last student will be seated on the last chair is 1/2.


This could probably be proven though simulation in Maple right ?

I would assume it would be something like:

restart:

ob := x*y*z+x^2+y^3+z^4:

con1 := x^2+y^2+2*z^2-4:    con2 := 3*y*z+2*x*z+x*y-6:


LL := ob+lambda1*con1+lambda2*con2:


x1 := diff(LL, x) = 0:    x2 := diff(LL, y) = 0:    x3 := diff(LL, z) = 0:   

x4 := diff(LL, lambda1) = 0:    x5 := diff(LL, lambda2) = 0:   


sol := evalf(solve({x1, x2, x3, x4, x5}, {x, y, z, lambda1, lambda2}), 5);


eval(ob, sol[1]);

eval(ob, sol[2]);
 

Let see if I got this correct.....


The probability that an observation will fall inside two standard deviations from the mean is given by:

> with(Statistics);
> pin := evalf(eval(CDF(Normal(0, 1), x), x = 0+2*1)-(eval(CDF(Normal(0, 1), x), x = 0-2*1)), 4);
                                pin := 0.9545


The probability that an observation will fall outside a specified volatility range is given by:

> pout := 1-pin;
                               pout := 0.0455


The probability that two sequential random variables will fall inside a specified volatility range is given by:

> pin^2;
                                 0.91107025


The probability that two sequential random variables will fall outside a specified volatility range is given by:

> pout^2;

                                 0.00207025


Probability of sucess given that we bet that that the second random variables will fall inside the range given that the first

random variable fell outside the range is given by:

> 1-pout^2;
                                 0.99792975
 

all right I think I know how to do it now :-)

L := [1, 2, 3, 4, 5, 6, 7, 8, 9, -5, -.2]:
seq(`if`(L[i] < 0, i, NULL), i = 1 .. nops(L));

                                   10, 11

or as follows:

L := [1, 2, 3, 4, 5, 6, 7, 8, 9, -5, -.2]:
X := proc (L) seq(`if`(L[i] < 0, i, NULL), i = 1 .. nops(L)) end proc:
X(L);

                                   10, 11


 
 

Yes, that sound very interesting however I would probably need some more mathematically arguments in order to be able 

to build a model around such a phenomenon or ?!

restart:
with(LinearAlgebra):
A := Matrix([[a, b, c], [d, e, f], [g, h, i]]);
B := DeleteColumn(A, 1);
 

ok, now we are talking.  Could you please show how this could be done in Maple ?!

 

There really should be a predefined and simple procedure for that in Maple for example

MatrixPrint( Column1, Column2, Column3, labels=["A", "AA", "AAA"]

The current Maple command :  

for i to 10 do printf("\t%d\t%2d\t%3d\t%4d\t%5d\t%6d\ \n", i^1, i^2, i^3, i^4, i^5, i^6) end do;

In my opinion is too complicated  ///*&..;;££%%%>>\\££""    what langauge is that ?! Greek ?

thanx for your input. I tried some of your suggestions but I still cant get it to work. For example:

 

Test-1


Maximize(X, 0 .. 1, 0 .. 1, initialpoint = [.1, .5]);

Warning, no iterations performed as initial point satisfies first-order conditions

 

Test-2

con := [a <= 1, a >= 0, b <= 1, b >= 0];  Maximize(('X')(a, b), con);

Error, (in Optimization:-NLPSolve) complex value encountered

 

Test-3
 

  if not( type(a,numeric) and type(b,numeric) ) then
    return 'procname'(args);
  end if;

The same errors as above

Wolfram Mathematica has a nice command:    FindGeneratingFunction[{1, 1, 2, 3, 5, 8, 13}, x]

1/(1 - x - x^2)

I tried your sequence FindGeneratingFunction[{1, 3, 240, 840, 80640, 887040}, x] but it did not return anything.

I wonder if Maple have a similar command ?!

you can also use an Array for example


Array([seq(i, i = 1 .. 10)])-10;

                   [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0]
 


my := proc (n::posint) global t;
t := [n, n-1, n-2]
end proc:

my(5);
t;
                                  [5, 4, 3]
                                  [5, 4, 3]

 

Scenario-1

1) Copy some math 2D Input maplet code and past it into a new maple document (document mode without an > prompt).

    The maplet code should be in a big dashed box.

2) Do not execute the code and select file -> Export As -> Maplet and save it on the desktop.

3) Click on the file on the desktop. The maplet will not launch.

 

Scenario-2

1) Copy some math 2D Input maplet code and past it into a new maple document (worksheet mode with an > prompt).

2) Do not execute the code and select file -> Export As -> Maplet and save it on the desktop.

3) Click on the file on the desktop. The maplet will launch.

 

Scenario-3

1) Copy some math 2D Input maplet code and past it into a new maple document (document mode without an > prompt).

    The maplet code should be in a big dashed box.

2) Execute the code one time and close the maplet.

3) Select file -> Export As -> Maplet and save it on the desktop.

4) Click on the file on the desktop. The maplet will launch.

You have understood it 100 % correctly. However let me expand on my initial claim.

I noted that if you have a worksheet without > then you need to run the Maplet code one time in the worksheet prior to exporting it.

If you have a worksheet with >  then you don't need to run the Maplet code one time in the worksheet prior to exporting it.

 

If I simply copy and past some maplet code in a new document (without >) and simply

export it as a maplet to the desktop then when I click on the file the mapletviewer will not launch.
 

However if I run the maplet code one time in the worksheet (without >) or if I copy and past some

maplet code in a new document with an > then I can simply export the maplet to the desktop and

the mapletviewer will launch when I click on the file  :-)

Doug,

I noticed that an "execution group" in the form of  > seems to be critical when exporting a Maplet.

I tried to export a Maplet in only 2D Math (with no >) but when you click on the file (to launch the Maplet viewer) it wont start.

Then tried the same thing but I pasted the code into a row with an "execution group" in the form of  > then

everything works fine......hummmmm
 

First 7 8 9 10 11 12 13 Last Page 9 of 24