HYGPDF by Michael S. Beeler, (C) 2001 This program calculates the Hypergeometric Distribution probability desnity function (p.d.f.). This distribution arises when there are a collection of N = N1 + N2 similar objects (say RED and BLUE poker chips). A collection of n objects is selected from these N objects at random and without replacement. This p.d.f. is used to find the probability that exactly x of these objects belong the the group labeled N1. Certain condtions must hold true: 1) x <= n 2) x <= N1 3) n - x <= N2 These conditions are checked for in the program's logic. If any of these are violated, an undefined tag is placed on the execution stack. Otherwise, the program returns the calculated probability. In order to overcome size limitations imposed by the use of integers with this compiler, a floating point type was used for all calculations of factorials and combinations. This is my first program using the TIGCC compiler. I have tested it with known input values. It has returned all correct answers to date. The only possible problem would be a divide by zero error. This very nasty error would cause your calculator to lock up hard! This cannot happen in this implementation of the code. The combinations function cannot return a zero value. Usage: hygpdf(n,N1,N,x) Known problems: This program cannot be referenced by another program on a 2.xx AMS. I ran the program on an older 1.xx AMS and found that it could be referenced using the old system. Any ideas on how to make the program usable by other programs would be very helpful. My next project is to modify the code to calculate the Hypergeometric Distribution cumulative distribution function. Any questions or suggestions can be e-mailed to: msbeeler59@home.com If you should encounter problems with you calculator when using this program, refer to page 547 of your TI-89 manual for help. I highly encourage you to make back-up copies of any important software prior to running ANY downloaded TI calculator program file. Happy ballot counting!