⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kiss.out

📁 diehard随机数测试套件的C程序代码
💻 OUT
📖 第 1 页 / 共 3 页
字号:
				NOTE	Most of the tests in DIEHARD return a p-value, which	should be uniform on [0,1) if the input file contains truly	independent random bits.   Those p-values are obtained by	p=1-F(X), where F is the assumed distribution of the sample	random variable X---often normal. But that assumed F is often just	an asymptotic approximation, for which the fit will be worst	in the tails. Thus you should not be surprised with  occasion-	al p-values near 0 or 1, such as .0012 or .9983. When a bit	stream really FAILS BIG, you will get p`s of 0 or 1 to six 	or more places.  By all means, do not, as a Statistician 	might, think that a p < .025 or p> .975 means that the RNG	has "failed the test at the .05 level".  Such p`s happen	among the hundreds that DIEHARD produces, even with good RNGs.	 So keep in mind that "p happens"	Enter the name of the file to be tested.	This must be a form="unformatted",access="direct" binary	file of about 10-12 million bytes. Enter file name: 		HERE ARE YOUR CHOICES:		1   Birthday Spacings		2   Overlapping Permutations		3   Ranks of 31x31 and 32x32 matrices		4   Ranks of 6x8 Matrices		5   Monkey Tests on 20-bit Words		6   Monkey Tests OPSO,OQSO,DNA		7   Count the 1`s in a Stream of Bytes		8   Count the 1`s in Specific Bytes		9   Parking Lot Test		10  Minimum Distance Test		11  Random Spheres Test		12  The Sqeeze Test		13  Overlapping Sums Test		14  Runs Test		15  The Craps Test		16  All of the above	To choose any particular tests, enter corresponding numbers.	Enter 16 for all tests. If you want to perform all but a few	tests, enter corresponding numbers preceded by "-" sign.	Tests are executed in the order they are entered.	Enter your choices.	|-------------------------------------------------------------|	|           This is the BIRTHDAY SPACINGS TEST                |	|Choose m birthdays in a "year" of n days.  List the spacings |	|between the birthdays.  Let j be the number of values that   |	|occur more than once in that list, then j is asymptotically  |	|Poisson distributed with mean m^3/(4n).  Experience shows n  |	|must be quite large, say n>=2^18, for comparing the results  |	|to the Poisson distribution with that mean.  This test uses  |	|n=2^24 and m=2^10, so that the underlying distribution for j |	|is taken to be Poisson with lambda=2^30/(2^26)=16. A sample  |	|of 200 j''s is taken, and a chi-square goodness of fit test  |	|provides a p value.  The first test uses bits 1-24 (counting |	|from the left) from integers in the specified file.  Then the|	|file is closed and reopened, then bits 2-25 of the same inte-|	|gers are used to provide birthdays, and so on to bits 9-32.  |	|Each set of bits provides a p-value, and the nine p-values   |	|provide a sample for a KSTEST.                               |	|------------------------------------------------------------ |		RESULTS OF BIRTHDAY SPACINGS TEST FOR kiss.32	(no_bdays=1024, no_days/yr=2^24, lambda=16.00, sample size=500)	Bits used	mean		chisqr		p-value	 1 to 24	15.59		29.9601		0.026634	 2 to 25	15.79		17.3824		0.428760	 3 to 26	15.72		20.1714		0.265557	 4 to 27	15.58		14.1076		0.659469	 5 to 28	15.86		21.2774		0.214128	 6 to 29	15.74		18.5951		0.352263	 7 to 30	15.65		18.1323		0.380544	 8 to 31	15.46		29.2788		0.032041	 9 to 32	15.45		16.3663		0.498032			degree of freedoms is: 17	---------------------------------------------------------------		p-value for KStest on those 9 p-values: 0.077945	|-------------------------------------------------------------|	|This is the BINARY RANK TEST for 31x31 matrices. The leftmost|	|31 bits of 31 random integers from the test sequence are used|	|to form a 31x31 binary matrix over the field {0,1}. The rank |	|is determined. That rank can be from 0 to 31, but ranks< 28  |	|are rare, and their counts are pooled with those for rank 28.|	|Ranks are found for 40,000 such random matrices and a chisqu-|	|are test is performed on counts for ranks 31,30,28 and <=28. |	|-------------------------------------------------------------|		Rank test for binary matrices (31x31) from kiss.32	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=28	233         	211.4       	2.203       	2.203       	r=29	5108        	5134.0      	0.132       	2.335       	r=30	23234       	23103.0     	0.742       	3.077       	r=31	11425       	11551.5     	1.386       	4.463       		chi-square = 4.463 with df = 3;  p-value = 0.216	--------------------------------------------------------------	|-------------------------------------------------------------|	|This is the BINARY RANK TEST for 32x32 matrices. A random 32x|	|32 binary matrix is formed, each row a 32-bit random integer.|	|The rank is determined. That rank can be from 0 to 32, ranks |	|less than 29 are rare, and their counts are pooled with those|	|for rank 29.  Ranks are found for 40,000 such random matrices|	|and a chisquare test is performed on counts for ranks  32,31,|	|30 and <=29.                                                 |	|-------------------------------------------------------------|		Rank test for binary matrices (32x32) from kiss.32	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=29	191         	211.4       	1.972       	1.972       	r=30	5062        	5134.0      	1.010       	2.982       	r=31	23092       	23103.0     	0.005       	2.987       	r=32	11655       	11551.5     	0.927       	3.914       		chi-square = 3.914 with df = 3;  p-value = 0.271	--------------------------------------------------------------	|-------------------------------------------------------------|	|This is the BINARY RANK TEST for 6x8 matrices.  From each of |	|six random 32-bit integers from the generator under test, a  |	|specified byte is chosen, and the resulting six bytes form a |	|6x8 binary matrix whose rank is determined.  That rank can be|	|from 0 to 6, but ranks 0,1,2,3 are rare; their counts are    |	|pooled with those for rank 4. Ranks are found for 100,000    |	|random matrices, and a chi-square test is performed on       |	|counts for ranks 6,5 and (0,...,4) (pooled together).        |	|-------------------------------------------------------------|		Rank test for binary matrices (6x8) from kiss.32			      bits  1 to  8	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	1009        	944.3       	4.433       	4.433       	r=5	21688       	21743.9     	0.144       	4.577       	r=6	77303       	77311.8     	0.001       	4.578       		chi-square = 4.578 with df = 2;  p-value = 0.101	--------------------------------------------------------------			      bits  2 to  9	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	1027        	944.3       	7.243       	7.243       	r=5	21587       	21743.9     	1.132       	8.375       	r=6	77386       	77311.8     	0.071       	8.446       		chi-square = 8.446 with df = 2;  p-value = 0.015	--------------------------------------------------------------			      bits  3 to 10	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	964         	944.3       	0.411       	0.411       	r=5	21581       	21743.9     	1.220       	1.631       	r=6	77455       	77311.8     	0.265       	1.897       		chi-square = 1.897 with df = 2;  p-value = 0.387	--------------------------------------------------------------			      bits  4 to 11	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	936         	944.3       	0.073       	0.073       	r=5	21456       	21743.9     	3.812       	3.885       	r=6	77608       	77311.8     	1.135       	5.020       		chi-square = 5.020 with df = 2;  p-value = 0.081	--------------------------------------------------------------			      bits  5 to 12	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	922         	944.3       	0.527       	0.527       	r=5	21616       	21743.9     	0.752       	1.279       	r=6	77462       	77311.8     	0.292       	1.571       		chi-square = 1.571 with df = 2;  p-value = 0.456	--------------------------------------------------------------			      bits  6 to 13	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	966         	944.3       	0.499       	0.499       	r=5	21782       	21743.9     	0.067       	0.565       	r=6	77252       	77311.8     	0.046       	0.612       		chi-square = 0.612 with df = 2;  p-value = 0.737	--------------------------------------------------------------			      bits  7 to 14	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	919         	944.3       	0.678       	0.678       	r=5	21661       	21743.9     	0.316       	0.994       	r=6	77420       	77311.8     	0.151       	1.145       		chi-square = 1.145 with df = 2;  p-value = 0.564	--------------------------------------------------------------			      bits  8 to 15	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	940         	944.3       	0.020       	0.020       	r=5	21627       	21743.9     	0.628       	0.648       	r=6	77433       	77311.8     	0.190       	0.838       		chi-square = 0.838 with df = 2;  p-value = 0.658	--------------------------------------------------------------			      bits  9 to 16	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	909         	944.3       	1.320       	1.320       	r=5	21710       	21743.9     	0.053       	1.372       	r=6	77381       	77311.8     	0.062       	1.434       		chi-square = 1.434 with df = 2;  p-value = 0.488	--------------------------------------------------------------			      bits 10 to 17	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	952         	944.3       	0.063       	0.063       	r=5	21721       	21743.9     	0.024       	0.087       	r=6	77327       	77311.8     	0.003       	0.090       		chi-square = 0.090 with df = 2;  p-value = 0.956	--------------------------------------------------------------			      bits 11 to 18	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	938         	944.3       	0.042       	0.042       	r=5	21754       	21743.9     	0.005       	0.047       	r=6	77308       	77311.8     	0.000       	0.047       		chi-square = 0.047 with df = 2;  p-value = 0.977	--------------------------------------------------------------			      bits 12 to 19	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	910         	944.3       	1.246       	1.246       	r=5	21982       	21743.9     	2.607       	3.853       	r=6	77108       	77311.8     	0.537       	4.390       		chi-square = 4.390 with df = 2;  p-value = 0.111	--------------------------------------------------------------			      bits 13 to 20	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	900         	944.3       	2.078       	2.078       	r=5	21874       	21743.9     	0.778       	2.857       	r=6	77226       	77311.8     	0.095       	2.952       		chi-square = 2.952 with df = 2;  p-value = 0.229	--------------------------------------------------------------			      bits 14 to 21	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	969         	944.3       	0.646       	0.646       	r=5	21666       	21743.9     	0.279       	0.925       	r=6	77365       	77311.8     	0.037       	0.962       		chi-square = 0.962 with df = 2;  p-value = 0.618	--------------------------------------------------------------			      bits 15 to 22	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	963         	944.3       	0.370       	0.370       	r=5	21622       	21743.9     	0.683       	1.054       	r=6	77415       	77311.8     	0.138       	1.191       		chi-square = 1.191 with df = 2;  p-value = 0.551	--------------------------------------------------------------			      bits 16 to 23	RANK	OBSERVED	EXPECTED	(O-E)^2/E	SUM	r<=4	931         	944.3       	0.187       	0.187       	r=5	22021       	21743.9     	3.531       	3.719       

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -