weidade37211

110 Reputation

5 Badges

7 years, 10 days

MaplePrimes Activity


These are questions asked by weidade37211

Hi all, my maple will crash when calculating this sheet.. Any help here?
 

``

``

restart

``

Digits := 15

15

(1)

NULL

NULL

``

c := .95

.95

(2)

``

theta := .9

.9

(3)

k := 1

1

(4)

p_l := 10^(-15)

1/1000000000000000``

(5)

n := 10^10

10000000000

(6)

``

fsolve(c = p_l^k*(1-p_l)^(n-k)*theta/(p_l^k*(1-p_l)^(n-k)*theta+p^k*(1-p)^n*(1-theta)), p = 10^(-6), 1.09*10^(-10) .. .1)

``

``

``

NULL

``

``

``

``

``

``

``

``

``

``

``

``


 

Download test.mw

For a very simple sheet:

restart;

with(Statistics);

X := RandomVariable(Uniform(0, 1))

Sample(X, 2)

Maple always show: 0.8147236863931789, 0.9057919370756192 when I click the "execute the entire sheet." on the top.

While, if I only execute Sample(X, 2), then it seems generate random samples.

Why? is this because of the " Pseudo-random algorithm " built in Maple?

 

 

 

I am using the Jeffery's prior for Binomial models, i.e. a beta prior distribution of beta(0.5, 0.5).

If we see n failure free trails, it is easy to know the posterior distriution is beta(0.5, 0.5+n).

Now I want to solve (plot..actually) the required n for specifced posterior confidence level and a bound.

I am using maple sources code as in the picture. But it takes very long time to plot n, given c=0.95, p=10^(-10)..10^(-7). Any idea to speed up the plots? Thanks!

 

 

Dear All,

I have two beta distributed r.v. as:

p1 := RandomVariable(BetaDistribution(1, 100));

p2 := RandomVariable(BetaDistribution(1, 50));

my Maple stucks when i try to calculate numerically:

evalf(int(z*PDF(0.3*p1+0.7*p2, z), z = 0 .. 1))

Any help to speed this up or other solutions?

It seems PDF(0.3*p1+0.7*p2, z) is the pain.

Thanks!

 

 

Hi All,

I am ploting with the command of:

logplot([1-R(Pp, tp, tf, 'qN(Pp, tp, tf)'), 1/(1+1+tp), .5/(.5+.5+tp), (1-Pp)*Beta(2, 1+tp)/(Pp*Beta(1, 1)+(1-Pp)*Beta(1, 1+tp))], Pp = 0 .. 1, style = pointline, numpoints = 1, gridlines = true, symbolsize = 10, legend = ["Our worst-case prior with Pp", "Flat prior Beta (1,1)", "Jeffrey's prior Beta (0.5,0.5)", "Normalised flat prior Beta (1,1) with Pp"], labels = ["Pp", "Posterior expected pfd"], symbol = [asterisk, diagonalcross, box, circle], title = "Given fixed t_past=100")

and get:

 

which is ok but the legends are wrong. where are the symbols in the legends? Am I missing something....

 

1 2 3 4 5 6 Page 4 of 6