wenny

20 Reputation

2 Badges

7 years, 347 days

MaplePrimes Activity


These are questions asked by wenny

Here is my code

ma[1] := [-885.880598855072776, [bh = 0., g0h = 0., g1h = 0.825946224722250e-4]]

ma[2] := [-877.957885609114328, [bh = 347.116836805625, g0h = 0., g1h = 0.164861392564e-3]]

ma[3] := [-863.445203144006655, [bh = 0., g0h = 0., g1h = 0.787090377403668e-4]]

avb := 90.5276611129000; avg0 := 0; avg1 := 0.92225359e-4;

for j from 1 to 3 do

assign(ma[j][2]);

A[j] := [(avb-bh)^2, (avg0-g0h)^2, (avg1-g1h)^2] 

end do;

 

Result is that

A[1] := [4763.19965962732, 0., 1.13103562500664*10^(-10)]

Error, invalid left hand side in assignment

 it only shows A[1], but no A[2] and A[3]

Please help!

Here is my code

ma[1] := [-885.880598855072776, [bh = 0., g0h = 0., g1h = 0.825946224722250e-4]]

ma[2] := [-877.957885609114328, [bh = 347.116836805625, g0h = 0., g1h = 0.164861392564e-3]]

ma[3] := [-863.445203144006655, [bh = 0., g0h = 0., g1h = 0.787090377403668e-4]]

aver := [bh = 121.477814540743, g0h = 0.249071340242633e-5, g1h = 0.110740782334817e-3]

when i did

add((aver[1]-ma[j][2][1])^2, j = 1 .. 3)

it shows some error...

how to solve this problem??

 

Hello

I am trying to do a do loop

X[1] := Statistics:-Sample(Binomial(200, .5), 1);

for i to 10 do X[i+1] := Statistics:-Sample(Binomial(200-X[i], .5), 1) end do;

And it shows error like this

Error, (in rtable/Sum) invalid arguments.

Did I do something wrong in my code?

How to simulate a data which is follow by binomial distribution, n=200, p=0.9.

I know normal can be simulated by following code

random[normald[0, 1]](50)

How can I do if I wanted to simulate a class of 30 students rolling a dice 10 times, and you wished to count the number of 3's you observe for each student?

1 2 Page 1 of 2