Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

Taking into consideration the runs test proposed by Knuth given a sample of pseudo-random numbers to test independence, and looking at this example:

X = (5,4,1,7,2,3,6), which yields
S = (0,0,1,0,1,1)

I'm a bit confused if:

X = (5,4,1,**1**,2,3,6), would yield 
S = (0,0,1,**1**,1,1) ... call it option #1 or yield
S = (0,0,1,**0**,1,1) ... call it option #2

...and for the case of:

X = (5,**5**,1,7,2,3,6), should it yield
S = (**0**,0,1,0,1,1) ...call it option #1 or
S = (**1**,0,1,0,1,1) ...call it option #2

So what is it in the first and second cases and why?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.