1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
--------------------------------------------
Test of RandMultiGauss distribution
Please enter an integer seed: How many vectors should we generate: Enter the dimensions of mu, then S (normally the same): Enter mu, one component at a time:
1: 2: 3: 4: 5: Enter S, one white-space-separated row at a time.
The length needed for each row is given in {braces}.
The diagonal elements of S will be the first numbers on each line:
1 {5 numbers}: 2 {4 numbers}: 3 {3 numbers}: 4 {2 numbers}: 5 {1 numbers}: mu is:
-200
-100
0
100
200
S is:
3 0 0.1 -0.1 0.2
0 12 -0.2 -0.1 0.1
0.1 -0.2 0.5 0 0.05
-0.1 -0.1 0 20 1
0.2 0.1 0.05 1 10
D = Diagonalized S is
2.99718 0 0 0 0
0 0.492334 0 0 0
0 0 20.1004 0 0
0 0 0 9.90202 0
0 0 0 0 12.0081
Instantiating distribution utilizing TripleRand engine...
Sample fire():
-199.86
-103.267
-0.53712
98.4656
203.077
Normal operation will try a single group of 20000 random vectors.
Enter 1 for a single trial with 20000 random vectors.
Alternatively some number of groups of 20000 vectors can be produced to accumulate deviation statistics.
Enter 167 or some other number of trials to do this:
Testing fire() ...
2000, 4000, 6000, 8000, 10000, 12000, 14000, 16000, 18000, 20000, Statistics for the first (or only) trial of 20000 vectors:
Average (should match mu):
-200.006
-99.9749
-0.00693214
100.036
200.006
Second Moments (should match S)
3.02249 -0.0287874 0.0932166 -0.208071 0.151289
-0.0287874 12.0915 -0.195875 -0.159708 0.0372991
0.0932166 -0.195875 0.501449 -0.00926436 0.0522026
-0.208071 -0.159708 -0.00926436 20.0929 0.944762
0.151289 0.0372991 0.0522026 0.944762 9.78683
Dprime = Second moment matrix transformed by the same matrix that diagonalized S
3.02011 -0.00802925 -0.109499 -0.0299176 -0.0297384
-0.00802925 0.494527 -0.00538167 0.00395511 0.00725938
-0.109499 -0.00538167 20.182 -0.0832379 -0.0697035
-0.0299176 0.00395511 -0.0832379 9.70731 -0.0730188
-0.0297384 0.00725938 -0.0697035 -0.0730188 12.0912
The expected variance for Dprime elements is
0.128991 0.0105608 0.430995 0.207303 0.258213
0.0105608 0.00345856 0.0705732 0.0339448 0.042281
0.430995 0.0705732 5.7603 1.38532 1.72552
0.207303 0.0339448 1.38532 1.33264 0.829954
0.258213 0.042281 1.72552 0.829954 2.06754
Differences between each element and its normative value,
scaled by the expected deviation (sqrt(variance)) are:
-0.759194 0.929145 1.98349 0.781415 0.695964
0.929145 -0.443391 0.24091 -0.255287 -0.419841
1.98349 0.24091 -0.404545 0.841016 0.631033
0.781415 -0.255287 0.841016 2.00585 0.953158
0.695964 -0.419841 0.631033 0.953158 -0.687596
About 5% of the above values should have absolute value more than 2.
Deviations of more than 4 sigma would probably indicate a problem.
The worst deviation of any element of D in this trial was 2.00585
|