Presentation is loading. Please wait.

Presentation is loading. Please wait.

Randomness Test Fall 2012 By Yaohang Li, Ph.D.. Review Last Class –Random Number Generation –Uniform Distribution This Class –Test of Randomness –Chi.

Similar presentations


Presentation on theme: "Randomness Test Fall 2012 By Yaohang Li, Ph.D.. Review Last Class –Random Number Generation –Uniform Distribution This Class –Test of Randomness –Chi."— Presentation transcript:

1 Randomness Test Fall 2012 By Yaohang Li, Ph.D.

2 Review Last Class –Random Number Generation –Uniform Distribution This Class –Test of Randomness –Chi Square Test –K-S Test –10 empirical tests Next Class –Nuclear Simulation

3 Chi-square test Introduced by Karl Pearson in 1900 Test for discrete distributions e.g. binomial and Poisson distributions Implementation: - assume we have k possible categories - P = sequence size / k - expected sample size = P * n trials - suppose category i occurs Y i times - error = Y i – nP i - chi-square statistic - chi-square percentile = proportion of samples from a "true“ distribution having a chi-square statistic (function of errors) less than the percentile.

4 Example Given two “true” dice for 144 trials we get: s = 2 3 4 5 6 7 8 9 10 11 12 P s = 1/36 1/18 1/12 1/9 5/36 1/6 5/36 1/9 1/12 1/18 1/36 Y s = 2 4 10 12 22 29 21 15 14 9 6 nP s = 4 8 12 16 20 24 20 16 12 8 4 V = (Y 2 – nP 2 )² / nP 2 + (Y 3 – nP 3 )² / nP 3 +………+ (Y 12 – nP 12 )² / nP 12 V = (2 – 4)² / 4 + (4 – 8)² / 8 +……+ (9 – 8)² / 8 + (6 – 4)² / 4 = 7 7/48

5 Chi-square Table

6 Kolmogorov-Smirnov test Introduced in 1933 Test for continuous distributions e.g. normal and Weibull distributions based on ECDF defined as,

7 K-S Test

8 K-S Table

9 Empirical Tests Equidistribution Test Serial Test Gap Test Poker Test Coupon Collector’s Test Permutation Test Run Test Maximum of t test Collision Test Serial Correlation Test

10 Summary Chi-Square Test KS Test Empirical Tests

11 What I want you to do? Review Slides Review basic probability/statistics concepts Work on your Assignment 3


Download ppt "Randomness Test Fall 2012 By Yaohang Li, Ph.D.. Review Last Class –Random Number Generation –Uniform Distribution This Class –Test of Randomness –Chi."

Similar presentations


Ads by Google