how will you test if the random number generator is generating actual random numbers
--------------------------------------------------------------
This is harder than it sounds. Just generating numbers and binning them will not work, because then this would be a valid random number generator:
unsigned int randVal = 0;
float rand() {
randVal++;
return randVal / (float)INT_MAX;
}
Chi Square test, distribution test

本文探讨了验证随机数生成器是否真正产生随机数的方法。直接生成并分箱数字的方法不可行,因为即使按顺序生成的数字也能通过这种方法。文中提到了卡方检验等统计学方法。
1299

被折叠的 条评论
为什么被折叠?



