Difference between revisions of "RandomNumberGeneratorPareto"

From Nsnam
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
Since the expected value is provided for us (we do not calculate it from the data) the degrees of freedom in the chi square test is 50.  Using this value, we calculate a maximum chi squared statistic corresponding to the 0.05 significance level (using the GNU Scientific Library gsl_cdf_chisq_Qinv function) as 67.5048.  Ten runs of the test for goodness of fit results in an average chi square statistic of 50.8072.
 
Since the expected value is provided for us (we do not calculate it from the data) the degrees of freedom in the chi square test is 50.  Using this value, we calculate a maximum chi squared statistic corresponding to the 0.05 significance level (using the GNU Scientific Library gsl_cdf_chisq_Qinv function) as 67.5048.  Ten runs of the test for goodness of fit results in an average chi square statistic of 50.8072.
  
Since this is less than the rejection value of 67.5048 we can state with 95% confidence that the chi square statistic we measured is conistent with statistical fluctuations and that the ns-3 Pareto random number generator does, in fact, generate random numbers distributed according to the Pareto distribution.
+
=== Outcome ===
 +
 
 +
<font color="Green" size=5> Pass </font>
 +
 
 +
Since 50.8072 is less than the rejection value of 67.5048 we can state with 95% confidence that the chi square statistic we measured is conistent with statistical fluctuations and that the ns-3 Pareto random number generator does, in fact, generate random numbers distributed according to the Pareto distribution.
  
 
=== Data ===
 
=== Data ===
  
 
The following is a histogram of the random numbers generated in one run of the test.  Expected values are calulated based on the area of the cumulative distribution function corresponding to the histogram bin.  This expected value is calculated using the GNU Scientific Library gsl_cdf_pareto_P function.
 
The following is a histogram of the random numbers generated in one run of the test.  Expected values are calulated based on the area of the cumulative distribution function corresponding to the histogram bin.  This expected value is calculated using the GNU Scientific Library gsl_cdf_pareto_P function.
 
  
 
[[Image:Rng-pareto.png]]
 
[[Image:Rng-pareto.png]]
  
 
----
 
----
[[User:Craigdo|Craigdo]] 20:48, 17 April 2009 (UTC)
+
[[User:Craigdo|Craigdo]] 07:57, 30 May 2009 (UTC)

Latest revision as of 07:57, 30 May 2009

Pareto Random Number Generator

The Pareto Random Number Generator of ns-3 advertizes itself as able to generate a sequence of random numbers that is distributed according to the Pareto distribution fuction. The ns-3 class that implements this behavior is ParetoVariable.

Our goal is to validate that the random number generator does, in fact, do this.

Methodology

We apply a chi square test of goodness of fit to evaluate the function. We create a histogram with 50 bins uniformly distributed across the range [1, 10) and expand the upper boundary bin to extend the range to +infinity. We generate 1 000 000 random numbers which we assign to appropriate bins in the histogram.

Since the expected value is provided for us (we do not calculate it from the data) the degrees of freedom in the chi square test is 50. Using this value, we calculate a maximum chi squared statistic corresponding to the 0.05 significance level (using the GNU Scientific Library gsl_cdf_chisq_Qinv function) as 67.5048. Ten runs of the test for goodness of fit results in an average chi square statistic of 50.8072.

Outcome

Pass

Since 50.8072 is less than the rejection value of 67.5048 we can state with 95% confidence that the chi square statistic we measured is conistent with statistical fluctuations and that the ns-3 Pareto random number generator does, in fact, generate random numbers distributed according to the Pareto distribution.

Data

The following is a histogram of the random numbers generated in one run of the test. Expected values are calulated based on the area of the cumulative distribution function corresponding to the histogram bin. This expected value is calculated using the GNU Scientific Library gsl_cdf_pareto_P function.

Rng-pareto.png


Craigdo 07:57, 30 May 2009 (UTC)