[OpenSTA-devel] [ opensta-Bugs-1406888 ] Distribution of RANDOM variable sequences is non-uniform
Brought to you by:
dansut
From: SourceForge.net <no...@so...> - 2007-10-18 13:40:47
|
Bugs item #1406888, was opened at 2006-01-15 17:31 Message generated for change (Comment added) made by velivis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1406888&group_id=10857 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Script Language Group: Behavioral >Status: Closed Resolution: Accepted Priority: 5 Private: No Submitted By: Daniel Sutcliffe (dansut) Assigned to: Daniel Sutcliffe (dansut) Summary: Distribution of RANDOM variable sequences is non-uniform Initial Comment: Given a RANDOM variable you would expect that for every call to GENERATE there was an equal chance of getting any of the potential results - this appears to not be the case and for any set of potential results there will be certain result values which have a higher chance of being returned and others which have a lower chance. As an example given potential results of 1 and 2, there is roughly 53% chance of getting a 2 and 47% chance of getting a 1. This type/scale of result weighting applies to all result set sizes - giving a random result that although "fairly random" could potentially throw out test results in certain very specific circumstances. This problem is present on all platforms for the OpenSTA 1.4.3 release and earlier. ---------------------------------------------------------------------- >Comment By: Bernie Velivis (velivis) Date: 2007-10-18 08:40 Message: Logged In: YES user_id=1868094 Originator: NO Dan wrote: "Given a RANDOM variable you would expect that for every call to GENERATE there was an equal chance of getting any of the potential results". This is not true. True random number generators will generate duplicates quite often. However this does tend to even out over time (larger ranges and more samples both lead to more uniform distributions). The randomness of a set of numbers can be quantified by calculating the standard deviation. I generated 100 random numbers in SCL and using the Excel STDEVA function calculated a standard deviation of 28. I also created a list of 100 numbers using the excel rand() function and for it I calculated a standard deviation of 31 (slightly more random). Both lists contained many duplicates. If you want to generate a list of pseudo random numbers with no repeating values, generate it outside of SCL, randomize its order, and import the numbers into a list of integers and use the NEXT command to access them sequentially ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1406888&group_id=10857 |