Post Reply 
An unexpected result involving sums of random numbers
03-01-2023, 03:54 AM
Post: #5
RE: An unexpected result involving sums of random numbers
(02-28-2023 11:08 PM)Namir Wrote:  The answer is a squewed distribution (Gauss, or Poisson, or something else?).

Hi, Namir,

Perhaps my phrasing was not so clear. Let’s do an example by hand on the HP-15C, step by step:

0 STO RAN#; start the sequence of random numbers with zero

1)
f RAN# -> 0.1018
f RAN# -> 0.7365
+ -> 0.8383 ; sum < 1, go on:
f RAN# -> 0.3248
+ -> 1.1631 ; sum >= 1 obtained with 3 random numbers.

2)
f RAN# -> 0.3485
f RAN# -> 0.8685
+ -> 1.2171 ; sum >= 1 obtained with 2 random numbers.

3)
f RAN# -> 0.2789
f RAN# -> 0.3615
+ -> 0.6404 ; sum < 1, go on:
f RAN# -> 0.1074
+ -> 0.7448 ; sum still < 1, go on:
f RAN# -> 0.2629
+ -> 1.0106 ; sum >= 1 obtained with 4 random numbers.

4)
f RAN# -> 0.9252
f RAN# -> 0.5599
+ -> 1.4851 ; sum >= 1 obtained with 2 random numbers.

Average: (3 + 2 + 4 + 2)/4 = 2.75

That’s exactly what we get when running the program:

0 STO RAN# 4 f A -> 2.7500

The result, 2.75, is close to the constant we’re looking for.

I thought of providing an HP-41C program, but then I remembered it lacks a random number generator.

Gerson.
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 - Gerson W. Barbosa - 03-01-2023 03:54 AM



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