Items tagged with random random Tagged Items Feed

Loading random number ...

February 19 2014 smith_alpha 35

Hi, 

 

  I tried to use generated random as following

*** 

for j from 1 to 5 do
    c:=rand(0..1):
    d:=c();
    print(`random number`,c(),d);

    if c()=1 then

       print(`Y`)
    else
     print(`N`);
    end if;
  end do:

***

 

  The output is

 

****

                      random number, 1, 0

                               Y

                      random number, 1, 1

                               Y

                      random number, 1, 1

                               N

                      random number, 1, 1

                               N

                      random number, 0, 0

                               N

****

  Why the output numbers in one line are different? And Using "if" sentence seems do not correspond to the printed "c()" value..

 

Thank you very much in advance!

 

How to calculate c.d.f from probability mass function. Suppose that the pmf of a discrete random variable is given : f(x)=(2*x+1)/25, x=0,1,2,3,4

I have a set of 19 different items I need randomize, lets call them A-S. I tried the Random command, Random(19,A-S) listing all of the possiblities. I want each letter to be used once in that 19 times and using this way does not do that. Is there another command I can use to achieve this?

Suppose I broadcast a game show where every episode there is 5 randomly chosen topics from 8 possible topics (A,B,C….). how can I get maple to do this automatically?

 I thought I could use

  > with(combinat):

> choose([A,B,C,D,E,F,G,H], 5);

of course the output comes out ordered. is there some way to randomize it? or another way? rgds

If I put in the randomize(#) command with the same actual number each time before generating a sequence of random numbers,  I would expect to get the same sequence of results from repeated use of  

round( Generate(distribution(DiscreteUniform(5,10))) )

each time. Actually, I get completely different sequences of numbers.

This also happens with the alternative method of SetState in RandomTools

This is not only annoying...

I am trying to get Maple to calculate this for me:

Let X1,X2,...X81 be a random sample from a distsribution (not necessarily normal) with mean µ=49 and standard deviation σ =8. Let ¯X = (1/81)* ∑i=181 * Xi

I need to find the mean, the standard deviation and the approximate distribition of ‾X,

 

BTW, the 81 goes directly...

helpw#8.mw

Download helpw#8.mw

THis is what I have so far.. is there anyone who can help me with this?

Let f(x) = 1/9*x^2, o<x<c

Find c so that f(x) is the pdf of a random variable X.

I have come up with this and was wondering if I could get some help. I cant get it to paste in, but I have

uploaded the file.. Please assist if you can.

Twenty five observations of a random variable X are :130.8  129.9  131.5  131.2  129.5  132.2  133.7  127.8  131.5  132.7  134.8 131.7  133.9  129.8  131.4  132.8  132.7  128.8  130.6  131.1  133.8  130.5 131.4  131.3  129.5  //.. How do I construct a stem and leaf display using stems of 127, 128, 129, ... 134? I also need to find all quartiles.. Thank you to anyone...

Hello,

I am trying to get a shaded area in my plot but I could not.

First we solve ODE without randomness:

ode := diff(U(t), t) = -(A+B*U(t))*U(t);

Then we add randomness to ODE and solve:

ode2 := diff(U(t), t) = -(A+r(t)+B*U(t))*U(t);

A with randomness for r in R=( - 0.0001/365, 0.0001/365) is:

A(t,r)= A+r

Where A is constant =  0.0001/365

We plot both solution. For the plot I...

I want to model this game (I want an ensemble average and a time average)

50% chance you get head=win 50%
50% chance you get tails= lose 40%
Starting capital =100

First of all I need a very large binary matrix(1..100000,1..100000) however not
even that I can do fast enough in maple!

I tried:

rtable(1 .. 1000, 1 .. 2000, frandom(0 .. 1, .5), subtype = Array, datatype = float[8], fill = [0, 1])

it is somewhat fast but it does not do what I want ie binary ...

hey guys , my concern is about boundaries in random matrix or rtable. so, i can garantee that boundaries in  matrices are in 0 and 10, but i can´t impose a restriction  like the sum of row must be equal 10 for example.
help !! 

pop:=(10-0)*ArrayTools:-RandomArray(proc(A)
local i
if A::rtable[row] then 
seq(A(i),i=1..NumElems(A));
else
args
end if 
end proc(10,3))+0; 

can i distrubute some random particle with an arbitrarity function in maple, for example p(r,theta,phi)=p0*sin(theta)/r, 0.01<r<1, 0< theta<pi, 0<phi< 2*pi. For such distribution we expect many particle in equator.

many thanks

I have been using random numbers in other applications than Maple. Usually there is a function, which will give a pseudo random real number between 0 and 1. When I looked for it in Maple I got quite confused, because there are a lot of different options here - obviously because Maple can deliver random numbers/objects in many ways, even following a certain distrubution. I found out it doesn't work by just using rand(), since it is always starting with the same value. Then I found the command randomize(...

Using Maple for Functions of a Random Variable

 

How to make a query is made to F (t) at each iteration of the dsolve command?...

restart;
de:=m*diff(x(t),t$2)+b(t)*diff(x(t),t)+k*x(t)=F(t);                 
a random force :
nd := Statistics:-Sample(Uniform(-100, 100)):
F:=proc(t) ;   
if not type(evalf(t),'numeric') then      

1 2 3 4 Page 1 of 4