HP 35S Programme to Produce 2 Normal Deviates

06112014, 04:07 PM
(This post was last modified: 06112014 04:13 PM by Gerald H.)
Post: #1




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. 

06142014, 02:34 PM
Post: #2




RE: HP 35S Programme to Produce 2 Normal Deviates
(06112014 04:07 PM)Gerald H Wrote: For no input the programme returns two normal deviates for average 0 and standard deviation 1Can 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/basiccompare.html 

06142014, 05:21 PM
(This post was last modified: 06142014 05:27 PM by Thomas Klemm.)
Post: #3




RE: HP 35S Programme to Produce 2 Normal Deviates
(06142014 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 

06142014, 10:43 PM
Post: #4




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)