HP 42s Program Normal Distibution
|
10-18-2024, 06:51 AM
(This post was last modified: 10-18-2024 08:09 AM by Thomas Klemm.)
Post: #2
|
|||
|
|||
RE: HP 42s Program Normal Distibution
(10-17-2024 05:06 AM)cylurian Wrote: (…) but it didn’t work on my DM42. That is not very specific. Describe what you did and what the result was. (10-17-2024 05:06 AM)cylurian Wrote: I’m looking for a program that can calculate both a lower and upper bound simultaneously, rather than the old approach we used in the 80s where it was just left tail or right tail. The pdf of the normal distribution is: \( pdf(x)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2} \) This is the corresponding program for the HP-42S: Code: 00 { 34-Byte Prgm } We can then use ∫f(x) to integrate it. Initialization Store \(\mu\) and \(\sigma\) in registers "μ" and "s". Example \(\mu=0\) \(\sigma=1\) \(\int_1^2 pdf(x) \;\mathrm{d}x\) FIX 06 0 STO "μ" 1 STO "s" ∫f(x) Select ∫f(x) Program Set Vars; Select ∫var x LLIM=1.000000 ULIM=2.000000 ACC=0.000001 ∫=0.135905 This can then be used in a program to calculate the normal distribution: Code: 00 { 26-Byte Prgm } Example 1 ENTER 2 XEQ "N" 0.135905 |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP 42s Program Normal Distibution - cylurian - 10-17-2024, 05:06 AM
RE: HP 42s Program Normal Distibution - Thomas Klemm - 10-18-2024 06:51 AM
RE: HP 42s Program Normal Distibution - cylurian - 10-21-2024, 09:41 PM
RE: HP 42s Program Normal Distibution - Thomas Klemm - 10-21-2024, 10:36 PM
RE: HP 42s Program Normal Distibution - cylurian - 10-22-2024, 05:04 AM
RE: HP 42s Program Normal Distibution - Thomas Klemm - 10-22-2024, 05:58 AM
RE: HP 42s Program Normal Distibution - Thomas Klemm - 10-22-2024, 06:44 AM
RE: HP 42s Program Normal Distibution - cylurian - 10-22-2024, 06:58 PM
RE: HP 42s Program Normal Distibution - Thomas Klemm - 10-22-2024, 07:44 PM
RE: HP 42s Program Normal Distibution - cylurian - 10-23-2024, 04:41 AM
|
User(s) browsing this thread: 2 Guest(s)