HP Forums

Full Version: HP 35S Programme to Produce 2 Normal Deviates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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-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.
(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
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
Reference URL's