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

posted by Helmut Homepage – Vienna, Austria, 2022-02-22 15:11 (94 d 01:08 ago) – Posting: # 22801
Views: 469

Hi BE-proff,

» Many thanks for clarification :clap:


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

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

Complete thread:

UA Flag
 Admin contact
22,108 posts in 4,630 threads, 1,567 registered users;
online 2 (0 registered, 2 guests [including 2 identified bots]).
Forum time: Friday 17:20 CEST (Europe/Vienna)

We absolutely must leave room for doubt
or there is no progress and no learning.
There is no learning without having to pose a question.
And a question requires doubt.
People search for certainty.
But there is no certainty.    Richard Feynman

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