Skip to main content

Questions tagged [runs]

Runs refers to repeated occurrences of one outcome. For example, in repeated tosses of a coin, there will be runs of heads and tails. In the sequence HHHTHT there are 4 runs (one of length 3 and 3 of length 1).

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 views

Runs Test for a single individual

I understand the issue around inability to generalize to a population, but in this case I am interested in whether the data indicates randomness of performance in a single individual. Specifically, I ...
C. Ryan's user avatar
1 vote
1 answer
202 views

In an A/B test, how can you check if assignment to the various buckets was truly random?

Trying to figure out how I can confirm that my A/B Test assignment is truly random. I know the runs test is used to test for randomness. Is it possible to use the runs test to check if my A/B Test ...
ibarbo's user avatar
  • 65
1 vote
0 answers
45 views

Distribution of l occurrences in a row in the limit of infinite trials

The events: Let each event have two possible outcomes: $A$ with probability $p$; $B$ with probability $1-p$ The events are independent Problem: In the limit of the number of trials $N$ tending to ...
dsfkgjn's user avatar
  • 11
1 vote
1 answer
161 views

Theory of 'Runs' and probability

I want to know how did author compute the probability of eleven runs if all arrangements are equally probable. My attempt to answer my own question: This example indicates wide applicability of the ...
Win_odd Dhamnekar's user avatar
0 votes
0 answers
42 views

Expected number of runs when there are $n_1$ objects of one kind and $n_2$ objects of second kind. Flaw in Argument?

Suppose there are $n_1$ objects of one kind and $n_2$ objects of the second kind. These objects appear randomly in a sequence. I want to find the expected number of runs in the sequence. Attempt: ...
MathMan's user avatar
  • 223
6 votes
2 answers
202 views

Joint distribution of longest run and number of runs in a sequence of $n$ coin tosses?

A coin with probability of heads $p \in (0, 1) $ is tossed $n$ times. What is the joint probability distribution of the number of runs and the longest run? Schilling (1990) discusses the distribution ...
COOLSerdash's user avatar
  • 30.7k
1 vote
0 answers
19 views

LR test for overlapping return data using bootstrap

I wish to test a null hypothesis as in Christoffersen (1998) to see whether a sequence of Value-at-Risk forecasts $Q_t(p) \in \mathcal{F}_t$ possesses correct conditional coverage. Here $p \in [0,1]$ ...
Dejan Evisal's user avatar
2 votes
0 answers
28 views

How to run test for randomness on a ternary cyclic sequence?

I would like to do a run test for randomness on a ternary sequence ($x_n \in \{0,1,2\}$) where a run is said to continue if the value increases by 1 cyclically (i.e. $(x_{n+1}-x_n)=1 \text{ mod } 3$). ...
Gere's user avatar
  • 2,061
0 votes
1 answer
50 views

Probability of n successful runs [duplicate]

My background the past while has been project management so I haven't really had much work with stats the past decade or so, so please forgive the terminology if it is wrong. I'm working on a problem ...
tendim's user avatar
  • 101
0 votes
0 answers
15 views

What are the necessary steps required for conducting a Wolfowitz runs test of randomness, given that I have all the necessary data?

I am writing a part in my thesis about the random-walk theory of price changes. I plan to set up a runs test of randomness to show whether the price changes do follow a particular random pattern. I ...
Hamish Gibson's user avatar
1 vote
2 answers
485 views

Is it normal to get more variance in k folds cross-validation of an algorithm than in k repetitions?

Is it normal to get a lot more variance in k folds cross-validation of an algorithm than in k repetitions of the same algorithm (neural network) on the same dataset? ...
Claude COULOMBE's user avatar
0 votes
0 answers
265 views

Deriving the average and variance of number of runs in runs test

NIST states that the average and variance of a number of runs in the "runs above and below median" test as $$ \overline{R} = \frac{2n_a n_b}{n_a + n_b} + 1 \\ s^2 = \frac{2n_a n_b(2n_a n_b - n_a - n_b)...
user14717's user avatar
  • 215
2 votes
0 answers
94 views

maximum randomness and non-randomness

Two questions about randomness of data-sequences: Using a variant of run test like Wald–Wolfowitz to check randomness hypothesis for a one-sample data sequence, which yields a P value denoting the ...
Manin's user avatar
  • 21
2 votes
1 answer
132 views

How can I use the distribution of run lengths to test if a sequence is generated from flips of a fair coin?

I have a very long sequence (in the tens of thousands) of binary outcomes from some data-generating process. I believe that these outcomes are iid Bernoulli trials with p = 0.5, equivalent to flipping ...
andrewH's user avatar
  • 3,127
1 vote
1 answer
64 views

Including streaks/runs in (generalized) linear mixed model context

The data and model used so far: I have longitudinal count data on 16 pens (8 with treatment A, 8 with treatment B). Each pen houses the same number of animals, and the pens may be considered as ...
binkyhorse's user avatar
5 votes
2 answers
889 views

Expected number of wins until $k$ consecutive wins

We play the game, where probability that you win a game is $p$. You play until you win $k$ consecutive games. What is expected number of games you win? I can compute that expected number of games is $\...
Ethan's user avatar
  • 463
3 votes
2 answers
603 views

Probability of Runs

I hope the title accurately reflects my question. I have an independent event, with a 98% chance of occurring. Now, I observe and record the outcome of this event 100 times. What is the probability ...
DocML's user avatar
  • 31
2 votes
1 answer
796 views

Runs test and Durbin-Watson test yield different outcomes

I have analysed the market return using the runs test and the Durbin-Watson test to determine whether the return series follow the random walk or not. The problem I have found is that some return ...
Thomas's user avatar
  • 21
3 votes
0 answers
137 views

UP/DOWN Run test: How to determine the Matrix $A$

A test statistic for a UP/DOWN run is defined in Donald E. Knuth, The Art of Computer Programming Volume 2, 1998, pp. 66-.: $V= \frac{1}{n} \sum_{i,j\ <=m} \ (COUNT(i)-nb_i)(COUNT(j)-b_j)a_{ij}$ ...
B Wayne's user avatar
  • 31
2 votes
2 answers
62 views

Taking two sets (A, B) out of the same distribution, merging and then sorting should roughly result in a,b,a,b,a,b?

Suppose I take 2 sets ($A$ and $B$) of 1000 random items out the same distribution; I also suppose that all items are different. I then create a new set $C$ which is the union of $A$ and $B$, since ...
warreee's user avatar
  • 123
5 votes
1 answer
1k views

Estimating number of Monte Carlo runs to evaluate a percentile

I have a complex distribution which I can numerically sample. I'd like to estimate a percentile (let's say 90%) using Monte-Carlo simulations. What I'm doing is: I run 1 million of independent ...
xanz's user avatar
  • 449
1 vote
0 answers
87 views

Variation of Wald–Wolfowitz detecting seasonal patterns?

I am considering the standard test for randomness based on runs(Wald–Wolfowitz runs test). In it, you basically take a sequence of 1's and 2's, having length $n$, $n_1$ 1's, $n_2$ 2's and you want to ...
sdd's user avatar
  • 166
1 vote
0 answers
178 views

CLT and Wald-Wolfowitz runs test asymptotic distribution

I need help finding a theorem which could be used to prove that the Wald-Wolfowitz runs test is asymptotically normal. Let me formalize my question. We have a random sample $\{X_0,X_1,...,X_n\}$ (if ...
Mur1lo's user avatar
  • 1,375
1 vote
1 answer
3k views

run test with p-value equals to NA

I am using runs.test() of library lawstat in R. I am getting following output ...
user1550827's user avatar
2 votes
0 answers
482 views

Runs test for a very small sample

I have six measurements taken at different time-points in an experiment, and I want to show if these measurements have a dependence on time (i.e. are they random or not). I originally presented the ...
user102759's user avatar
8 votes
1 answer
342 views

Runs of the same type within a deck of cards - distribution of runs of different length

My background is in physics, not statistics, so forgive any suspect terminology or notation, but I hope the problem is clearly set out below. Secondly, my statistics is not good enough to recognize ...
Simon's user avatar
  • 81
5 votes
1 answer
483 views

One sample run test, but with P(+) $\neq \frac{_1}{^2}$

I am trying to find out how to conduct run tests on one sample but with a non 0.5-0.5 underlying occurrence pattern of the two dichotomous values. For instance ...
appletree's user avatar
2 votes
1 answer
244 views

Distribution of (maximum) run length

I am curious about the distribution of (maximum) run length given k independent trials when $p(X=1)=p_1, p(X=2)=p_2, ..., p(X=n)=p_n.$ For example, for a coin tossing for 3 independent trials, $p(...
KH Kim's user avatar
  • 1,241
1 vote
0 answers
80 views

Upper and lower limits for numbers of runs

On this website about statistical process control there is a chart which gives the upper and lower limits for the number of runs in a set of data for the data set to be considered taken from a process ...
babelproofreader's user avatar
2 votes
1 answer
348 views

Runs test for randomness for k elements

Say I have a sequence of length $n$ of $k$ different elements, s.t. $n > k, k > 2$. I want to show this sequence is random, based on the number of runs. I found this paper by AM Mood which ...
Conor Leonard's user avatar
1 vote
1 answer
1k views

Null hypothesis of the Wald-Wolfowitz runs test

From Wikipedia The runs test (also called Wald–Wolfowitz test after Abraham Wald and Jacob Wolfowitz) is a non-parametric statistical test that checks a randomness hypothesis for a two-valued data ...
Tim's user avatar
  • 19.6k
2 votes
0 answers
137 views

In general which runs test is more powerful?

There are several tests for randomness, one is runs up and down, another is run against mean or some other values, of cause, Bartel's rank test can also be used. There are studies shows where Bartel'...
user55647's user avatar
  • 381
2 votes
1 answer
872 views

Runs Test and Chi Square Distribution

I want to identify random data by applying some tests to the observed byte stream. I used the chi square test already on a frequency analysis, which works fine. To reduce the false-positive rate I ...
tom's user avatar
  • 51