Understanding Kolmogorov-Smirnov Test Results for Random Number Generators

Click For Summary
SUMMARY

The discussion centers on the interpretation of Kolmogorov-Smirnov test results applied to random number generators using a C++ program. The user generated two samples from a Landau distribution via the "hit and miss" method and encountered confusion regarding the test's output, which indicated a probability uniformly distributed from 0 to 1. The expectation was for a probability close to 1, suggesting that the two samples originated from the same distribution. The conversation highlights the need for clearer data presentation and more comprehensive details to facilitate accurate analysis.

PREREQUISITES
  • Understanding of the Kolmogorov-Smirnov test
  • Familiarity with C++ programming
  • Knowledge of Landau distribution
  • Experience with statistical analysis and interpretation
NEXT STEPS
  • Research the implementation of the Kolmogorov-Smirnov test in C++
  • Learn about the "hit and miss" method for generating random numbers
  • Explore best practices for presenting statistical data and histograms
  • Investigate common pitfalls in random number generation and testing
USEFUL FOR

Statisticians, data scientists, C++ developers, and anyone involved in evaluating the randomness of number generators will benefit from this discussion.

Federica
Messages
12
Reaction score
1
Hi all,

I have some doubts regarding the Kolmogorov test: I made a simple c++ program generating two samples of random numbers following a Landau distribution (I used the "hit and miss" method). I made the Kolmogorov test, in order to check the randomness of the generator, but I'm having some problems with the interpretation of the results (I attach the histogram here).

It seems I'm having a probability which is (more or less) uniformly distributed from 0 to 1. Is that correct? Or there's something wrong with my code? I expected to get a probability really close to 1, since the two sets come from the same distribution.
 

Attachments

  • kolmogorov.png
    kolmogorov.png
    4.9 KB · Views: 272
Physics news on Phys.org
This sounds a lot like "Tell me if I have a bug in my code that I won't share with you based on a plot with ambiguous labels and not enough information to reproduce."

I think you might want to add some more details. A lot of them.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 30 ·
2
Replies
30
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
Replies
9
Views
4K