views:

21

answers:

1

Hi, How do u decide on a test statistic while developing a test for random number testing and its likely distribution. How do u calculate and decide on the formula for calculating a p value for the test statistics distribution. TIA

A: 

What is the likely distribution in the first place? Is it a normal one, a uniform one, ... I guess that random numbers should be uniformily distributed, and this is something you can test by using the appropriate Kolmogorov-Smirnov test. Basically you decide on that by applying the correct statistical methods. If you don't know the KS test, please ask advice to a statistician. This is not something you can easily implement and interprete yourself without some decent guidance a website like this cannot give you.

By the way, if you take enough random numbers, any test will show a deviation from the proposed distribution. The best way of judging a distribution is an expert look at a QQ-plot. This is all done very easily in R.

If you need more information, ask a more detailed question at stats.stackexchange.com

Cheers

Joris Meys