Post Reply 
An unexpected result involving sums of random numbers
03-12-2023, 02:09 AM (This post was last modified: 03-12-2023 02:09 AM by Eddie W. Shore.)
Post: #29
RE: An unexpected result involving sums of random numbers
Modifying Gerson's program on the Swiss Micros DM42:
Code:

00 {57-Byte Prgm}
01 LBL "CTRND"
02 DATE
03 TIME 
04 +
05 SEED
06 RAN
07 1E4
08 ×
09 IP
10 STO 00
11 0
12 STO 01
13 SIGN
14 LBL 00
15 RAN
16 LBL 01
17 X<>Y
18 STO+ 01
19 X<>Y
20 RAN
21 +
22 X<Y?
23 GTO 01
24 R↓
25 DSE ST Y
26 GTO 00
27 RCL 01
48 RCL+ 00
29 RCL÷ 00
30 END

The program starts with assigning a seed of (Time Code + Date Code) as the seed and a random integer up to 10,000 as X. At first the average of the results seem to conjugate towards e, but the trials, it appears the limit may be a different constant:

n = 30
Mean = 2.71830158802 (about 2E-5 from e)
St.Dev = 0.0235108873611

n = 42
Mean = 2.71845315567 (about 1.17E-4 from e)
St.Dev = 0.0201541663394

n = 54
Mean = 2.71967147586 (about 1.38E-3 from e)
St.Dev = 0.019176372560

The samples were taken on March 11, 2023 around 5:30 PM to 5:45 PM (1730 to 1745) Pacific Standard Time.
Visit this user's website 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 - Eddie W. Shore - 03-12-2023 02:09 AM



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