vv

13922 Reputation

20 Badges

10 years, 10 days

MaplePrimes Activity


These are replies submitted by vv

@Markiyan Hirnyk 

The typo is obvious and the line was shown.

Conditioned:= proc(
   event::{relation, set(relation)},
   cond::{relation, set(relation)}, 
   rv::
      {name= RandomVariable &under Statistics:-RandomVariable,
       {set,list}(name= RandomVariable &under Statistics:-RandomVariable)
      }
) 
uses St= Statistics;
local 
   Event:= `if`(not event::set, {event}, event),
   #Cond:= `if`(not cond::set, {cond}, event),   #typo
   Cond:= `if`(not cond::set, {cond}, cond), 
   RV:= `if`(not rv::{set,list}, [rv], [rv[]]) 
;
   if nargs=3 then 
      (Event,Cond):= 
         subs(lhs~(RV)=~ St:-RandomVariable~(rhs~(RV)), [Event, Cond])[]
   fi;
   #union used rather than intersection because Probability considers a set
   #of relations the represent the intersection of the corresponding events. 
   St:-Probability(Event union Cond)/St:-Probability(Cond)
end proc:

Conditioned({2*X+4*Y <= 1}, {4*X+2*Y <= 1}, {X = Uniform(0, 1), Y = Uniform(0, 1)});

      FAIL

@Markiyan Hirnyk 

After correcting the mentioned typo it will return FAIL.
P.S. If Probability works for not necessarily independent vars, then Conditioned would be ok.

@Markiyan Hirnyk 

Probability cannot compute
Probability({X+Y<=2,X+Y>=1});

An easy example which can be computed geometrically at once is

Conditioned({2*X+4*Y <= 1}, {4*X+2*Y <= 1}, {X = Uniform(0, 1), Y = Uniform(0, 1)});

the result should be 2/3.

Edit. It seems that in Probability({...})  the set of all random variables must be independent.
Note that {X,Y} are independent but {X+Y, X-Y} are not.
(X+Y is a random variable even if it is not a "variable" in the Maple sense).

 

@Carl Love 

You have a typo in

Cond:= `if`(not cond::set, {cond}, event),

And indeed, Probability cannot compute

Probability({X^2+Y<=2,X+Y>=1}); #FAIL

A workaround would be to compute the double integral directy. Or wait for a more capable Probability.

 

@shakuntala 

filename contains the name of the temporary file. It must be in any directory with write permission.
Unfortunately I am not sure whether exportplot and plot/background is available in Maple 15. If not, you will have to see the links to older posts Acer has provided above. 

You use strangely the "dimension".
The 1st solve gives a 1-dimensional (linear) subspace in R^3  (or C^3 if a,b,c are considered in C) i.e. a straight line thru 0.

The 2nd solve gives the union of two such 1-dimensional (linear) subspaces; the topological dimension of the union is still 1.

@Preben Alsholm 

So, evalf prevents the evaluation of the first argument, just like
evalf := proc(x::uneval) ... end proc;

to generate polynomials with real roots would be to construct orthogonal polynomials wrt a (random) measure.
This way you can prescribe an interval containing the roots.

@Preben Alsholm 

It is very nice that Maple was able to compute the limit, but I am not at all sure that limits such as

limit( RootOf( f(x,y,_Z) ), y=1 );

are to be trusted mathematically, without a serious analysis.

 

@Carl Love 

But it's OK. I truly like your style.

@Carl Love 

You are (as always) a perfectionist :-)
 

@Preben Alsholm 

The typsetting mechanism is supposed to be used for display purposes. Now it seems to be very intrusive and alters also the results!

@vv 

I must add that  evalf[10](frac(Pi^20)) = 23  is not technically a bug. It's, let's say, a "psychological bug" because nobody expects frac(...) be >= 1. This happens because `evalf/frac` is not implemented and the number of Digits is only 10; note that frac(Pi^20) returns (correctly) Pi^20-8769956796.
Maple's evalf is reliable if used correctly!

@Christopher2222 

Just set the rankings  to -infinity (or better, some very large <0)  rather than 0.
This should probably solve the problem; however, when two such countries with negative ratings play each other, one of them must win.
 

@Markiyan Hirnyk 

It's easy to elucidate your doubts: open the implicitplot help page in a worksheet window, insert trace(fsolve)  and execute all.

First 86 87 88 89 90 91 92 Last Page 88 of 176