probability nearly zero! [Regulatives / Guidelines]

posted by Helmut Homepage – Vienna, Austria, 2012-06-16 19:08 (4751 d 04:54 ago) – Posting: # 8761
Views: 13,269

Dear Detlew!

❝ ❝ The randomization (by chance) was:

❝ ❝ RT TR RT TR RT TR RT TR RT TR RT TR (12 runs)


❝ Wow! What is the probability to obtain this by chance?


~1:500 (including the reverse order); try it yourself:
set.seed(16062012)
size       <- 12
sims       <- 1e7
y          <- rep(c(-1,1), size/2)
z          <- rep(c(1,-1), size/2)
alternate  <- 0
for (i in 1:sims) {
  x <- 1
  while (sum(x) != 0) x <- sign(rnorm(size))
  if (all(x == y) | all(x == z)) alternate <- alternate+1
}
cat(paste("‘alternating’ runs:", format(100*alternate/sims, digits=15), "%\n"))


Nine nine nine nine nine nine” wouldn’t pass the algo, since not balanced. :-D

❝ BTW: My randomisation approach was always to randomize by blocks (block size 4 or if not possible by 2). Never obtained such an 'extreme' randomlist.


Chance for block size 4 ~0.9% and for block size 2 ~3%. ;-)

❝ Random freaks may use varying block sizes chosen at random.


Too stupid to code that…

Dif-tor heh smusma 🖖🏼 Довге життя Україна! [image]
Helmut Schütz
[image]

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes

Complete thread:

UA Flag
Activity
 Admin contact
23,424 posts in 4,927 threads, 1,675 registered users;
40 visitors (0 registered, 40 guests [including 13 identified bots]).
Forum time: 00:03 CEST (Europe/Vienna)

Philosophy, like medicine, has plenty of drugs, few good remedies,
and hardly any specific cures.    Sebastien-Roch Nicolas de Chamfort

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz
HTML5