[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread Dima Pasechnik
On 2012-10-21, LFS wrote: > --=_Part_1134_6290611.1350821044307 > Content-Type: text/plain; charset=ISO-8859-1 > > yes - i finally saw that and took the call to the GDDinit out of the loop > and this may be working, but I don't know how to explain this to the > kiddies. Just tell them the t

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Oh I agree Dave for several reasons (not least of all that Excel is not free, nor is it math based). However I have to admit that I have not been happy with any non-Excel program for just "teaching" probability and statistics. Too complicated and the kiddies will give up. It took me 4 days to ge

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
On 21 October 2012 13:04, LFS wrote: > yes - i finally saw that and took the call to the GDDinit out of the loop > and this may be working, but I don't know how to explain this to the > kiddies. > Probably should have just stuck with Excel where I understand the > generators. Too complicated by fa

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
yes - i finally saw that and took the call to the GDDinit out of the loop and this may be working, but I don't know how to explain this to the kiddies. Probably should have just stuck with Excel where I understand the generators. Too complicated by far. Thanks everyone for your help. On Sunday

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread Dima Pasechnik
On 2012-10-21, LFS wrote: > --=_Part_87_6472836.1350820122321 > Content-Type: text/plain; charset=ISO-8859-1 > > Actually Dmitrii with this change it is giving me exactly the same > empirical data each time! well, I just gave you a general framework for initializing and using a pseudo-random

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
I am not sure, but your image looks like the bottom histogram, which is the normal distribution. The middle histogram is from the empirical data. Linda -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-s

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Actually Dmitrii with this change it is giving me exactly the same empirical data each time! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe from this group, sen

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Done. Thanks On Sunday, 21 October 2012 13:35:02 UTC+2, Dima Pasechnik wrote: > > On 2012-10-21, LFS > wrote: > > --=_Part_2721_6851258.1350818261101 > > Content-Type: text/plain; charset=ISO-8859-1 > > > > Thanks Dave - If I have a moment I will try the scatter plot method to > > check.

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread Dima Pasechnik
On 2012-10-21, LFS wrote: > --=_Part_2721_6851258.1350818261101 > Content-Type: text/plain; charset=ISO-8859-1 > > Thanks Dave - If I have a moment I will try the scatter plot method to > check. That seems like a useful idea for student. > (This was just for a class lesson on testing the CLT

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Sorry Dmitrii to continually be typing your name wrong (using the Macedonian spelling where I live :)). Linda -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.com. To unsubscribe fro

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Yes - I think Dimitri's solution is working! (I changed the published file to his algorithm and upped the number of sets ns for the CLT and I also seem to be now be getting good empirical data.) Thank-you all! Linda -- You received this message because you are subscribed to the Google Groups

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread P Purkayastha
On 10/21/2012 06:30 PM, LFS wrote: Hiya Dmitrii Thanks so much for your quick reply, but I am still getting the same problem. I go to excel and use a RandBetween[1,1000] and just sort them according to my probability and all is good, i.e. the histogram of the expected values is "norm

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread Dima Pasechnik
On 2012-10-21, David Kirkby wrote: > On 21 October 2012 12:03, LFS wrote: >> Hiya Dave, >> What would the line of code look like to reseed it with the epoch thing each >> time I call it? >> Thanks so much, >> >> Linda > > > http://www.sagemath.org/doc/reference/sage/misc/randstate.html > > says >

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Thanks Dave - If I have a moment I will try the scatter plot method to check. That seems like a useful idea for student. (This was just for a class lesson on testing the CLT and I am way over my time allotment :)) Thanks to both you and Dimitri for feedback! Linda -- You received this message b

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
On 21 October 2012 12:03, LFS wrote: > Hiya Dave, > What would the line of code look like to reseed it with the epoch thing each > time I call it? > Thanks so much, > > Linda http://www.sagemath.org/doc/reference/sage/misc/randstate.html says If set_random_seed() is called with no arguments, t

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
On 21 October 2012 12:03, LFS wrote: > Hiya Dave, > What would the line of code look like to reseed it with the epoch thing each > time I call it? > Thanks so much, > > Linda The truth is I don't know off hand. I've spent a lot of time porting Sage to Solaris, but have not used it much at all. I'

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
One simple way to get a qualitative feel for the quality of random numbers is to take them two at a tim, staring with the first two being x1, y1. So you gererate: x1, y1 x2, y2 x3, y3 etc then plot a graph of x,y for all parts xn, yn The graph should look like a scatter graph, with no obvious pa

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Hiya Dave, What would the line of code look like to reseed it with the epoch thing each time I call it? Thanks so much, Linda > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to sage-support@googlegroups.c

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
On 21 October 2012 11:42, LFS wrote: > Hiya Dimitri, It might actually be working. Not sure, but when I increased > the number of sets ns, it does looks better. Still alot of repeats, but the > histogram looks better. Linda If there is a number of repeats, something is defnitely wrong. It should

Re: [sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread David Kirkby
On 21 October 2012 11:30, LFS wrote: > Hiya Dmitrii > Thanks so much for your quick reply, but I am still getting the same > problem. I don't know if this the best way in Sage, but it is common practice to seed the random number generator from the number of seconds since the Epoch (1/1/1970). So

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Hiya Dimitri, It might actually be working. Not sure, but when I increased the number of sets ns, it does looks better. Still alot of repeats, but the histogram looks better. Linda On Sunday, 21 October 2012 12:30:13 UTC+2, LFS wrote: > > Hiya Dmitrii > Thanks so much for your quick reply, but I

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread LFS
Hiya Dmitrii Thanks so much for your quick reply, but I am still getting the same problem. > I go to excel and use a RandBetween[1,1000] and just sort them according > to my probability and all is good, i.e. the histogram of the expected > values is "normally distributed". > Here I keep getti

[sage-support] Re: Why don't I get random numbers?

2012-10-21 Thread Dima Pasechnik
On 2012-10-21, LFS wrote: > --=_Part_948_19630829.1350808455726 > Content-Type: text/plain; charset=ISO-8859-1 > > Hiya guys! > I have a function: > def GDD(num,P): > D=GeneralDiscreteDistribution(P) > D.reset_distribution() > L=[D.get_random_element() for _ in range(num)] > re