MrMarc

3163 Reputation

18 Badges

17 years, 131 days

MaplePrimes Activity


These are answers submitted by MrMarc

"like a labor economics problem"    You are absolutly correct :-)   It is an effort wage model

"which is my area by the way"     ohhh then I am lucky.

"for some constant a?"     a does not exist

"or does f also depend on w?"      f depends of w   f(e) = f( ((w-b)/b)^lambda)

"What is L? a constant or a function?"   L is a constat which I assume is simply 1

I will soon upload some charts so you can see...

It maybe should be said as well that the only thing we know about f(e) is that it is a quadratic equation with

a maximum at w= -b/(lambda-1)  where w is located on the x-axis

I think I will repeat what I said to Doug  "No not really but I do appreciate your input " :-)

I do NOT want to have all the output displayed in the end. I want the output (in this case A ) to be displayed continuously

with 2 seconds interval and if I choice to set x:=false during any point in such printing process then the printing should stop.

I guess what I want in your terminology is  "flow control back, while it ran,," .  I have been struggling with this for a long time

and I am starting to lose fait in Maple ability here....

No not really but I do appreciate your input  :-)   It should be something like this

x:=true;

A should be printed

wait 1 second

A should be printed

wait 1 second

A should be printed

etc etc until I call  

 

x:=false;

then nothing should be printed

 

Another thing. If you put the code in a button to update a MathContainer it does not work for some reason

with(DocumentTools):
with(Statistics):
randomize();

S := Shuffle([`$`(X, 63), cat(`#mn("`, X, `", mathcolor="red", fontweight="bold")`)]):

Do(%MathContainer0=S):
 

X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, `#mn("X", mathcolor="red", fontweight="bold")`, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X

I tried to represent the "drunk student" with a red X and the not drunk students with a black X's. However,  it seems to be impossible to get the red X to be included in a list together with the black X's:


[`$`(X, 20), print(cat(`#mn("`, X, `", mathcolor="red", fontweight="bold")`))];

                                                  X   (the red X )
        [X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X]   (the black X's )
 

 

I tried it and it is quite nice :-)   One thing though. I get two windows if I run the above code:

1) A Maple notepad window     2) The traditional notepad window.

If I simply type:

system[launch]("c:/windows/notepad.exe");    

Then I only get the notepad window which I want :-)
 

yes that is quite interesting :-)  "How much would you need to win in order to exit a repetitive M strategy?"

I am not sure there exist an answer to that question. It has to do with your risk preferences I assume?!

I guess you could have some rule ie as long as your expected value is + you stay in but I am not sure how that would work.

If we assume you bet 1 and that you start with an wealth of 20 000 so you can survive 13 sequential losses (an initial wealth of 16383 is sufficient but let say 20 000 for simplicity) then you will become bankrupt 1.2 times (sequence of 14 losses or more) if you play the random game 10,000 times

add(.5^i, i = 14 .. 20);
10000*%;
                               0.0001211166381
                                 1.211166381


These are pretty good odds !  Since half of them will be winnings you will at least make 5000 unless you are really unlucky then you will lose -20 000. Still pretty good odds :-)

I think it is called the Quantile function en.wikipedia.org/wiki/Quantile_function

For example:

restart:
with(Statistics):
plot(Quantile(Normal(0, 1), prob), prob = 0 .. 1, view = [0 .. 1, -4 .. 4], color = black, thickness = 4, labels = ["CP(x)", "x"], font = [times, roman, 14], title = ["Quantile Function"], font = [times, roman, 16]);
 

I agree it is a stupid non-feature! Everyone is complaining that MaplePrimes is slow .... I wonder why ?!

One way is to do like this:

restart:
with(plots):

dd := [seq([seq([i, j, min(i, j)], i = -5 .. 5)], j = -1 .. 5)];

Ap := Array(1 .. 2):

Ap[1] := surfdata(dd, axes = boxed):
Ap[2] := plot3d(min(x, y), x = 0 .. 20, y = 0 .. 20, axes = boxed, style = patchcontour):

display(Ap);
 

I am still not 100% comfortable with E(f(x)) = f(x)  ie the expected wealth at some point in time

is equal to the wealth in some point in time but heyeee life is not perfect !

also why do you get

(K*q)^(W/L) - K + p^(L/W) = 0

Again excellent stuff Joe !

It took me two hours just to read throuh the above text and make sure I really understand what is going on.

My brain is aching !  I think hell has a larger likelihood to freeze over than for me to come up with that stuff myself :-)

So again thank you !  However, I still dont understand why E(f(x)) = f(x) in the below equation:
 

E(f(x)) = p*f(x+W) + q*f(x-W) = f(x)


I mean I understand it if q=p=0.5 but not when q<>p  hummm.........
 

 

Also you said that:     "Note that if W <> L and the game is unfair, there is, I believe, no nice result."


There exist an alternative problem :      www.wilmott.com/messageview.cfm

which states that:

""Start at 0 on a number line, flip a fair coin, move +2 on heads and -1 on tails,
what is the probability that it will hit -1? (what if with biased coin, prob p for +1 and 1- for -1)
"

 

I think the solution is (sqrt(5)-1)/2 but again I am note sure.....?!

I am not sure Maple even have a simplex algorithm unless you want to program the gradient yourself or if

you want to buy the global optimization toolbox which is very expensive. But the Maximize function might work ?!

thanx Joe excellent stuff !   I knew that you would not let me down :-)

I understand that if Eroll= (20-hold)/6  then Eroll will remain + as long as hold<20

However I have some problem understanding why we have

Eroll = 1/6*( - hold + 2 + 3 ... + 6) 

I understand that 1/6 is simple the probability of the dice but why do we get - hold

The outcome is ( - hold + 2 + 3 ... + 6)

 

Another thing do you know the answer to this one:

Two gamblers A and B have initially 7 £ and 13 £.
Each time, they throw a coin: If stake, A give 1 £ to B, else B give 1 £ to A.
The game is finish only if A or B is ruined (the time is infinite).
What about the probability for A to win ?

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