Post Reply 
An unexpected result involving sums of random numbers
03-02-2023, 10:02 PM
Post: #16
RE: An unexpected result involving sums of random numbers
On HP50G, after a loop of 100 000,
I get an average of 2.80983 for "sum > 1"
and 2.58946 for "sum >= 1"
with seed (RDZ) =1.

And, after a loop of 1000 000,
I get an average of 2.80983 for "sum > 1"
and 2.590195 for "sum >= 1" for "sum >= 1"
with seed (RDZ) =1.

It does not seem to converge to e, or very, very slowly.

The program is the following:

\<< TIME 0. 'N' STO 1. RDZ 1. 1000000.
START 0. 'S' STO
WHILE S 1. \<=
REPEAT RAND 1. RND 'S' STO+ 1. 'N' STO+
END
NEXT N 1000000. / TIME ROT HMS-
\>>
Is it normal?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: An unexpected result involving sums of random numbers - Gil - 03-02-2023 10:02 PM



User(s) browsing this thread: 6 Guest(s)