Welcome Guest
You last visited May 25, 2018, 4:33 pm
All times shown are
Eastern Time (GMT-5:00)

# Random Number Transforms - Reoccurrence Distribution

Topic closed. Posted 11 years ago. No replies.

 Page 1 of 1
- Eagle Sun - Quantum Master
West Concord, MN
United States
Member #21
December 7, 2001
4087 Posts
Online
 Posted: December 7, 2006, 11:24 am - IP Logged

Random Number Transforms - Reoccurrence Distribution

Reference - Discharging Reoccurrence Distribution

Random Reoccurrence Distribution -    x = -m ln(1 - y)

m - average rate of reoccurrence
y - random number, 0 £ y < 1

x as analog - values of x are not rounded to any decimal place value.
x as digital - values of x are converted to the integer part of x.
Ex.1 -    4.129840012394543 is converted to 4
Ex.2 -    2.781992014293572 is converted to 2
valid digital values of x are when x ³ 1

VB Code for Random Reoccurrence Distribution

Function Rand_RD(m) As Long 'average rate of reoccurrence - m

If m >= 1 Then 'rate of reoccurrence must be 1 or more

Do

x = Int(-1 * m * Log(1 - Rnd)) 'get random integer x value

Loop Until x > 0 'if x is 0 or less, resample for x

Rand_RD = x

Else 'set Rand_RD to 1 if rate of reoccurrence is less than 1

Rand_RD = 1

End If

End Function

1500 Random Samples, m = 8.17
8, 3, 5, 3, 5, 2, 6, 17, 13, 4, 5, 27, 29, 3, 5, 19, 8, 24, 11, 5, 9, 5, 5, 11, 8, 1, 10, 8, 3, 2, 7, 1, 5, 6, 15, 26, 1, 1, 13, 4, 9, 4, 9, 9, 10, 3, 5, 9, 1, 5, 12, 2, 8, 4, 13, 6, 14, 6, 8, 3, 10, 24, 1, 1, 16, 10, 4, 5, 7, 6, 3, 3, 9, 12, 3, 3, 10, 10, 9, 6, 4, 9, 3, 16, 5, 11, 4, 2, 8, 7, 1, 2, 6, 6, 21, 2, 1, 7, 4, 32, 13, 10, 4, 29, 17, 12, 13, 1, 3, 12, 35, 4, 2, 7, 8, 6, 5, 20, 14, 2, 3, 3, 14, 24, 2, 2, 2, 18, 5, 11, 2, 6, 8, 11, 1, 11, 3, 2, 6, 1, 10, 8, 12, 9, 1, 1, 1, 7, 4, 8, 7, 8, 8, 13, 5, 2, 1, 10, 3, 5, 4, 3, 11, 1, 3, 15, 2, 16, 1, 17, 2, 4, 12, 2, 1, 31, 10, 8, 4, 4, 7, 44, 14, 10, 31, 2, 13, 3, 3, 30, 5, 7, 9, 3, 24, 17, 30, 2, 19, 8, 1, 1, 1, 13, 1, 2, 6, 15, 5, 2, 6, 10, 23, 14, 6, 29, 8, 1, 2, 4, 9, 17, 5, 1, 9, 6, 3, 2, 2, 18, 4, 19, 7, 11, 1, 6, 11, 9, 22, 20, 1, 11, 1, 5, 3, 23, 17, 3, 3, 9, 27, 6, 5, 10, 9, 5, 1, 1, 9, 2, 9, 6, 22, 10, 4, 3, 20, 22, 15, 34, 6, 3, 2, 30, 20, 9, 33, 1, 3, 10, 23, 21, 20, 1, 25, 10, 3, 4, 10, 9, 10, 3, 25, 25, 5, 1, 3, 11, 13, 15, 4, 37, 8, 2, 3, 2, 16, 2, 8, 1, 6, 20, 17, 9, 2, 4, 8, 6, 2, 5, 11, 33, 1, 2, 2, 10, 12, 9, 2, 8, 12, 3, 16, 15, 9, 5, 35, 8, 6, 26, 5, 3, 3, 6, 4, 5, 15, 5, 10, 9, 4, 3, 9, 4, 2, 38, 1, 3, 8, 9, 3, 2, 5, 5, 7, 4, 8, 8, 28, 15, 28, 15, 5, 26, 1, 28, 12, 6, 8, 5, 2, 12, 4, 2, 4, 2, 5, 4, 6, 4, 1, 13, 32, 6, 1, 1, 2, 3, 19, 14, 4, 20, 1, 1, 26, 6, 3, 5, 40, 11, 16, 19, 4, 2, 9, 5, 3, 10, 2, 5, 7, 3, 3, 1, 5, 1, 16, 1, 12, 13, 18, 12, 9, 16, 1, 1, 6, 1, 15, 2, 3, 12, 7, 3, 10, 1, 22, 24, 5, 1, 8, 4, 3, 1, 4, 2, 5, 17, 10, 1, 14, 26, 25, 4, 7, 1, 2, 15, 5, 24, 57, 3, 10, 4, 10, 1, 12, 8, 6, 9, 12, 18, 21, 13, 4, 18, 23, 6, 1, 2, 1, 9, 15, 1, 15, 11, 10, 12, 1, 15, 6, 1, 5, 3, 13, 6, 1, 2, 11, 8, 2, 1, 9, 13, 9, 7, 1, 14, 5, 13, 10, 3, 4, 4, 1, 15, 7, 42, 6, 24, 1, 3, 1, 17, 1, 12, 2, 6, 6, 2, 4, 18, 7, 1, 13, 9, 1, 2, 2, 24, 17, 2, 20, 1, 6, 6, 25, 7, 16, 5, 22, 1, 1, 12, 9, 1, 1, 27, 11, 4, 1, 4, 1, 3, 8, 17, 15, 1, 7, 21, 1, 5, 15, 14, 4, 18, 15, 16, 1, 14, 9, 5, 13, 2, 10, 8, 10, 32, 5, 3, 44, 3, 1, 2, 10, 11, 9, 19, 3, 6, 12, 1, 1, 15, 5, 4, 3, 12, 1, 13, 11, 1, 10, 14, 6, 10, 6, 1, 1, 5, 5, 30, 8, 26, 6, 4, 6, 7, 25, 1, 1, 2, 4, 11, 5, 54, 11, 6, 3, 10, 9, 18, 1, 6, 9, 18, 2, 2, 5, 5, 7, 9, 3, 20, 15, 2, 8, 2, 7, 6, 6, 3, 5, 9, 1, 26, 3, 2, 19, 4, 2, 1, 6, 10, 7, 2, 3, 6, 18, 10, 3, 3, 12, 19, 18, 7, 11, 35, 21, 30, 4, 17, 17, 34, 3, 2, 2, 10, 16, 7, 1, 8, 12, 6, 14, 3, 4, 3, 11, 8, 3, 6, 3, 15, 6, 20, 4, 8, 26, 5, 5, 10, 1, 1, 27, 15, 5, 2, 1, 17, 6, 1, 15, 15, 6, 7, 22, 2, 1, 11, 17, 4, 47, 1, 3, 5, 6, 13, 14, 5, 4, 7, 8, 18, 2, 17, 19, 12, 25, 6, 7, 3, 2, 3, 4, 17, 17, 5, 9, 18, 5, 1, 2, 2, 19, 5, 8, 9, 10, 11, 7, 5, 2, 17, 3, 7, 22, 8, 9, 4, 2, 2, 2, 3, 15, 6, 3, 6, 16, 7, 11, 3, 9, 2, 26, 20, 10, 7, 1, 18, 4, 1, 9, 6, 6, 19, 11, 13, 18, 1, 12, 11, 13, 12, 2, 4, 8, 4, 5, 4, 4, 25, 1, 12, 4, 1, 1, 3, 5, 4, 3, 7, 9, 18, 2, 10, 2, 4, 4, 1, 17, 16, 17, 5, 1, 27, 2, 23, 6, 9, 9, 1, 8, 5, 6, 5, 21, 1, 14, 25, 34, 5, 3, 4, 15, 8, 9, 3, 4, 5, 3, 5, 7, 2, 9, 13, 11, 16, 7, 3, 14, 5, 9, 1, 9, 10, 16, 3, 1, 3, 21, 17, 6, 11, 4, 2, 20, 5, 15, 29, 9, 8, 1, 3, 3, 1, 6, 1, 11, 5, 9, 5, 4, 38, 5, 34, 5, 2, 13, 14, 3, 14, 33, 2, 4, 3, 2, 2, 7, 6, 4, 17, 4, 3, 4, 4, 3, 7, 5, 14, 16, 32, 4, 12, 6, 15, 16, 7, 7, 20, 2, 9, 6, 18, 4, 1, 5, 1, 25, 7, 16, 3, 24, 3, 2, 6, 11, 3, 7, 2, 10, 6, 8, 8, 5, 3, 19, 14, 10, 1, 14, 2, 5, 8, 2, 24, 1, 3, 10, 4, 7, 13, 4, 3, 3, 5, 10, 6, 3, 3, 13, 15, 10, 8, 1, 3, 19, 3, 1, 5, 6, 1, 12, 2, 3, 36, 1, 52, 29, 10, 1, 20, 11, 5, 1, 8, 13, 21, 1, 12, 20, 2, 3, 9, 2, 8, 5, 12, 4, 5, 14, 3, 4, 8, 29, 1, 4, 1, 12, 9, 3, 27, 3, 60, 8, 4, 6, 6, 11, 6, 7, 5, 4, 15, 3, 7, 5, 3, 5, 1, 14, 3, 40, 3, 1, 2, 5, 4, 5, 14, 16, 50, 1, 6, 14, 4, 12, 2, 1, 1, 4, 6, 3, 13, 19, 1, 3, 2, 2, 3, 14, 2, 1, 2, 4, 11, 11, 8, 1, 8, 12, 11, 11, 2, 5, 2, 16, 2, 1, 18, 17, 4, 4, 3, 6, 2, 9, 5, 12, 2, 15, 13, 6, 8, 13, 2, 6, 7, 1, 7, 26, 7, 18, 6, 53, 9, 3, 10, 12, 3, 2, 9, 3, 1, 8, 20, 6, 1, 6, 5, 12, 2, 2, 2, 4, 5, 1, 8, 9, 10, 1, 3, 2, 1, 10, 3, 28, 1, 3, 8, 6, 13, 3, 2, 5, 5, 5, 3, 12, 5, 1, 8, 7, 3, 8, 4, 28, 29, 7, 6, 8, 2, 13, 7, 9, 19, 6, 3, 4, 3, 7, 18, 1, 6, 2, 2, 8, 3, 4, 8, 2, 6, 7, 2, 7, 6, 2, 3, 5, 10, 2, 18, 9, 4, 10, 6, 5, 30, 8, 6, 4, 4, 7, 12, 14, 4, 7, 1, 11, 6, 1, 2, 1, 1, 1, 11, 19, 3, 14, 10, 11, 6, 9, 16, 19, 6, 12, 10, 5, 11, 4, 4, 10, 3, 9, 18, 17, 34, 3, 7, 8, 12, 1, 17, 21, 26, 3, 2, 5, 6, 20, 3, 1, 1, 3, 1, 19, 1, 22, 5, 2, 7, 5, 1, 7, 10, 3, 2, 1, 1, 16, 4, 2, 5, 2, 7, 11, 2, 3, 8, 18, 6, 2, 7, 9, 3, 8, 3, 12, 2, 8, 6, 23, 3, 12, 12, 8, 7, 5, 19, 19, 2, 2, 17, 3, 5, 6, 10, 6, 8, 25, 3, 3, 2, 6, 25, 7, 4, 13, 13, 2, 18, 1, 4, 5, 22, 1, 2, 2, 6, 1, 1, 23, 14, 13, 7, 4, 42, 8, 12, 2, 3, 6, 11, 23, 7, 8, 27, 11, 9, 2, 15, 4, 5, 1, 9, 3, 3, 4, 1, 10, 42, 3, 14, 7, 11, 29, 12, 1, 1, 14, 23, 2, 18, 3, 5, 6, 2, 6, 16, 3, 6, 3, 3, 2, 4, 8, 4, 7, 2, 3, 19, 8, 9, 1, 2, 5, 6, 31, 12, 16, 8, 8, 3, 7, 5, 14, 10, 12, 7, 1, 9, 8, 12, 6, 5, 10, 10, 3, 10, 8, 17, 9, 41, 6, 8, 11, 7, 4, 7, 6, 24, 43, 1, 1, 8, 11, 6, 3, 3

Distribution of 1500 Random Samples, m = 8.17

 Draw Difference Dd Actual Calculated 1 169 162.4471 2 141 143.7324 3 152 127.1738 4 105 112.5227 5 113 99.5596 6 108 88.0899 7 70 77.9415 8 78 68.9623 9 70 61.0175 10 62 53.988 11 47 47.7683 12 48 42.2652 13 34 37.396 14 31 33.0878 15 32 29.2759 16 24 25.9032 17 28 22.919 18 25 20.2787 19 21 17.9425 20 17 15.8754 21 9 14.0465 22 9 12.4283 23 9 10.9965 24 11 9.7296 25 12 8.6087 26 11 7.617 27 7 6.7394 28 5 5.963 29 8 5.2761 30 6 4.6682 31 3 4.1304 32 4 3.6546 33 3 3.2336 34 5 2.861 35 3 2.5314 36 1 2.2398 37 1 1.9818 38 2 1.7535 39 0 1.5514 40 2 1.3727 41 1 1.2146 42 3 1.0746 43 1 0.9508 44 2 0.8413 45 0 0.7444 46 0 0.6586 47 1 0.5827 48 0 0.5156 49 0 0.4562 50 1 0.4037 51 0 0.3572 52 1 0.316 53 1 0.2796 54 1 0.2474 55 0 0.2189 56 0 0.1937 57 1 0.1714 58 0 0.1516 59 0 0.1342 60 1 0.1187

Graph of Distribution for 1500 Random Samples, m = 8.17

Presented 'AS IS' and for Entertainment Purposes Only.
Any gain or loss is your responsibility.