(35S) Statistical Distributions Functions
|
11-20-2015, 01:19 PM
(This post was last modified: 11-20-2015 02:30 PM by Dieter.)
Post: #67
|
|||
|
|||
RE: HP 35s Statistical Distributions Functions
(11-20-2015 12:09 PM)PedroLeiva Wrote: Excellent idea. The inclusion of discrete variables complement the main statistical functions. Here is a short and not at all optimized listing for the Poisson and Binomial cdfs. Simply add it to the current code. It's less than 50 steps. Code: P001 LBL P // Poisson CDF If this does not work you may have an older version of the other distributions. Especially if in some cases the correct Poisson result apprears in Y instead of X. ;-) Test examples: Poisson cdf for lambda=7,3 and x=5 is 0,26404. Binomial cdf for n=20, p=0,2 and x=6 is 0,91331. (11-20-2015 12:09 PM)PedroLeiva Wrote: In that sense I attach the programs I wrote for the HP 35s, including the listing of programming instructions and numerical examples. I ask pardon because the instructions are written in my native tongue, Spanish. As far as I can tell these programs calculate the density functions (probability mass functions), but not the cumulative densities. Two questions: First, why is it required to clear all variables (CLEAR 2), i.e. have the user lose all his data, before starting the programs? It's good practice that the program itselfs clears only the registers it requires. At the moment I even do not see a reason why any register has to be cleared at all. ?!? And second: why does the Binomial distribution calculate the combinations nCx although there is a dedicated HP35s nCr function that does this faster and with less problems (e.g. overflow)? You have to know that this function exists since you used it for the Hypergeometric distribution. ;-) BTW, it seems that the program titled "Distribución Polinomial" actually calculates the multinomial distribution (es: distribución multinomial). Since I am not sure about the correct Spanish term: is there a difference between these two expressions or do they refer to the same distribution? If yes: the multinomial distribution can be calculated much easier and without using so many registers. Dieter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)