Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Other than uniformity tests on random numbers of which can be done with other methods, I had wondered if the result of the Pearson Product Moment Correlation function would be an effective means to convey randomness, based on its purpose (of measuring correlation)

My two questions are,

Would this be a less relevant test of my random generations to compare to say an HRNG, than other statistical tests of randomness to show a potential client?

Would I be correct using the function in this manner, by generating two new arrays (of the same RNG method) for the function ρ(x, y) to show the correlation or is it used differently?

share|cite|improve this question
up vote 2 down vote accepted

A good quality uniform random number generator is expected to generate data that would behave statistically as uniform. This, in particular, implies that two samples, of any size, should be independent, and thus uncorrelated.

Computing Pearson's correlation is one of several ways to measure correlation (see wiki's article on correlation and dependence). There are other measures, like Spearman's rank correlation coefficient $\rho$ and Kendall's rank correlation coefficient $\tau$ among others.

One other possibilities is to use standard battery of tests of randomness on data generated by your algorithm. See Marsaglia's page for details.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.