Testing ‘randomness’ [General Sta­tis­tics]

posted by Helmut Homepage – Vienna, Austria, 2022-02-22 16:11 (1227 d 19:53 ago) – Posting: # 22801
Views: 3,701

Hi BE-proff,

❝ Many thanks for clarification :clap:


Welcome.

runs <- 25L
n    <- 1e6
res  <- data.frame(run = 1:runs, p = NA_real_, sign = "")
for (j in 1:nrow(res)) {
  if (j == 1) set.seed(123456) else set.seed(j)
  res$p[j] <- ks.test(rnorm(n = n), "pnorm", alternative = "two.sided")$p.value
  if (res$p[j] < 0.05) res$sign[j] <- "*"
}
print(res, row.names = FALSE)


See also there for further information.

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,427 posts in 4,929 threads, 1,677 registered users;
78 visitors (0 registered, 78 guests [including 50 identified bots]).
Forum time: 13:05 CEST (Europe/Vienna)

Half the harm that is done in this world
Is due to people who want to feel important.    T. S. Eliot

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