Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index



On 2013-07-15 09:01, Toki Kantoor wrote:
On 07/13/2013 11:01 PM, Brian Barker wrote:

Unless I misunderstand,the formula =10^RAND() should create random variates in the range (1,10) 
following the law.
10^RAND generates a set of random numbers that does _not_ adhere to
Benford's Law.  I need a random number generator whose output does
adhere to Benford's Law.

jonathon
Hi
From http://en.wikipedia.org/wiki/Benford%27s_law
Therefore, this is the distribution expected if the mantissae <http://en.wikipedia.org/wiki/Significand> of the /logarithms/ of the numbers (but not the numbers themselves) are uniformly and randomly distributed <http://en.wikipedia.org/wiki/Uniform_distribution_%28continuous%29>.

In a logarithm the part after the decimal point is the mantissa. Convert a logarithm to decimal by number=10^(logarithm). For numbers between 1 and 10 logarithm will be between 0 and 1. Therefore 10^(rand()) should produce numbers randomly between 1 and 10 conforming with Benford's law.

=10^RAND() is the same as 10^(rand())

Steve



--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.