Exponential Random Number Generation - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP-65/67/97 Software Library (/forum-12.html) +--- Thread: Exponential Random Number Generation (/thread-1933.html) |
Exponential Random Number Generation - Namir - 08-07-2014 03:14 PM This program uses the following algorithm to generate Exponentially distributed variables: Code:
Memory Map and Flags Code: R A = Theta Listing Code: 1 LBL e # Store seed Usage ----- 1. Enter initial/new random number seed and press [f][E]. 2. Enter value for theta and press [f][A]. 3. Enter the number of iterations and press [C]. The program will stop and display the averages for two sample sets. If flag 0 is set, the program will stop after calculating each random number. You must then press [R/S] to resume. You can clear flag 0 and then press [R/S] to resume the program at full speed. 4. Press [R/S] to view the standard deviations for the same two sample sets. Then press [R/S] to view teh expcted mean. FInnaly, press [R/S] to view the exepcted standard deviation. 5. (optional) Press [E] to generate a uniform random number. 6. (optional) Press [A] to generate an exponential random number. 7. (optional) Press [f][C] to generate a sample of 20 Exponenaially distributed random numbers that are store in registers R0 to R9 and Rs0 through Rs9. |