(free 42) (DM42) Seven statistical distributions
|
06-30-2020, 08:11 PM
(This post was last modified: 08-14-2020 09:13 PM by rawi.)
Post: #1
|
|||
|
|||
(free 42) (DM42) Seven statistical distributions
This program computes the probabilities and the cumulated probabilities resp. the distribution function and the cumulative distribution function of seven important statistical distributions:
- Binomial distribution - Hypergeometric distribution - Poisson distribution - Standard normal distribution - Student’s t distribution - Chi-square distribution - Fisher’s F distribution Application: After calling “STATD” the following is showed: "B H P N t C F" Each letter stands for one distribution. To get to the distribution enter the position of the letter. If you want Hypergeometric distribution (=H) enter “2”, because H is in the second position, and press R/S. Then the program asks for the parameters of the distribution. Enter them and press R/S. Then the probability resp. the value of the density function will be returned in Y-register whereas the cumulative probability f(X<=x) resp. the cumulative density function is returned in X-register. Examples: 1st In Lotto 6 out of 49 are winning numbers. What is the probability that if you select 6 numbers randomly that you have at most 2 from the winning numbers (which means that you do not win at all): XEQ “STATD” -> “B H P N t C F“ - We need Hypergeometric distribution, so we press 2 R/S -> “N” - The size of the universe is 49, so: 49 R/S -> “M” – The number of elements in the universe which are winning number is 6: 6 R/S -> “n” – The size of the sample is 6 -> 6 R/S -> “x” – The maximum number of winning numbers in sample we want to know the probability is 2 -> 2 R/S Result in X-register: 0.9814 (prob(X<=2)) Result in Y-register: 0.1324 (prob(X=2)) So the probability not to win at all is greater than 98%. 2nd In a regression analysis with n=36 data points and k=3 independent variables the t-value for independent variable X1 is 2.234. Is this significant with a level of confidence of 95%? XEQ “STATD” -> “B H P N t C F“ - We need Student’s t-distribution, so we press 5 R/S -> “df” – The regression has n-k-1 = 36-3-1 = 32 degrees of freedom 32 R/S -> “x” 2.234 R/S Result in X-register: 0.9837 Result in Y-register: 0.0616 We need a symmetric interval. If on the right side there are 1.63% right of 2.234 there are 1.63% left of -2.234. Therefore this is significant with (100-2*1.63)% = 96.74% which is greater than 95%. So it is significant by 95%. I hope this explains the application of the program. Remarks: 1. The program uses the integral function of the calculator. It works with an accuracy of 1E-5. This can be changed by changing line 6 of the program. 2. The program need subroutines ndis, cdis, tdis, fdis. Best Raimund Remark: August 14th: There can be a problem if X is not defined yet. So I added line 06 to avoid this. Code: 00 { 418-Byte Prgm } |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)