probability nearly zero! [Regulatives / Guidelines]

posted by Helmut Homepage – Vienna, Austria, 2012-06-16 19:08 (5123 d 11:44 ago) – Posting: # 8761
Views: 15,331

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,655 posts in 4,993 threads, 1,570 registered users;
309 visitors (0 registered, 309 guests [including 21 identified bots]).
Forum time: 06:53 CEST (Europe/Vienna)

Don’t compromise yourself.
You are all you’ve got.    Janis Joplin

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