HP 35S Programme to Produce 2 Normal Deviates
06-11-2014, 04:07 PM (This post was last modified: 06-11-2014 04:13 PM by Gerald H.)
Post: #1
 Gerald H Senior Member Posts: 1,412 Joined: May 2014
HP 35S Programme to Produce 2 Normal Deviates
For no input the programme returns two normal deviates for average 0 and standard deviation 1:

1 LBL T
2 XEQ T021
3 x<>y
4 XEQ T021
5 R↑
6 +
7 1
8 x<=y?
9 GTO T002
10 R↓
11 ENTER
12 LN
13 x<>y
14 ÷
15 -2
16 *
17 SQRTx
18 REGZ*REGX
19 REGZ*REGY
20 RTN
21 RANDOM
22 2
23 *
24 1
25 -
26 ENTER
27 x^2
28 RTN

Edit: Sorry, this should be in General Software.
06-14-2014, 02:34 PM
Post: #2
 Marcus von Cube Senior Member Posts: 754 Joined: Dec 2013
RE: HP 35S Programme to Produce 2 Normal Deviates
(06-11-2014 04:07 PM)Gerald H Wrote:  For no input the programme returns two normal deviates for average 0 and standard deviation 1
Can you explain in a few words what this is and the formula you're using. I tried to follow the Wikipedia Article but I'm a bit lost.

Marcus von Cube
Wehrheim, Germany
http://www.mvcsys.de
http://wp34s.sf.net
http://mvcsys.de/doc/basic-compare.html
06-14-2014, 05:21 PM (This post was last modified: 06-14-2014 05:27 PM by Thomas Klemm.)
Post: #3
 Thomas Klemm Senior Member Posts: 1,448 Joined: Dec 2013
RE: HP 35S Programme to Produce 2 Normal Deviates
(06-14-2014 02:34 PM)Marcus von Cube Wrote:  Can you explain in a few words what this is and the formula you're using.

cf. Box–Muller transform (polar form)

Cheers
Thomas
06-14-2014, 10:43 PM
Post: #4
 Paul Dale Senior Member Posts: 1,492 Joined: Dec 2013
RE: HP 35S Programme to Produce 2 Normal Deviates
This is quite an amazing result -- take two independent uniform samples, apply a transform to the pair and get two independent normal samples. The fact that independence is maintained is the real surprise.

- Pauli
 « Next Oldest | Next Newest »

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