An RNG test by the DKW formula

Discussion in 'Scientific Statistics Math' started by Luis A. Afonso, Jul 14, 2007.

  1. My response


    John

    GO TO SLEEP, SLEEP TIGHT , DON´T PISS THE BED.

    *****************
    licas



    Date: Jul 15, 2007 9:09 PM
    Author: John Smith
    Subject: Re: An RNG test by the DKW formula

    Luis,

    Your heading for this thread was misleading. You claim to offer an "RNG Test" but, as you have admitted, there is no testing going on.

    Yet you claim "The value I find shows that *IT WAS NECESSAEY circa 6 million each sample to attain (with 95% probability) the berved maximum."

    Since there is a 1-1 correspondence between confidence intervals and tests, explain how you can compute "95% probability" without an implied test.

    John
     
    Luis A. Afonso, Jul 16, 2007
    #21
    1. Advertisements

  2. Luis A. Afonso

    Jack Tomsky Guest

    *** Date: Jul 15, 2007 8:00 PM


    When you overstate the minimum N with only five distinct N values (that is, only five distinct W values out of 100 simulations), I will point that out. The important thing is that no one should use the Afonso methods.

    Jack
     
    Jack Tomsky, Jul 16, 2007
    #22
    1. Advertisements

  3. Luis A. Afonso

    Jack Tomsky Guest

    My response
    John, I have the feeling that Afonso is a little upset with you too.

    Jack
     
    Jack Tomsky, Jul 16, 2007
    #23
  4. Luis A. Afonso

    John Smith Guest

    Luis,

    Do you kiss your mother with that mouth?

    The psychological theory of projection leads me to conclude that you have incontinence problems. I am sorry to hear this. If you ride your burro to the nearest village that has indoor plumbing, there is probably a store where you can buy some adult diapers so that you can sleep comfortably through the night.


    John
     
    John Smith, Jul 16, 2007
    #24
  5. I found, somewhere, the parallel:


    To read exclusively text-books on Statistics has the same effect on minds as FORMALIN on encephala. MUMIFY it. The final product cannot be but a patient having
    PARROT - REPETION - CIRCULAR - MADNESS - or using a current term - A TEACHER.
    **********************************
    licas


    *** Luis, Do you kiss your mother with that mouth? The psychological theory of projection leads me to conclude that you have incontinence problems. I am sorry to hear this. If you ride your burro to the nearest village that has indoor plumbing, there is probably a store where you can buy some adult diapers so that you can sleep comfortably through the night. John.***
     
    Luis A. Afonso, Jul 16, 2007
    #25
  6. Note: If you think like me) that this algorithm (DKW inequality) why are you spending time with me, as I advised you to go away (which’s the most wise attitude).
    If, contrarily, you are open to a peaceful discussion I firstly explain my conjecture (I has the right because I’m the father).

    You have to answer YES/NO and give the reasons

    1) When I use the Box-Muller algorithm to simulate the N(0,1) variate the inaccuracies should be come from the RNG:
    2) An erratic behavior will have a logic consequence: the cumulative frequencies will differ from the Tables probabilities in an amount so large that collides with the TABLE probabilities.
    3) I chose arbitrary N=10E6 as the *sample unit* (the DKW inequality allows me) in order to have same protection against to much large differences between | Fn(t) – F(t)| (that I’ll call the diff statistics).
    4) Because I’m on a probabilistic procedure I repeat the pass 3) 100 times and I, as a final result obtain FR = the maximum diff.
    5) Looking at the Dvoretsky - Kiefer - Wolfowitz equation
    ___p = p( diff > w ) <= 2 * Exp ( -2*N*w^2)
    I obtain
    _____Ln(p / 2 ) <= - 2 * N * w^2
    ________N* <= - Ln(p/2) /(w^2)_________(A)

    (ATTENTION PLEASE) As long as the successive diff will be a no-decreasing quantity (throughout my 100 trials) at the end only TWO THINGS can result from inputting in (A) the largest w found:
    5a)__________N* <= N = 10^6
    5b)__________N* > N

    ANALYSING 5a)
    For the expected size, N*, the larger diff was found BEFORE it was expected having in consideration the chosen size. THE RGN BEHAVIOR IS INNADECUATE.
    On contrary (because diff is a no-decreasing sample variable) 5b) shows us that WE COULD CHOSEN a larger sample size in order to (PRESUMSLLY) attain such a large w.
    *************************
    licas
     
    Luis A. Afonso, Jul 16, 2007
    #26
  7. My values


    ***********************************************
    COLUMN 1 : maximum absolute difference
    COLUMNâ€2 : interval in which the diff doesn´t vary

    (p=0.95)_________F(Z=2.053749) = 0.98

    *************************

    EXP.no.1
    ___column 1________column 2
    __4.12E7____________[1, 2]
    __1.68E7____________[3, 5]
    __8.60E6____________[6, 17]
    __6.36E6____________[18, 82]
    __6.20E6____________[83, 100]

    EXP.no.2
    __1.33E8____________[1, 4]
    __5.67E7____________[5, 6]
    __1.72E7____________[7, 11]
    __1.27E7____________[12, 24]
    __9.89E6____________[25, 48]
    __8.77E6____________[49, 54]
    __7.35E6____________[55, 100]

    EXP.no.3
    __8.55E7____________[1, 2]
    __1.35E7____________[3, 4]
    __1.09E7____________[5, 7]
    __9.31E6____________[8, 89]
    __5.91E6____________[90, 100]

    EXP.no.4
    __2.58E8____________[1, 2]
    __8.94E6____________[3, 28]
    __4.92E6____________[29, 100]

    EXP.no.5
    __3.19E7____________[1, 1]
    __2.04E7____________[2, 3]
    __8.86E6____________[4, 50]
    __4.89E6____________[51, 100]

    *******************************

    The next job is to search if the maxima relative to the intervals [ a , 100], that have mean = 5.854E6, are self - consistent.


    ___(4.89 -5.854)^2 = 0.93
    ___(4.92 - = 0.87
    ___(5.91 - = 0.00(3)
    ___(6.20 - = 0.12
    ___(7.35 - = 2.24

    _____ estimated variance = 1.04_____sd = 1.02___

    It can be seen that the maximum absolute difference for the mean , 7.35 - 5.854 = 1.47 * sd, is not odd.

    **********************************
    licas


    REM "10to6"
    CLS
    DEFDBL A-Z
    INPUT " size = "; taa
    INPUT " p= "; p
    INPUT " Z, 1- F(Z) , RIGHT TAIL
    six decimal places "; x0, w0
    PRINT ""
    PRINT ""
    pi = 4 * ATN(1)
    her = 1D+25
    FOR rpt = 1 TO 100
    LOCATE 4, 65:
    PRINT USING " ######"; 100 - rpt
    RANDOMIZE TIMER
    FOR j = 1 TO taa
    20 a = SQR(-2 * LOG(RND))
    u = RND
    x = a * COS(2 * pi * u)
    IF x > x0 THEN ww = ww + 1
    NEXT j
    w = ww / taa: REM observed frequency
    e = w - w0: REM differences on frequencies
    IF ABS(e) < 1E-20 THEN e = 1E-20
    REM
    REM formula: p(sup > e ) <= 2 * exp (- 2*n*e*e)
    REM ln p <= ln 2 - 2 n * e ^ 2
    REM ln 2 - ln p >= 2 n * e ^ 2
    REM n <= ln (2/p) / (2 e^2)
    er = LOG(2 / p) * 1 / (2 * e * e)
    IF rpt = 1 THEN GOTO 444
    IF er < her THEN GOTO 444
    GOTO 111
    444 her = er: uw = uw + 1: LOCATE 7 + uw, 30
    PRINT USING "### ##.##^^^^ "; rpt; her
    111 ww = 0
    NEXT rpt
    REM
    PRINT "***************************************
    END
     
    Luis A. Afonso, Jul 17, 2007
    #27
  8. Jack Tomsky wrote

    When you overstate the minimum N with only five distinct N values (that is, only five distinct W values out of 100 simulations), I will point that out. The important thing is that no one should use the Afonso methods. Jack




    My response


    NOT AT ALL. You have, Jack Tomsky, an immoderate sense of self - indulgence and furthermore you DON`T HESITATE TO LIE if it is necessary to hind your MISTAKES.
    WHAT YOU SAID WAS THAT MY PROGRAM WAS WRONG BECAUSE I SHOULD FIND
    _____AN HUNDRED SUCESSIVE MAXIMA when I essayed my 100 values of N (by inversion of the DKW inequality relative to 1 million variates).
    WHAT WAS EXPECTED FROM *A STRAIGT CHARACTER* was … so sorry, my mistake.


    My ONLY intention was to present an ILLUSTRATION of the DKW inequality, not more, not less) THEREFORE the claim that I invent a new test is INJURIOUS , yes , INJURIOUS, John Smith – Jack Tomsky.

    **********************
    licas
     
    Luis A. Afonso, Jul 18, 2007
    #28
  9. Introduction

    On Jack’s Tomsky behalf who is very upset doing to the ILLUSTRATIVE EXAMPLE is based upon a very little number of minima jumps (on the estimated sample sizes (to reach at least the imputed one) I wrote another program based on

    EXPERIMENT

    __Z= 2.326348____right tail prob. = 0.01


    Therefore among this 100 values the number N*(i) of BRODCASTING SAMPLE SIZES EXCEEDNG 1E4 is the critical point we must remark.
    Note carefully that our goal is only one point: are there (among blocks)
    ___________ Just how many N*(i)>N _________?

    RESULTS


    EXP. 1
    ***1000 blocks, N=1000 variates each,: total 1000000.***** p=0.95.

    ____minimum size = 1889

    EXP. 2
    ***100 blocks, N=10000 variates each,: total 1000000.***** p=0.95.

    ____minimum size = 21101
    _followed by______ 2.33E4 (3 times)
    _________________2.56E4
    _________________2.72E4
    _________________3.04E4 (3 times).

    EXP. 3
    *** 50 blocks, N=20000 variates each,: total 1000000.***** p=0.95.

    ____minimum size = 51059
    _followed by______ 5.11E4 (2 times)
    _________________5.51E4
    _________________6.74E4 (2 times)
    _________________7.04E4 (3 times)

    It can be see that
    a) Blocs size has any influence on the minimum size
    b) Minimum size were 2 times blocs size (approximately)

    One can be pretty sure that number of changes of maximum inside a block is irrelevant to the minimum size: THEREFORE THE TOMSKY´s THEORY THAT ONE SHOULD CHOSE LARGE SAMPLES HAS ANY CONSISTENCY, as all those not based on sufficient expertise. TO GUESS WITH ONLY PURPOSE TO BRING SOMEONE IN DESCREDIT should not be allowed. HAPILLY it can be shown who’s right.
    *************************
    licas
     
    Luis A. Afonso, Jul 18, 2007
    #29
  10. Luis A. Afonso

    John Smith Guest

    Luis,
    You injured yourself!

    To refresh your memory, the subject of this thread (created by you) is:

    ********An RNG test by the DKW formula.***********

    You are the one who claimed to present a test!

    Or did you already forget that you wrote the subject line?

    Take some memory pills, Luis!!!!

    John
     
    John Smith, Jul 19, 2007
    #30
  11. UNLESS you be able to prove (John Smith - Jack Tomsky) that the inequality is unqualified to detect RGN anomalies you should be quiet.
    It’s clear that you prefer to bray nonsense as *** TomskyDKW inequality *** when you did never met (!?) this FUNDAMENTAL result on Statistics.
    *******************
    licas
     
    Luis A. Afonso, Jul 19, 2007
    #31
  12. Luis A. Afonso

    John Smith Guest

    Luis,

    How can your procedure detect anomalies? It is not a test, as you yourself admitted. So can you tell whether any discrepancy is significant? NO!

    You see some difference between 5.7E6 and 1E6 and pronounce it significant without benefit of a test! And you call yourself a statistician?

    How can you tell that this difference is not due to random error?

    Your program to analyze the TDKW formula is, like all of your programs, useless!

    John
     
    John Smith, Jul 20, 2007
    #32
  13. *John Smith wrote*


    *** Date: Jul 19, 2007 10:30 PM
    Author: John Smith
    Subject: Re: An RNG test by the DKW formula

    Luis,

    How can your procedure detect anomalies? It is not a test, as you yourself admitted. So can you tell whether any discrepancy is significant? NO! You see some difference between 5.7E6 and 1E6 and pronounce it significant without benefit of a test! And you call yourself a statistician? How can you tell that this difference is not due to random error? Your program to analyze the TDKW formula is, like all of your programs, useless! John ***

    MY RESPONSE

    John

    Your ONLY problem is that as you didn’t find in the Text - Books the DKW inequality used as a method to detect RNG anomalies.
    BECAUSE you are *LAZY* to think a little the easy way is to DENY.
    **************************
    SIMILIARYTIES with a formal Hypotheses Test
    ___H0: no faulty RNG ____H1: faulty RNG

    ____Test Statistics________N* >= Ln (p/2) / (- 2 * e * e)

    The Reef Fish´s favorite argument that there is not a parameter´s value involved is UNVALID and STUPID : the procedure we are dealing with is similar to a GOODNESS OF FITT.

    ___N* = CRITICAL VALUE
    ___p = SIGNIFICANCE LEVEL of e = | Fn(t) – F(t) | ´s UPPER LIMIT that lead to accept H0..
    *******
    Note : I DO NOT CLAIM THAT THE PROCEDURE IS A FORMAL HYPOTHESES TEST (only because p is an UPPER LIMIT or at the same reason : the critical value is never obtained from an inequality.
    (Really I´m sure that your only goal is to fight me: whatever stupid reasons you find as valid. I should not take them inti account).

    FINALLY AND DEFINITIVELLY

    What ´s the problem to accept the procedure if the DKW inequality is able to detect RNG`s anomalies : N* smaller than the sample size?
    It takes a litthe time to *digest* a new result as the DKW inequality, I understand how confuse you are...
    *****************
    licas
     
    Luis A. Afonso, Jul 20, 2007
    #33
  14. Luis A. Afonso

    John Smith Guest

    Luis,

    If you fail to find a discrepancy, does it mean that there is no discrepancy?

    Your "not a test" is designed not to find discrepancies even when they exist. Read about "multi-level testing" and leave the RNG testing to people who know statistics.

    By the way, what RNG does your basic program use?

    John
     
    John Smith, Jul 20, 2007
    #34
  15. John Smith typifies the person showing prejudice, bad reading and *opacity*. Guys alike only care to defend the gang does belong (or he thinks to attain in future); they, at most, because they have category to judge whatever, they limit their knowledge to display just angry (sometimes humoristic) comments to get applauses from the fools. It is, they think, their attempt to get a promotion.
    STUPID John even after I said my algorithm is an ILLUSTRATION of the DKW inequality, with inversion, he insists that it is not a CURRENT test of RNG´s.

    IT IS NOT A CURRENT TEST, of course.
    I REPEAT: IT IS NOT A CURRENT TEST
    neither was it the purpose, NEVER.

    A COMMENT, Those that are so *opaque* that are unable to go further than to push the button to put at work *canned programs* consider very odd (and an unbearable heterodoxy) that there were people that think and have a bit of creativity.
    _______________
    Luis

    Date: Jul 20, 2007 11:14 AM
    Author: John Smith
    Subject: Re: An RNG test by the DKW formula

    Luis,

    *** If you fail to find a discrepancy, does it mean that there is no discrepancy? Your "not a test" is designed not to find discrepancies even when they exist. Read about "multi-level testing" and leave the RNG testing to people who know statistics. By the way, what RNG does your basic program use? John+***
     
    Luis A. Afonso, Jul 26, 2007
    #35
  16. Luis A. Afonso

    Jack Tomsky Guest

    Actually, there is a simple explanation why John was misled into thinking that Afonso was using the Tomsky-Dvoretzsky-Keifer-Wolfowitz inequality as a test for his random number generator. You see, Afonso had nothing to do with the subject title. Unbeknownst to Afonso, the editor of this math forum sabatoged Afonso by inserting the subject title which caused everyone to believe that Afonso's masterpiece was an RNG test by the TDKW theorem.

    Jack
     
    Jack Tomsky, Jul 26, 2007
    #36
  17. A second set of results


    1) Each experiment (A to E) consists to find the maximum sample size (out of 100 blocks, 10000 items each)
    _______ d = | Fn(t)- F(t)|

    where Fn(t) is the empirical distribution value and F(t) the theoretical one.
    It was chosen the N(0,1) and the point Z=1.959964, RIGHT TAIL = 0.025.
    2) The quantity p (probability to exceed d) from the Dvoretzky - Kiefer - Wolfowitz inequality

    ______p (d > w) <= 2* exp (-2*N * w^2)_____(1)

    its inversion being

    ______N <= Ln (p/2) / (-2* w^2)

    N is the maximum SIZE to expect with a probability p a difference not exceeding w from a sample size N.
    3) In each experiment we recorded the number of the block to which the maximum d is detected and the respective N

    ____________________N________w______
    Experiment A

    _________1_______2326376_____0.0004
    _________2_________51059_____0.0027
    _________7_________44259_____0.0029
    ________31_________27189_____0.0037
    ________67_________25777_____0.0038
    ________99_________22143_____0.0041

    Experiment B

    _________1______4135780______0.0003
    _________2______1033495______0.0006
    _________4_______145399______0.0016
    _________7_______114883______0.0018
    _________8________84404______0.0021
    _________9________51059______0.0027
    ________28________41358______0.0030

    ________41________36350______0.0032
    ________58________28721______0.0036
    ________78________20131______0.0043

    Experiment C

    _________1_______372220______0.0010
    _________3_______220249______0.0013
    _________6________41358______0.0030
    _________7________32199______0.0034
    _________9________19226______0.0044


    Experiment D

    _________1_______501594______0.0008
    _________2_______114883______0.0018
    _________7________30385______0.0035
    _________8________28721______0.0036


    Experiment E

    _________1_______220249______0.0013
    _________2________42259______0.0029
    _________6________41358______0.0030
    _________7________28721______0.0036
    _________9________24472______0.0039


    Man features

    ___a) inputted N= 100000 always larger than the *saturation* one which indicates that the d obtained from (1), a maximum, was not attained yet

    ___b) and (a real JEWELL)

    the maximum differences (10^-4)

    ___41, 43, 44, 36, 39 are self consistent (in these independent experiments).

    _____mean = 0.00406
    _____error = 0.0002

    This ILLUSTRATION (il faut être très soigneux envers les prima-donnas) how the DKW inequality can detect (necessary condition, never a sufficient one) a ill behaviour RNG.
    ______________________
    Luis
     
    Luis A. Afonso, Jul 26, 2007
    #37
  18. Luis A. Afonso

    Jack Tomsky Guest

    A second set of results


    This is a misuse of the Tomsky-Dvoretzsky-Keifer-Wolfowitz Theorem. THe distance metric in our theorem is

    d = sup| Fn(t)- F(t)|,

    and not simply the absolute difference at a single point.

    Jack
     
    Jack Tomsky, Jul 26, 2007
    #38
  19. Luis A. Afonso

    licas_ Guest

    My response

    This is a real misuse of a rotten brains: I precisely had found
    the MAXIMUMS along 100 blocks, 10000 items each, total 1
    million X~N(0,1)
    Even the most dull teenager in the world is so dull to ascrib his own
    name to a mathematical theorem. Furthermore Jack never net it before.
    ______________
    Luis
     
    licas_, Jul 26, 2007
    #39
  20. MY ALGHORITHM CAN DETECT (with high probability) IF A GIVEN DISCREPANCY IS AS HIGH THAT IT IS NOT CREDIBLE TO EXIST DUE TO RANDOM VARIATION ONLY.:
    (Like all hypothesis tests)
    YOUR GROSS ERROR IS THAT YOU ARE CONVINCED THAT YOUR MULTY STAGE TESTS ARE ABLE TO PROVE THAT A RNG IS 100% CORRECT (uniform distribution plus ZERO CORRELATION AMONG THE NUMBERS).
    __________________________
    Luis

    *** Date: Jul 20, 2007 11:14 AM Author: John Smith Subject: Re: An RNG test by the DKW formula
    Luis,
    *** If you fail to find a discrepancy, does it mean that there is no discrepancy? Your "not a test" is designed not to find discrepancies even when they exist. Read about "multi-level testing" and leave the RNG testing to people who know statistics. By the way, what RNG does your basic program use? John+***
     
    Luis A. Afonso, Jul 27, 2007
    #40
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.