SuppDists/0000755000176200001440000000000014665673172012231 5ustar liggesusersSuppDists/MD50000644000176200001440000000217714665673172012550 0ustar liggesuserse46f97f57267b853d104d2900ab82c06 *DESCRIPTION 2192e5ef3706cb331c911f8149212601 *NAMESPACE 930ae7597c8ed60daef848bac8f19de4 *R/Dists.R 26d143d22958d9180bbd3e071d3ccb09 *R/SuppDists-defunct.R dd62203429fdc39663a9b49fc3982a9f *inst/NEWS.Rd ac131a78d294a58d64539d8a73f2577b *man/Friedman.Rd 1742ec300d548a2b5f8d0482bdc8fc46 *man/Johnson.Rd 643dc9e07f94133688c1db0574b148ae *man/Kendall.Rd babd2b9780fca03b754dd10648c02da5 *man/KruskalWallis.Rd a8b0ff3c52144b6dbc316a642f98dd85 *man/NormalScore.Rd 36031a6314e0fce28f4e5954dc8ac8ae *man/Pearson.Rd f73b6e79140669e3459226f0d83e128a *man/Spearman.Rd 9f559947d1d60e66abf1eedfda4bfe2f *man/SuppDists-defunct.Rd 011780eeaf113a874ea7fbf015c9e01b *man/SuppDists-internal.Rd fe6d11b83efddc3c9870a08ccc69a7ee *man/ghyper.Rd fbb41427153dc3ea96d4598e76e943a4 *man/ghyperTypes.Rd 6928eb1a45c2d266a5b94906971fb0d4 *man/invGauss.Rd 65b8f497d103f1d90af633abe7dae60d *man/maxFratio.Rd dca3fd92c6c1406c960b845d2d9aef03 *src/datatabs.h 3fa7bc3824b28cc9661e79068b06bacd *src/dists.cpp ff626a0115046398ee8deebada804530 *src/dists.h 365730e321f204fcb89efe200977186a *src/init.cpp 57aa3635056fbf85a6b5d32e65fae157 *src/wheeler.h SuppDists/R/0000755000176200001440000000000013610145750012413 5ustar liggesusersSuppDists/R/SuppDists-defunct.R0000644000176200001440000000030213610145750016115 0ustar liggesusers## SuppDists-defunct.R rziggurat <- function(...) { .Defunct(new = "RcppZiggurat::zrnorm", package = "SuppDists") } rMWC1019 <- function(...) { .Defunct(package = "SuppDists") } SuppDists/R/Dists.R0000644000176200001440000010033613610146052013623 0ustar liggesusers dFriedman <- function (x, r, N, log = FALSE) { M <- max(length(x), length(r), length(N)) x <- rep(x, length.out = M) r <- rep(r, length.out = M) N <- rep(N, length.out = M) rho <- rep(FALSE, length.out = M) value <- .C(`dFriedmanR`, as.double(x), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dghyper <- function (x, a, k, N, log = FALSE) { M <- max(length(x), length(a), length(k), length(N)) x <- rep(x, length.out = M) a <- rep(a, length.out = M) k <- rep(k, length.out = M) N <- rep(N, length.out = M) value <- .C(`dghyperR`, as.integer(x), as.double(a), as.double(k), as.double(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dinvGauss <- function (x, nu, lambda, log = FALSE) { N <- max(length(x), length(nu), length(lambda)) x <- rep(x, length.out = N) nu <- rep(nu, length.out = N) lambda <- rep(lambda, length.out = N) value <- .C(`dinvGaussR`, as.double(x), as.double(nu), as.double(lambda), as.integer(N), lambda = double(N),PACKAGE="SuppDists")$lambda if (log == TRUE) value <- log(value) value } dJohnson <- function (x, parms, log = FALSE) { tfun <- function(x) if (x == "SN") 1 else if (x == "SL") 2 else if (x == "SU") 3 else 4 vecFromList <- function(item, aList) { if (!is.list(aList[[1]])) return(aList[[item]]) else { tVec <- vector(length = 0) for (i in 1:length(aList)) { tVec <- append(tVec, (aList[[i]])[[item]]) } } tVec } gamma <- vecFromList(1, parms) delta <- vecFromList(2, parms) xi <- vecFromList(3, parms) lambda <- vecFromList(4, parms) type <- vecFromList(5, parms) type <- sapply(type, tfun) N <- max(length(gamma), length(x)) x <- rep(x, length.out = N) gamma <- rep(gamma, length.out = N) delta <- rep(delta, length.out = N) xi <- rep(xi, length.out = N) lambda <- rep(lambda, length.out = N) type <- rep(type, length.out = N) value <- .C(`dJohnsonR`, as.double(x), as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(N), val = double(N),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dKendall <- function (x, N, log = FALSE) { M <- max(length(x), length(N)) x <- rep(x, length.out = M) N <- rep(N, length.out = M) value <- .C(`dKendallR`, as.integer(N), as.double(x), as.integer(M), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dKruskalWallis <- function (x, c, N, U, log = FALSE) { M <- max(length(x), length(c), length(N), length(U)) x <- rep(x, length.out = M) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(FALSE, length.out = M) value <- .C(`dKruskalWallisR`, as.double(x), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dmaxFratio <- function (x, df, k, log = FALSE) { if (log == TRUE) p <- exp(p) N <- max(length(x), length(df), length(k)) x <- rep(x, length.out = N) df <- rep(df, length.out = N) k <- rep(k, length.out = N) .C(`dmaxFratioR`, as.double(x), as.integer(df), as.integer(k), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } dNormScore <- function (x, c, N, U, log = FALSE) { M <- max(length(x), length(c), length(N), length(U)) x <- rep(x, length.out = M) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(TRUE, length.out = M) value <- .C(`dKruskalWallisR`, as.double(x), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dPearson <- function (x, N, rho = 0, log = FALSE) { M <- max(length(x), length(rho), length(N)) x <- rep(x, length.out = M) rho <- rep(rho, length.out = M) N <- rep(N, length.out = M) value <- .C(`dcorrR`, as.double(x), as.double(rho), as.integer(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } dSpearman <- function (x, r, log = FALSE) { M <- max(length(x), length(r)) x <- rep(x, length.out = M) r <- rep(r, length.out = M) N <- rep(2, length.out = M) rho <- rep(TRUE, length.out = M) value <- .C(`dFriedmanR`, as.double(x), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val if (log == TRUE) value <- log(value) value } JohnsonFit <- function (t, moment = "quant") { firstChar=substring(moment,1,1) if (firstChar=="f") { mom <- moments(t) mu <- mom[[1]] sigma <- mom[[2]] skew <- mom[[3]] kurt <- mom[[4]] value <- .C(`JohnsonMomentFitR`, as.double(mu), as.double(sigma), as.double(skew), as.double(kurt), gamma = double(1), delta = double(1), xi = double(1), lambda = double(1), type = integer(1),PACKAGE="SuppDists") } else if (firstChar=="u") { mu<-t[1] sigma<-sqrt(t[2]) skew<-t[3]/sigma^3 kurt<-(t[4]/t[2]^2)-3 value <- .C(`JohnsonMomentFitR`, as.double(mu), as.double(sigma), as.double(skew), as.double(kurt), gamma = double(1), delta = double(1), xi = double(1), lambda = double(1), type = integer(1),PACKAGE="SuppDists") } else if (firstChar=="q") { input <- quantile(t, probs = c(0.05, 0.206, 0.5, 0.794, 0.95), names = FALSE) x5 <- input[[1]] x20.6 <- input[[2]] x50 <- input[[3]] x79.4 <- input[[4]] x95 <- input[[5]] value <- .C(`JohnsonFitR`, as.double(x95), as.double(x79.4), as.double(x50), as.double(x20.6), as.double(x5), gamma = double(1), delta = double(1), xi = double(1), lambda = double(1), type = integer(1),PACKAGE="SuppDists") } else return(NA) types <- c("SN", "SL", "SU", "SB") list(gamma = value$gamma, delta = value$delta, xi = value$xi, lambda = value$lambda, type = types[value$type]) } makeStatList <- function (head, mn, med, var, mod, third, fourth, dig) { sd <- sqrt(var) skew <- sign(third) * abs(third)/sd^3 kurt <- -3 + fourth/var^2 pskew <- (mn - mod)/sd if (dig > 0) { mn <- round(mn, digits = dig) med <- round(med, digits = dig) mod <- round(mod, digits = dig) var <- round(var, digits = dig) sd <- round(sd, digits = dig) third <- round(third, digits = dig) fourth <- round(fourth, digits = dig) pskew <- round(pskew, digits = dig) skew <- round(skew, digits = dig) kurt <- round(kurt, digits = dig) } theList <- list(Mean = mn, Median = med, Mode = mod, Variance = var, SD = sd, ThirdCentralMoment = third, FourthCentralMoment = fourth, PearsonsSkewness...mean.minus.mode.div.SD = pskew, Skewness...sqrtB1 = skew, Kurtosis...B2.minus.3 = kurt) c(head, theList) } moments <- function (x) { N <- length(x) v <- ((N - 1)/N) * var(x) sigma <- sqrt(v) m3 <- (sum((x - mean(x))^3))/N skew <- m3/sigma^3 m4 <- (sum((x - mean(x))^4))/N kurt <- (m4/v^2) - 3 c(mean = mean(x), sigma = sigma, skew = skew, kurt = kurt) } normOrder <- function (N) { N <- if (length(N) > 1) length(N) else N M <- N%/%2 value <- .C(`normOrdR`, val = double(M), as.integer(N), as.integer(M),PACKAGE="SuppDists")$val if (0 == N%%2) c(-value, rev(value)) else c(-value, 0, rev(value)) } pFriedman <- function (q, r, N, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(r), length(N)) q <- rep(q, length.out = M) r <- rep(r, length.out = M) N <- rep(N, length.out = M) rho <- rep(FALSE, length.out = M) if (lower.tail == TRUE) { value <- .C(`pFriedmanR`, as.double(q), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`uFriedmanR`, as.double(q), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pghyper <- function (q, a, k, N, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(a), length(k), length(N)) q <- rep(q, length.out = M) a <- rep(a, length.out = M) k <- rep(k, length.out = M) N <- rep(N, length.out = M) if (lower.tail == TRUE) { value <- .C(`pghyperR`, as.integer(q), as.double(a), as.double(k), as.double(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`ughyperR`, as.integer(q), as.double(a), as.double(k), as.double(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pinvGauss <- function (q, nu, lambda, lower.tail = TRUE, log.p = FALSE) { N <- max(length(q), length(nu), length(lambda)) q <- rep(q, length.out = N) nu <- rep(nu, length.out = N) lambda <- rep(lambda, length.out = N) if (lower.tail == TRUE) { value <- .C(`pinvGaussR`, as.double(q), as.double(nu), as.double(lambda), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } else { value <- .C(`uinvGaussR`, as.double(q), as.double(nu), as.double(lambda), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pJohnson <- function (q, parms, lower.tail = TRUE, log.p = FALSE) { tfun <- function(x) if (x == "SN") 1 else if (x == "SL") 2 else if (x == "SU") 3 else 4 vecFromList <- function(item, aList) { if (!is.list(aList[[1]])) return(aList[[item]]) else { tVec <- vector(length = 0) for (i in 1:length(aList)) { tVec <- append(tVec, (aList[[i]])[[item]]) } } tVec } gamma <- vecFromList(1, parms) delta <- vecFromList(2, parms) xi <- vecFromList(3, parms) lambda <- vecFromList(4, parms) type <- vecFromList(5, parms) type <- sapply(type, tfun) N <- max(length(gamma), length(q)) q <- rep(q, length.out = N) gamma <- rep(gamma, length.out = N) delta <- rep(delta, length.out = N) xi <- rep(xi, length.out = N) lambda <- rep(lambda, length.out = N) type <- rep(type, length.out = N) if (lower.tail == TRUE) { value <- .C(`pJohnsonR`, as.double(q), as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } else { value <- .C(`uJohnsonR`, as.double(q), as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pKendall <- function (q, N, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(N)) q <- rep(q, length.out = M) N <- rep(N, length.out = M) if (lower.tail == TRUE) { value <- .C(`pKendallR`, as.integer(N), as.double(q), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`uKendallR`, as.integer(N), as.double(q), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pKruskalWallis <- function (q, c, N, U, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(c), length(N), length(U)) q <- rep(q, length.out = M) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(FALSE, length.out = M) if (lower.tail == TRUE) { value <- .C(`pKruskalWallisR`, as.double(q), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`uKruskalWallisR`, as.double(q), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pmaxFratio <- function (q, df, k, lower.tail = TRUE, log.p = FALSE) { N <- max(length(q), length(df), length(k)) q <- rep(q, length.out = N) df <- rep(df, length.out = N) k <- rep(k, length.out = N) if (lower.tail == TRUE) { value <- .C(`pmaxFratioR`, as.double(q), as.integer(df), as.integer(k), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } else { value <- .C(`umaxFratioR`, as.double(q), as.integer(df), as.integer(k), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pNormScore <- function (q, c, N, U, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(c), length(N), length(U)) q <- rep(q, length.out = M) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(TRUE, length.out = M) if (lower.tail == TRUE) { value <- .C(`pKruskalWallisR`, as.double(q), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`uKruskalWallisR`, as.double(q), as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pPearson <- function (q, N, rho = 0, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(rho), length(N)) q <- rep(q, length.out = M) rho <- rep(rho, length.out = M) N <- rep(N, length.out = M) if (lower.tail == TRUE) { value <- .C(`pcorrR`, as.double(q), as.double(rho), as.integer(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`ucorrR`, as.double(q), as.double(rho), as.integer(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } pSpearman <- function (q, r, lower.tail = TRUE, log.p = FALSE) { M <- max(length(q), length(r)) q <- rep(q, length.out = M) r <- rep(r, length.out = M) N <- rep(2, length.out = M) rho <- rep(TRUE, length.out = M) if (lower.tail == TRUE) { value <- .C(`pFriedmanR`, as.double(q), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } else { value <- .C(`uFriedmanR`, as.double(q), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } if (log.p == TRUE) value <- log(value) value } qFriedman <- function (p, r, N, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(r), length(N)) p <- rep(p, length.out = M) r <- rep(r, length.out = M) N <- rep(N, length.out = M) rho <- rep(FALSE, length.out = M) .C(`qFriedmanR`, as.double(p), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } qghyper <- function (p, a, k, N, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(a), length(k), length(N)) p <- rep(p, length.out = M) a <- rep(a, length.out = M) k <- rep(k, length.out = M) N <- rep(N, length.out = M) value <- .C(`qghyperR`, as.double(p), as.double(a), as.double(k), as.double(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val value } qinvGauss <- function (p, nu, lambda, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p N <- max(length(p), length(nu), length(lambda)) p <- rep(p, length.out = N) nu <- rep(nu, length.out = N) lambda <- rep(lambda, length.out = N) .C(`qinvGaussR`, as.double(p), as.double(nu), as.double(lambda), as.integer(N), value = double(N),PACKAGE="SuppDists")$value } qJohnson <- function (p, parms, lower.tail = TRUE, log.p = FALSE) { tfun <- function(x) if (x == "SN") 1 else if (x == "SL") 2 else if (x == "SU") 3 else 4 if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p vecFromList <- function(item, aList) { if (!is.list(aList[[1]])) return(aList[[item]]) else { tVec <- vector(length = 0) for (i in 1:length(aList)) { tVec <- append(tVec, (aList[[i]])[[item]]) } } tVec } gamma <- vecFromList(1, parms) delta <- vecFromList(2, parms) xi <- vecFromList(3, parms) lambda <- vecFromList(4, parms) type <- vecFromList(5, parms) type <- sapply(type, tfun) N <- max(length(gamma), length(p)) p <- rep(p, length.out = N) gamma <- rep(gamma, length.out = N) delta <- rep(delta, length.out = N) xi <- rep(xi, length.out = N) lambda <- rep(lambda, length.out = N) type <- rep(type, length.out = N) .C(`qJohnsonR`, as.double(p), as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } qKendall <- function (p, N, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(N)) p <- rep(p, length.out = M) N <- rep(N, length.out = M) .C(`qKendallR`, as.integer(N), as.double(p), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } qKruskalWallis <- function (p, c, N, U, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(c), length(N), length(U)) p <- rep(p, length.out = M) c <- rep(c, length.out = M) N <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(FALSE, length.out = M) .C(`qKruskalWallisR`, as.double(p), as.integer(c), as.integer(N), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } qmaxFratio <- function (p, df, k, lower.tail = TRUE, log.p = FALSE) { if (lower.tail == FALSE) p <- 1 - p if (log.p == TRUE) p <- exp(p) N <- max(length(p), length(df), length(k)) p <- rep(p, length.out = N) df <- rep(df, length.out = N) k <- rep(k, length.out = N) .C(`qmaxFratioR`, as.double(p), as.integer(df), as.integer(k), as.integer(N), val = double(N),PACKAGE="SuppDists")$val } qNormScore <- function (p, c, N, U, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(c), length(N), length(U)) p <- rep(p, length.out = M) c <- rep(c, length.out = M) N <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(TRUE, length.out = M) .C(`qKruskalWallisR`, as.double(p), as.integer(c), as.integer(N), as.double(U), as.integer(Ns), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } qPearson <- function (p, N, rho = 0, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(rho), length(N)) p <- rep(p, length.out = M) rho <- rep(rho, length.out = M) N <- rep(N, length.out = M) .C(`qcorrR`, as.double(p), as.double(rho), as.integer(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val } qSpearman <- function (p, r, lower.tail = TRUE, log.p = FALSE) { if (log.p == TRUE) p <- exp(p) if (lower.tail == FALSE) p <- 1 - p M <- max(length(p), length(r)) p <- rep(p, length.out = M) r <- rep(r, length.out = M) N <- rep(2, length.out = M) rho <- rep(TRUE, length.out = M) .C(`qFriedmanR`, as.double(p), as.integer(r), as.integer(N), as.integer(M), as.integer(rho), val = double(M),PACKAGE="SuppDists")$val } rFriedman <- function (n, r, N) { n <- if (length(n) > 1) length(n) else n M <- max(length(r), length(N)) r <- rep(r, length.out = M) N <- rep(N, length.out = M) rho <- rep(FALSE, length.out = M) .C(`rFriedmanR`, as.integer(r), as.integer(N), as.integer(rho), as.integer(n), as.integer(M), value = double(n),PACKAGE="SuppDists")$value } rghyper <- function (n, a, k, N) { n <- if (length(n) > 1) length(n) else n K <- max(length(a), length(k), length(N)) a <- rep(a, length.out = K) k <- rep(k, length.out = K) N <- rep(N, length.out = K) .C(`rghyperR`, as.double(a), as.double(k), as.double(N), as.integer(n), as.integer(K), value = double(n),PACKAGE="SuppDists")$value } rinvGauss <- function (n, nu, lambda) { n <- if (length(n) > 1) length(n) else n N <- max(length(nu), length(lambda)) nu <- rep(nu, length.out = N) lambda <- rep(lambda, length.out = N) .C(`rinvGaussR`, as.double(nu), as.double(lambda), as.integer(n), as.integer(N), value = double(n),PACKAGE="SuppDists")$value } rJohnson <- function (n, parms) { tfun <- function(x) if (x == "SN") 1 else if (x == "SL") 2 else if (x == "SU") 3 else 4 vecFromList <- function(item, aList) { if (!is.list(aList[[1]])) return(aList[[item]]) else { tVec <- vector(length = 0) for (i in 1:length(aList)) { tVec <- append(tVec, (aList[[i]])[[item]]) } } tVec } n <- if (length(n) > 1) length(n) else n gamma <- vecFromList(1, parms) delta <- vecFromList(2, parms) xi <- vecFromList(3, parms) lambda <- vecFromList(4, parms) type <- vecFromList(5, parms) type <- sapply(type, tfun) M <- length(gamma) .C(`rJohnsonR`, as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(n), as.integer(M), val = double(n),PACKAGE="SuppDists")$val } rKendall <- function (n, N) { n <- if (length(n) > 1) length(n) else n M <- length(N) .C(`rKendallR`, as.integer(N), as.integer(n), as.integer(M), val = double(n),PACKAGE="SuppDists")$val } rKruskalWallis <- function (n, c, N, U) { n <- if (length(n) > 1) length(n) else n M <- max(length(c), length(N), length(U)) c <- rep(c, length.out = M) N <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(FALSE, length.out = M) .C(`rKruskalWallisR`, randArray = double(n), as.integer(n), as.integer(M), as.integer(c), as.integer(N), as.double(U), as.integer(Ns),PACKAGE="SuppDists" )$randArray } rmaxFratio <- function (n, df, k) { n <- if (length(n) > 1) length(n) else n M <- max(length(df), length(k)) df <- rep(df, length.out = M) k <- rep(k, length.out = M) .C(`rmaxFratioR`, as.integer(df), as.integer(k), as.integer(n), as.integer(M), value = double(n),PACKAGE="SuppDists")$value } ## .Defunct ## no alternative #rMWC1019 <- #function (n, new.start = FALSE, seed = 556677) #{ # n <- if (length(n) == 1) # n # else length(n) # .C(`MWC1019R`, val = double(n), as.integer(n), as.integer(new.start), # as.integer(seed),PACKAGE="SuppDists")$val #} rNormScore <- function (n, c, N, U) { n <- if (length(n) > 1) length(n) else n M <- max(length(c), length(N), length(U)) c <- rep(c, length.out = M) N <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(TRUE, length.out = M) .C(`rKruskalWallisR`, randArray = double(n), as.integer(n), as.integer(M), as.integer(c), as.integer(N), as.double(U), as.integer(Ns),PACKAGE="SuppDists" )$randArray } rPearson <- function (n, N, rho = 0) { n <- if (length(n) > 1) length(n) else n M <- max(length(rho), length(N)) rho <- rep(rho, length.out = M) N <- rep(N, length.out = M) .C(`rcorrR`, as.double(rho), as.integer(N), as.integer(n), as.integer(M), val = double(n),PACKAGE="SuppDists")$val } rSpearman <- function (n, r) { n <- if (length(n) > 1) length(n) else n M <- length(r) r <- rep(r, length.out = M) N <- rep(2, length.out = M) rho <- rep(TRUE, length.out = M) .C(`rFriedmanR`, as.integer(r), as.integer(N), as.integer(rho), as.integer(n), as.integer(M), value = double(n),PACKAGE="SuppDists")$value } ## use .Defunct function? ## see ~/src/R/R-3.5.1/src/library/base/man/base-defunct.Rd ## suggest package RcppZiggurat instead #rziggurat <- #function (n, normal = TRUE, new.start = FALSE, seed = 556677) #{ # n <- if (length(n) > 1) # length(n) # else n # .C(`ziggR`, val = double(n), as.integer(n), as.integer(normal), # as.integer(new.start), as.integer(seed),PACKAGE="SuppDists")$val #} sFriedman <- function (r, N) { M <- max(length(r), length(N)) r <- rep(r, length.out = M) N <- rep(N, length.out = M) rho <- rep(FALSE, length.out = M) value <- .C(`sFriedmanR`, as.integer(r), as.integer(N), as.integer(rho), as.integer(M), mn = double(M), med = double(M), mod = double(M), var = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") aList <- list(title = "Friedman's chi-square", r = r, N = N) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, -1) } sghyper <- function (a, k, N) { M <- max(length(a), length(k), length(N)) a <- rep(a, length.out = M) k <- rep(k, length.out = M) N <- rep(N, length.out = M) value <- .C(`sghyperR`, as.double(a), as.double(k), as.double(N), as.integer(M), mn = double(M), med = double(M), mod = double(M), var = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") aList <- list(title = "Generalized Hypergeometric", a = a, k = k, N = N) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, -1) } sinvGauss <- function (nu, lambda) { N <- max(length(nu), length(lambda)) nu <- rep(nu, length.out = N) lambda <- rep(lambda, length.out = N) med <- qinvGauss(0.5, nu, lambda) nu[nu<=0]<-NA lambda[lambda<=0]<-NA factor <- (nu^2)/lambda var <- nu * factor k3 <- 3 * var * factor k4 <- 5 * k3 * factor mod <- -1.5 * factor + nu * sqrt(1 + 2.25 * (nu/lambda)^2) third <- k3 fourth <- k4 + 3 * var^2 aList <- list(title = "Inverse Gaussian", nu = nu, lambda = lambda) makeStatList(aList, nu, med, var, mod, third, fourth, -1) } sJohnson <- function (parms) { tfun <- function(x) if (x == "SN") 1 else if (x == "SL") 2 else if (x == "SU") 3 else 4 vecFromList <- function(item, aList) { if (!is.list(aList[[1]])) return(aList[[item]]) else { tVec <- vector(length = 0) for (i in 1:length(aList)) { tVec <- append(tVec, (aList[[i]])[[item]]) } } tVec } gamma <- vecFromList(1, parms) delta <- vecFromList(2, parms) xi <- vecFromList(3, parms) lambda <- vecFromList(4, parms) type <- vecFromList(5, parms) type <- sapply(type, tfun) N <- length(gamma) value <- .C(`sJohnsonR`, as.double(gamma), as.double(delta), as.double(xi), as.double(lambda), as.integer(type), as.integer(N), mn = double(N), med = double(N), mod = double(N), var = double(N), third = double(N), fourth = double(N),PACKAGE="SuppDists") aList <- list(title = "Johnson Distribution", gamma = gamma, delta = delta, xi = xi, lambda = lambda, type = type) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, -1) } sKendall <- function (N) { M <- length(N) mn <- rep(0, length.out = M) med <- rep(0, length.out = M) mod <- rep(0, length.out = M) third <- rep(0, length.out = M) var <- (4 * N + 10)/(9 * N * (N - 1)) fourth <- .C(`fourthKendallR`, as.integer(N), as.integer(M), val = double(M),PACKAGE="SuppDists")$val aList <- list(title = "Kendall's Tau", N = N) makeStatList(aList, mn, med, var, mod, third, fourth, -1) } sKruskalWallis <- function (c, N, U) { M <- max(length(c), length(N), length(U)) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(FALSE, length.out = M) value <- .C(`sKruskalWallisR`, as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), var = double(M), mod = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") mn <- (c - 1) aList <- list(title = "Kruskal Wallis", c = c, N = n, U = U) median <- qKruskalWallis(0.5, c, n, U, Ns) makeStatList(aList, mn, median, value$var, value$mod, value$third, value$fourth, -1) } smaxFratio <- function (df, k) { N <- max(length(df), length(k)) df <- rep(df, length.out = N) k <- rep(k, length.out = N) value <- .C(`smaxFratioR`, as.integer(df), as.integer(k), as.integer(N), mn = double(N), med = double(N), mod = double(N), var = double(N), third = double(N), fourth = double(N),PACKAGE="SuppDists") aList <- list(title = "Maximum F ratio", df = df, k = k) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, 2) } sNormScore <- function (c, N, U) { M <- max(length(c), length(N), length(U)) c <- rep(c, length.out = M) n <- rep(N, length.out = M) U <- rep(U, length.out = M) Ns <- rep(TRUE, length.out = M) value <- .C(`sKruskalWallisR`, as.integer(c), as.integer(n), as.double(U), as.integer(Ns), as.integer(M), var = double(M), mod = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") mn <- (c - 1) aList <- list(title = "Normal Scores", c = c, N = n, U = U) median <- qNormScore(0.5, c, n, U) makeStatList(aList, mn, median, value$var, value$mod, value$third, value$fourth, -1) } sPearson <- function (N, rho = 0) { M <- max(length(rho), length(N)) rho <- rep(rho, length.out = M) N <- rep(N, length.out = M) value <- .C(`scorrR`, as.double(rho), as.integer(N), as.integer(M), mn = double(M), med = double(M), mod = double(M), var = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") aList <- list(title = "Correlation coefficient", rho = rho, N = N) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, -1) } sSpearman <- function (r) { M <- length(r) r <- rep(r, length.out = M) N <- rep(2, length.out = M) rho <- rep(TRUE, length.out = M) value <- .C(`sFriedmanR`, as.integer(r), as.integer(N), as.integer(rho), as.integer(M), mn = double(M), med = double(M), mod = double(M), var = double(M), third = double(M), fourth = double(M),PACKAGE="SuppDists") aList <- list(title = "Spearman's rho", r = r) makeStatList(aList, value$mn, value$med, value$var, value$mod, value$third, value$fourth, -1) } tghyper <- function (a, k, N) { value <- .C(`tghyperR`, as.double(a), as.double(k), as.double(N), strn =paste(rep(" ", 128), collapse=""),PACKAGE="SuppDists" ) value$strn } SuppDists/src/0000755000176200001440000000000014665666361013022 5ustar liggesusersSuppDists/src/wheeler.h0000644000176200001440000000110413610145750014601 0ustar liggesusers/* ECHIP specials */ #if !defined(__wheeler_h) #define __wheeler_h #define UCHAR unsigned char #define USHORT unsigned short int #define UINT unsigned int #define ULONG unsigned long #define equals == #define repeat do { #define until(A) }while(!(A)) #define forever }while(1); #define solongas(A) }while(A) #define null() #define true 1 #define false 0 #define bool int #define maxm(a,b) (((a)>(b))?(a):(b)) #define minm(a,b) (((a)<(b))?(a):(b)) #define absm(a) (((a)<0)?-(a):(a)) #define signm(a) (((a)>0)?1:(((a)<0)?-1:0)) #define SQR(A) ((A)*(A)) #endif // Sentinal SuppDists/src/init.cpp0000644000176200001440000000702513610145750014454 0ustar liggesusers// (C) 2020 Thorsten Pohlert // GPL (>= 2) #include // for NULL #include #include "dists.h" static const R_CMethodDef CEntries[] = { {"dcorrR", (DL_FUNC) &dcorrR, 5}, {"dFriedmanR", (DL_FUNC) &dFriedmanR, 6}, {"dghyperR", (DL_FUNC) &dghyperR, 6}, {"dinvGaussR", (DL_FUNC) &dinvGaussR, 5}, {"dJohnsonR", (DL_FUNC) &dJohnsonR, 8}, {"dKendallR", (DL_FUNC) &dKendallR, 4}, {"dKruskalWallisR", (DL_FUNC) &dKruskalWallisR, 7}, {"dmaxFratioR", (DL_FUNC) &dmaxFratioR, 5}, {"fourthKendallR", (DL_FUNC) &fourthKendallR, 3}, {"JohnsonFitR", (DL_FUNC) &JohnsonFitR, 10}, {"JohnsonMomentFitR", (DL_FUNC) &JohnsonMomentFitR, 9}, // {"MWC1019R", (DL_FUNC) &MWC1019R, 4}, {"normOrdR", (DL_FUNC) &normOrdR, 3}, {"pcorrR", (DL_FUNC) &pcorrR, 5}, {"pFriedmanR", (DL_FUNC) &pFriedmanR, 6}, {"pghyperR", (DL_FUNC) &pghyperR, 6}, {"pinvGaussR", (DL_FUNC) &pinvGaussR, 5}, {"pJohnsonR", (DL_FUNC) &pJohnsonR, 8}, {"pKendallR", (DL_FUNC) &pKendallR, 4}, {"pKruskalWallisR", (DL_FUNC) &pKruskalWallisR, 7}, {"pmaxFratioR", (DL_FUNC) &pmaxFratioR, 5}, {"qcorrR", (DL_FUNC) &qcorrR, 5}, {"qFriedmanR", (DL_FUNC) &qFriedmanR, 6}, {"qghyperR", (DL_FUNC) &qghyperR, 6}, {"qinvGaussR", (DL_FUNC) &qinvGaussR, 5}, {"qJohnsonR", (DL_FUNC) &qJohnsonR, 8}, {"qKendallR", (DL_FUNC) &qKendallR, 4}, {"qKruskalWallisR", (DL_FUNC) &qKruskalWallisR, 7}, {"qmaxFratioR", (DL_FUNC) &qmaxFratioR, 5}, {"rcorrR", (DL_FUNC) &rcorrR, 5}, {"rFriedmanR", (DL_FUNC) &rFriedmanR, 6}, {"rghyperR", (DL_FUNC) &rghyperR, 6}, {"rinvGaussR", (DL_FUNC) &rinvGaussR, 5}, {"rJohnsonR", (DL_FUNC) &rJohnsonR, 8}, {"rKendallR", (DL_FUNC) &rKendallR, 4}, {"rKruskalWallisR", (DL_FUNC) &rKruskalWallisR, 7}, {"rmaxFratioR", (DL_FUNC) &rmaxFratioR, 5}, {"scorrR", (DL_FUNC) &scorrR, 9}, {"sFriedmanR", (DL_FUNC) &sFriedmanR, 10}, {"sghyperR", (DL_FUNC) &sghyperR, 10}, {"sJohnsonR", (DL_FUNC) &sJohnsonR, 12}, {"sKruskalWallisR", (DL_FUNC) &sKruskalWallisR, 9}, {"smaxFratioR", (DL_FUNC) &smaxFratioR, 9}, {"tghyperR", (DL_FUNC) &tghyperR, 4}, {"ucorrR", (DL_FUNC) &ucorrR, 5}, {"uFriedmanR", (DL_FUNC) &uFriedmanR, 6}, {"ughyperR", (DL_FUNC) &ughyperR, 6}, {"uinvGaussR", (DL_FUNC) &uinvGaussR, 5}, {"uJohnsonR", (DL_FUNC) &uJohnsonR, 8}, {"uKendallR", (DL_FUNC) &uKendallR, 4}, {"uKruskalWallisR", (DL_FUNC) &uKruskalWallisR, 7}, {"umaxFratioR", (DL_FUNC) &umaxFratioR, 5}, // {"ziggR", (DL_FUNC) &ziggR, 5}, {NULL, NULL, 0} }; extern "C" { void R_init_SuppDists(DllInfo *dll) { R_registerRoutines(dll, CEntries, NULL, NULL, NULL); R_useDynamicSymbols(dll, FALSE); R_forceSymbols(dll, TRUE); } } SuppDists/src/datatabs.h0000644000176200001440000062520013610145750014742 0ustar liggesusers#if !defined(__datatabs_h) #define __datatabs_h struct FriedmanValues { int S; double qdist; }; FriedmanValues FriedmanData3_2[5]={ {4,0.0}, {0,9.9999999999908995e-001}, {2,8.3333333333257498e-001}, {6,4.9999999999954503e-001}, {8,1.6666666666651500e-001}}; FriedmanValues FriedmanData3_3[7]={ {6,0.0}, {0,9.9999999999818023e-001}, {2,9.4444444444272579e-001}, {6,5.2777777777681734e-001}, {8,3.6111111111045396e-001}, {14,1.9444444444409059e-001}, {18,2.7777777777727230e-002}}; FriedmanValues FriedmanData3_4[10]={ {9,0.0}, {0,9.9999999999727029e-001}, {2,9.3055555555301539e-001}, {6,6.5277777777599588e-001}, {8,4.3055555555438024e-001}, {14,2.7314814814740251e-001}, {18,1.2499999999965880e-001}, {24,6.9444444444254891e-002}, {26,4.1666666666552929e-002}, {32,4.6296296296169919e-003}}; FriedmanValues FriedmanData3_5[13]={ {12,0.0}, {0,9.9999999999636036e-001}, {2,9.5370370370023261e-001}, {6,6.9135802468884178e-001}, {8,5.2160493826970655e-001}, {14,3.6728395061594721e-001}, {18,1.8209876543143602e-001}, {24,1.2422839506127627e-001}, {26,9.3364197530524398e-002}, {32,3.9351851851708627e-002}, {38,2.3919753086332696e-002}, {42,8.4876543209567636e-003}, {50,7.7160493826879659e-004}}; FriedmanValues FriedmanData3_6[17]={ {16,0.0}, {0,9.9999999999545319e-001}, {2,9.5627572016026108e-001}, {6,7.4022633744519406e-001}, {8,5.7047325102621271e-001}, {14,4.2965534979228515e-001}, {18,2.5218621399062291e-001}, {24,1.8402777777694107e-001}, {26,1.4158950617219573e-001}, {32,7.2145061728067034e-002}, {38,5.2083333333096518e-002}, {42,2.8935185185053624e-002}, {50,1.1959876543155498e-002}, {54,8.1018518518150145e-003}, {56,5.5298353909213590e-003}, {62,1.6718106995808760e-003}, {72,1.2860082304468276e-004}}; FriedmanValues FriedmanData3_7[21]={ {20,0.0}, {0,9.9999999999454248e-001}, {2,9.6399176954206411e-001}, {6,7.6819701645671290e-001}, {8,6.1966306584023956e-001}, {14,4.8613254457896560e-001}, {18,3.0459104938105375e-001}, {24,2.3662551440200080e-001}, {26,1.9161522633640282e-001}, {32,1.1179698216674239e-001}, {38,8.5390946501591583e-002}, {42,5.1483196158841109e-002}, {50,2.7177640603418200e-002}, {54,2.0726165980682491e-002}, {56,1.6225137174122696e-002}, {62,8.4233539094190485e-003}, {72,3.6222565157552652e-003}, {74,2.7220507544433057e-003}, {78,1.2217078189233736e-003}, {86,3.2150205761141411e-004}, {98,2.1433470507427605e-005}}; FriedmanValues FriedmanData3_8[25]={ {24,0.0}, {0,9.9999999999363332e-001}, {2,9.6736754114610446e-001}, {6,7.9432798924962955e-001}, {8,6.5429598193456306e-001}, {14,5.3056770118546515e-001}, {18,3.5532764631689634e-001}, {24,2.8511159693462734e-001}, {26,2.3590034864961834e-001}, {32,1.4948059556374879e-001}, {38,1.1972379400929718e-001}, {42,7.8914466163192129e-002}, {50,4.6907150205462676e-002}, {54,3.7505001142879649e-002}, {56,3.0303355052390520e-002}, {62,1.7900520118770351e-002}, {72,9.8986911293379842e-003}, {74,7.9696787836712538e-003}, {78,4.7689471878983071e-003}, {86,2.3683984910685975e-003}, {96,1.1109682213006544e-003}, {98,8.6091106538089299e-004}, {104,2.6077389117346549e-004}, {114,6.0728166437656346e-005}, {128,3.5722450845680202e-006}}; FriedmanValues FriedmanData3_9[30]={ {29,0.0}, {0,9.9999999999272471e-001}, {2,9.7116007467667176e-001}, {6,8.1354904930058936e-001}, {8,6.8541976260741999e-001}, {14,5.6899315081128488e-001}, {18,3.9765398757522002e-001}, {24,3.2846317253228491e-001}, {26,2.7805164989890679e-001}, {32,1.8698083371301244e-001}, {38,1.5397328913163394e-001}, {42,1.0656245236929024e-001}, {50,6.8903844687808399e-002}, {54,5.6954684879939231e-002}, {56,4.7552535817364745e-002}, {62,3.0748694939572049e-002}, {72,1.8960286160508297e-002}, {74,1.5816710486091297e-002}, {78,1.0265441624677638e-002}, {86,6.0216144642146873e-003}, {96,3.5353318853576050e-003}, {98,2.9351947111507229e-003}, {104,1.3437595259771160e-003}, {114,6.5788846974067922e-004}, {122,3.4710314738354382e-004}, {126,1.9706885383182336e-004}, {128,9.7045991464009691e-005}, {134,5.4179050449232402e-005}, {146,1.1312109434455116e-005}, {162,5.9537418076079556e-007}}; FriedmanValues FriedmanData3_10[36]={ {35,0.0}, {0,9.9999999999181532e-001}, {2,9.7373149576249218e-001}, {6,8.3024036445746330e-001}, {8,7.1033795819415568e-001}, {14,6.0127136202068465e-001}, {18,4.3615028672863576e-001}, {24,3.6750959742878603e-001}, {26,3.1587279473144919e-001}, {32,2.2226806603232199e-001}, {38,1.8728983291265705e-001}, {42,1.3519459209613477e-001}, {50,9.2363373532242055e-002}, {54,7.8097017412864844e-002}, {56,6.6469359662617078e-002}, {62,4.5559818434316945e-002}, {72,3.0330146890469645e-002}, {74,2.5869305841123437e-002}, {78,1.7927014269781640e-002}, {86,1.1532695568416507e-002}, {96,7.4662899138239697e-003}, {98,6.3410327121870896e-003}, {104,3.3552311956744135e-003}, {114,1.9828937090220272e-003}, {122,1.2505834666869144e-003}, {126,8.3382154015473637e-004}, {128,5.1231948254419895e-004}, {134,3.6843738886047078e-004}, {146,1.8387139282479190e-004}, {150,1.1044191053102719e-004}, {152,8.5436194939096495e-005}, {158,4.3760002285878695e-005}, {162,1.9945035055468524e-005}, {168,1.1014422344064706e-005}, {182,2.0838096326608903e-006}, {200,9.9229030126709059e-008}}; FriedmanValues FriedmanData3_11[41]={ {40,0.0}, {0,9.9999999999090616e-001}, {2,9.7608481144008974e-001}, {6,8.4384069532586281e-001}, {8,7.3213460695112298e-001}, {14,6.2929165554729261e-001}, {18,4.6975519007091993e-001}, {24,4.0262675119026226e-001}, {26,3.5082324372235962e-001}, {32,2.5573007957141825e-001}, {38,2.1917291412441037e-001}, {42,1.6317797242395937e-001}, {50,1.1645657896302165e-001}, {54,1.0020658491691123e-001}, {56,8.6715405980896137e-002}, {62,6.2090729864674406e-002}, {72,4.3481416783758435e-002}, {74,3.7721469271998591e-002}, {78,2.7264714077255496e-002}, {86,1.8679914535851064e-002}, {96,1.2905777272783112e-002}, {98,1.1181176729182476e-002}, {104,6.4976491980645052e-003}, {114,4.2163737954535371e-003}, {122,2.8865394100399669e-003}, {126,2.0417034475419338e-003}, {128,1.3704190587353574e-003}, {134,1.0684320437166807e-003}, {146,6.4637790224479521e-004}, {150,4.4080842816581649e-004}, {152,3.6440207496831996e-004}, {158,2.2905367787561185e-004}, {162,1.3627453470722322e-004}, {168,9.9708637105564162e-005}, {182,5.2409466078542520e-005}, {186,2.0391565691020172e-005}, {194,9.4763723770921001e-006}, {200,4.0187757201280633e-006}, {206,2.1995768344733844e-006}, {222,3.8037794881870556e-007}, {242,1.6538171687769809e-008}}; FriedmanValues FriedmanData3_12[48]={ {47,0.0}, {0,9.9999999998999733e-001}, {2,9.7795931397097957e-001}, {6,8.5558689868998039e-001}, {8,7.5063513193799447e-001}, {14,6.5358159906795987e-001}, {18,4.9998299875450369e-001}, {24,4.3431137434153799e-001}, {26,3.8254061245362425e-001}, {32,2.8700210841556140e-001}, {38,2.4946994332582095e-001}, {42,1.9063268528647653e-001}, {50,1.4064328294739420e-001}, {54,1.2270197969730692e-001}, {56,1.0752258419541807e-001}, {62,7.9630990720363018e-002}, {72,5.8010175804153949e-002}, {74,5.0976728432479364e-002}, {78,3.8107715515369865e-002}, {86,2.7297308057265331e-002}, {96,1.9720708538297611e-002}, {98,1.7317728730238527e-002}, {104,1.0742052438157101e-002}, {114,7.4256528696116358e-003}, {122,5.3554045377384920e-003}, {126,3.9604428322197512e-003}, {128,2.8116793758927211e-003}, {134,2.2884777763789109e-003}, {146,1.5171374488620283e-003}, {150,1.1016324233788773e-003}, {152,9.3572148500732145e-004}, {158,6.3773670753735582e-004}, {162,4.2234355947603759e-004}, {168,3.3465817318756178e-004}, {182,2.1058880918602545e-004}, {186,1.0289223515536635e-004}, {194,6.1414500562477365e-005}, {200,3.5945716163335004e-005}, {206,2.6998565280259672e-005}, {216,1.5355692412080310e-005}, {218,1.2808813972166074e-005}, {222,8.4427366465988140e-006}, {224,4.7381861885417437e-006}, {234,2.0093878600622055e-006}, {242,7.9658860296018837e-007}, {248,4.3274882582958331e-007}, {266,6.8909048698978246e-008}, {288,2.7563619479591295e-009}}; FriedmanValues FriedmanData3_13[54]={ {53,0.0}, {0,9.9999999998908484e-001}, {2,9.7960459744227024e-001}, {6,8.6561359526735571e-001}, {8,7.6687184583152523e-001}, {14,6.7494748357971035e-001}, {18,5.2694207088029221e-001}, {24,4.6298827049513486e-001}, {26,4.1165921009670442e-001}, {32,3.1626348285127098e-001}, {38,2.7807334384460614e-001}, {42,2.1704716506613686e-001}, {50,1.6457464720813031e-001}, {54,1.4521200892203023e-001}, {56,1.2861236485012723e-001}, {62,9.7864750404550685e-002}, {72,7.3495166398784020e-002}, {74,6.5272993835268397e-002}, {78,5.0086806657553634e-002}, {86,3.7144176825549852e-002}, {96,2.7765276757253286e-002}, {98,2.4657721220783621e-002}, {104,1.6066220963499342e-002}, {114,1.1606434682004068e-002}, {122,8.6872875101250326e-003}, {126,6.6271458387296197e-003}, {128,4.8975728181780108e-003}, {134,4.1029467449254942e-003}, {146,2.8878835958779958e-003}, {150,2.1807609890253103e-003}, {152,1.8898710872096570e-003}, {158,1.3590692790184920e-003}, {162,9.5755187163428402e-004}, {168,7.9039230130045518e-004}, {182,5.4128333389192815e-004}, {186,2.9439599421345416e-004}, {194,1.9467357529833184e-004}, {200,1.2858612244680804e-004}, {206,1.0407655200557781e-004}, {216,6.9056054669473048e-005}, {218,5.9596220464085942e-005}, {222,4.2647350846100721e-005}, {224,2.8314268716726327e-005}, {234,1.6226702787620590e-005}, {242,9.5259868921380598e-006}, {248,7.4058851605014309e-006}, {254,4.6348226154890477e-006}, {258,3.0581835812578634e-006}, {266,1.8757043055844760e-006}, {278,4.1850762243141263e-007}, {288,1.5573445005954872e-007}, {294,8.4069039412676734e-008}, {314,1.2403628765804764e-008}, {338,4.5939365799276903e-010}}; FriedmanValues FriedmanData3_14[61]={ {60,0.0}, {0,9.9999999998817579e-001}, {2,9.8100149962570726e-001}, {6,8.7437445283343873e-001}, {8,7.8106842924137743e-001}, {14,6.9382947688626484e-001}, {18,5.5127962940517483e-001}, {24,4.8902702253800956e-001}, {26,4.3828913608416886e-001}, {32,3.4354745126485514e-001}, {38,3.0501667063577392e-001}, {42,2.4243342942447205e-001}, {50,1.8799265291439227e-001}, {54,1.6745025067541866e-001}, {56,1.4962358727514144e-001}, {62,1.1642418964254377e-001}, {72,8.9638975658715633e-002}, {74,8.0309247020307631e-002}, {78,6.2973400110491864e-002}, {86,4.7995679649539061e-002}, {96,3.6850681089741336e-002}, {98,3.3022251150401680e-002}, {104,2.2370871994904045e-002}, {114,1.6719277990121319e-002}, {122,1.2871840791313443e-002}, {126,1.0064897764039743e-002}, {128,7.6663042466315499e-003}, {134,6.5561911100657016e-003}, {146,4.8118152008053980e-003}, {150,3.7398838024674873e-003}, {152,3.2876949683446496e-003}, {158,2.4552076605069769e-003}, {162,1.8068148576799923e-003}, {168,1.5316555135015775e-003}, {182,1.1067373588357007e-003}, {186,6.4685643730343881e-004}, {194,4.5525099911579566e-004}, {200,3.2122473697115917e-004}, {206,2.6983964218447304e-004}, {216,1.9255645962529711e-004}, {218,1.6910395399112957e-004}, {222,1.2649090453819770e-004}, {224,9.0399407454125249e-005}, {234,5.8516262539701412e-005}, {242,3.9035215078877757e-005}, {248,3.2416118123304625e-005}, {254,2.2884618507279318e-005}, {258,1.6446675784174505e-005}, {266,1.1235007865470611e-005}, {278,4.2675373859199479e-006}, {288,2.5674745889095865e-006}, {294,2.0786797368057247e-006}, {296,1.1748992803154388e-006}, {302,7.1504622866509505e-007}, {312,4.0847752756486583e-007}, {314,2.5519317701475122e-007}, {326,8.5830048434904326e-008}, {338,3.0090284598499019e-008}, {344,1.6155343639397691e-008}, {366,2.2204026802963654e-009}, {392,7.6565609665391909e-011}}; FriedmanValues FriedmanData3_15[68]={ {67,0.0}, {0,9.9999999998726674e-001}, {2,9.8222882552190482e-001}, {6,8.8204614297223205e-001}, {8,7.9366583534300361e-001}, {14,7.1065891062230468e-001}, {18,5.7326516548296902e-001}, {24,5.1275495460225773e-001}, {26,4.6277582568368553e-001}, {32,3.6900642349999641e-001}, {38,3.3034351176077614e-001}, {42,2.6666114511391259e-001}, {50,2.1075182788343827e-001}, {54,1.8923741125655830e-001}, {56,1.7038433029762290e-001}, {62,1.3508830931823285e-001}, {72,1.0617045016522728e-001}, {74,9.5832935315999970e-002}, {78,7.6512592561804718e-002}, {86,5.9643266572903572e-002}, {96,4.6805537981110409e-002}, {98,4.2265255517820136e-002}, {104,2.9555282962416361e-002}, {114,2.2686611214271967e-002}, {122,1.7863598752451051e-002}, {126,1.4247237712100760e-002}, {128,1.1116788062993890e-002}, {134,9.6589543539710616e-003}, {146,7.3184765078349277e-003}, {150,5.8153492639304322e-003}, {152,5.1707119276925111e-003}, {158,3.9743275716499545e-003}, {162,3.0199931400667680e-003}, {168,2.6091736619166354e-003}, {182,1.9579241961936271e-003}, {186,1.2063083182127826e-003}, {194,8.8667560996368662e-004}, {200,6.5441498152807645e-004}, {206,5.6285545195638444e-004}, {216,4.2026616859250978e-004}, {218,3.7402538950993396e-004}, {222,2.8895257495469771e-004}, {224,2.1596832168147088e-004}, {234,1.4991670153539064e-004}, {242,1.0695063357820062e-004}, {248,9.1690533329829394e-005}, {254,6.8558531337742227e-005}, {258,5.1533019544512834e-005}, {266,3.7354217118640126e-005}, {278,1.7456729306864490e-005}, {288,1.1917590275626749e-005}, {294,1.0184655310201620e-005}, {296,6.5240535121025603e-006}, {302,4.4437658974957531e-006}, {312,2.9109223919960006e-006}, {314,2.0051512296552375e-006}, {326,1.1288578270356236e-006}, {338,7.1080959826296373e-007}, {342,4.3651330163694659e-007}, {344,3.0877634284530061e-007}, {350,1.6406734057784145e-007}, {362,8.7425165302853831e-008}, {366,5.2587812905132195e-008}, {378,1.7367632459083942e-008}, {392,5.7551816598433931e-009}, {398,3.0753853215571124e-009}, {422,3.9558898327083187e-010}, {450,1.2760934944220384e-011}}; FriedmanValues FriedmanData3_16[76]={ {75,0.0}, {0,9.9999999998635813e-001}, {2,9.8330288622809447e-001}, {6,8.8884289424973484e-001}, {8,8.0488073430313123e-001}, {14,7.2573952533184038e-001}, {18,5.9325347672838635e-001}, {24,5.3444797943128242e-001}, {26,4.8530706043634564e-001}, {32,3.9275873842081621e-001}, {38,3.5414151393389220e-001}, {42,2.8975459280137866e-001}, {50,2.3275120851890571e-001}, {54,2.1044660802360474e-001}, {56,1.9073015296021453e-001}, {62,1.5366259067836310e-001}, {72,1.2289321472126220e-001}, {74,1.1164176183894942e-001}, {78,9.0517815805621585e-002}, {86,7.1899168662359694e-002}, {96,5.7460614513231908e-002}, {98,5.2225953941955006e-002}, {104,3.7502319655444608e-002}, {114,2.9423610626968182e-002}, {122,2.3599760844883043e-002}, {126,1.9135711798603690e-002}, {128,1.5227796956040417e-002}, {134,1.3398518271686257e-002}, {146,1.0410044104975162e-002}, {150,8.4218332716788826e-003}, {152,7.5573095345778081e-003}, {158,5.9432346132486753e-003}, {162,4.6314921709676550e-003}, {168,4.0598689485912502e-003}, {182,3.1348675677277862e-003}, {186,2.0128756681597306e-003}, {194,1.5281255219966737e-003}, {200,1.1653215924932641e-003}, {206,1.0192744785876868e-003}, {216,7.8597260039729006e-004}, {218,7.0655670830289887e-004}, {222,5.5926217047007538e-004}, {224,4.3148090571241922e-004}, {234,3.1416418610473164e-004}, {242,2.3427052460602929e-004}, {248,2.0487303967299604e-004}, {254,1.5875672224261803e-004}, {258,1.2323368227392590e-004}, {266,9.2974953334218027e-005}, {278,4.8864314585471156e-005}, {288,3.5577288829962458e-005}, {294,3.1184847412816349e-005}, {296,2.1270111398563894e-005}, {302,1.5382045869506702e-005}, {312,1.0855623142736369e-005}, {314,7.9571554232485631e-006}, {326,5.2096410568607827e-006}, {338,3.6851346955259734e-006}, {342,2.4653594606588697e-006}, {344,1.8230250393071763e-006}, {350,1.1805545013160780e-006}, {362,7.4702300481149146e-007}, {366,5.1167733528043033e-007}, {378,3.0341887699094294e-007}, {384,2.0337314702834607e-007}, {386,1.7600094157301825e-007}, {392,1.2733924298576874e-007}, {398,6.8996248420846193e-008}, {402,3.7008838160696171e-008}, {416,1.8428916881928186e-008}, {422,1.0687283015774856e-008}, {434,3.4731011273154910e-009}, {450,1.0910599377298511e-009}, {456,5.8062253996149965e-010}, {482,7.0185142193148307e-011}, {512,2.1268224907014639e-012}}; FriedmanValues FriedmanData3_17[84]={ {83,0.0}, {0,9.9999999998544897e-001}, {2,9.8425666798906997e-001}, {6,8.9489530209401802e-001}, {8,8.1494722701029820e-001}, {14,7.3933458404834618e-001}, {18,6.1147892720865349e-001}, {24,5.5434679319583902e-001}, {26,5.0610991123729998e-001}, {32,4.1494263864132119e-001}, {38,3.7649900462628827e-001}, {42,3.1171218165484360e-001}, {50,2.5394287642965530e-001}, {54,2.3100263682820771e-001}, {56,2.1057289858694417e-001}, {62,1.7201703447440297e-001}, {72,1.3964365870577547e-001}, {74,1.2757334556075825e-001}, {78,1.0481890010317124e-001}, {86,8.4603494525230416e-002}, {96,6.8668130489773382e-002}, {98,6.2767750306865738e-002}, {104,4.6100129851157155e-002}, {114,3.6834842167562241e-002}, {122,3.0006308486968610e-002}, {126,2.4673192912840373e-002}, {128,1.9961303642353347e-002}, {134,1.7745798291289128e-002}, {146,1.4073226906364870e-002}, {150,1.1556296819688542e-002}, {152,1.0450019404651933e-002}, {158,8.3738453256361461e-003}, {162,6.6600087611154660e-003}, {168,5.9056774263650047e-003}, {182,4.6645133218772882e-003}, {186,3.0973174192112309e-003}, {194,2.4118552403499765e-003}, {200,1.8865208689163996e-003}, {206,1.6713119774136021e-003}, {216,1.3206373222465083e-003}, {218,1.1969109721768365e-003}, {222,9.6587414859619354e-004}, {224,7.6337297610311263e-004}, {234,5.7556241310733041e-004}, {242,4.4311437235321785e-004}, {248,3.9303619155474514e-004}, {254,3.1250033175140370e-004}, {258,2.4846374830603187e-004}, {266,1.9306188835557426e-004}, {278,1.0987704845395998e-004}, {288,8.3377316628081743e-005}, {294,7.4238241283486385e-005}, {296,5.2778942643926622e-005}, {302,3.9753533069365976e-005}, {312,2.9422949378687675e-005}, {314,2.2444748370749604e-005}, {326,1.5866528943465769e-005}, {338,1.1888792390140177e-005}, {342,8.3540871404439017e-006}, {344,6.4025318375579384e-006}, {350,4.5166357986048507e-006}, {362,3.1241001907009938e-006}, {366,2.2936213802959622e-006}, {378,1.5669343432003885e-006}, {384,1.1595287341719493e-006}, {386,1.0216539215082011e-006}, {392,7.7003238839686045e-007}, {398,4.6998594293561257e-007}, {402,3.0983904514925880e-007}, {416,1.9139204699722052e-007}, {422,1.3199982000360590e-007}, {434,8.3599011641926453e-008}, {438,4.2983791477867751e-008}, {446,2.9196310211492925e-008}, {450,2.0422458496527127e-008}, {456,1.5161763065781837e-008}, {458,8.2198144561385699e-009}, {474,3.8328885986556706e-009}, {482,2.1456094227007099e-009}, {494,6.8731813491106498e-010}, {512,2.0523837035250471e-010}, {518,1.0882241744079264e-010}, {546,1.2406464529080594e-011}, {578,3.5447041511658845e-013}}; FriedmanValues FriedmanData3_18[92]={ {91,0.0}, {0,9.9999999998453970e-001}, {2,9.8510643900204453e-001}, {6,9.0032451951916004e-001}, {8,8.2402390709361262e-001}, {14,7.5164968927451203e-001}, {18,6.2816928969633723e-001}, {24,5.7265608862761164e-001}, {26,5.2535446322646873e-001}, {32,4.3568161572503383e-001}, {38,3.9751345715249703e-001}, {42,3.3257803960176308e-001}, {50,2.7430285915489055e-001}, {54,2.5086008779593422e-001}, {56,2.2984389903902452e-001}, {62,1.9005076045850811e-001}, {72,1.5630125305119594e-001}, {74,1.4350022494201195e-001}, {78,1.1928416107495422e-001}, {86,9.7618366364328149e-002}, {96,8.0295431780998142e-002}, {98,7.3762433074707048e-002}, {104,5.5240663051109647e-002}, {114,4.4828297191874152e-002}, {122,3.7005706793203898e-002}, {126,3.0798219238945119e-002}, {128,2.5269649823575002e-002}, {134,2.2660152431633704e-002}, {146,1.8280545533244305e-002}, {150,1.5202731886594956e-002}, {152,1.3837474183674167e-002}, {158,1.1264288353266745e-002}, {162,9.1121891217337634e-003}, {168,8.1567585104810880e-003}, {182,6.5627107769825619e-003}, {186,4.4818295024195995e-003}, {194,3.5624213414313329e-003}, {200,2.8438553236342129e-003}, {206,2.5452136525811629e-003}, {216,2.0507265047066555e-003}, {218,1.8711715094711250e-003}, {222,1.5341014345080389e-003}, {224,1.2360105456119936e-003}, {234,9.5750274911980487e-004}, {242,7.5546630151994204e-004}, {248,6.7735455570876613e-004}, {254,5.4929245254873552e-004}, {258,4.4512301795181708e-004}, {266,3.5385577334162634e-004}, {278,2.1353136877035416e-004}, {288,1.6690953115589108e-004}, {294,1.5029178369579629e-004}, {296,1.1018066228957883e-004}, {302,8.5499034035785057e-005}, {312,6.5480189732744479e-005}, {314,5.1414427922291012e-005}, {326,3.8148219505345413e-005}, {338,2.9643320091034564e-005}, {342,2.1572147840896659e-005}, {344,1.6989377079066013e-005}, {350,1.2609730626031932e-005}, {362,9.2097666705328649e-006}, {366,7.0541470033112205e-006}, {378,5.1626106311145159e-006}, {384,4.0064387317747720e-006}, {386,3.5773033773592456e-006}, {392,2.7848365563903764e-006}, {398,1.8272001690883088e-006}, {402,1.3107481173171926e-006}, {416,8.9640055967948668e-007}, {422,6.6543614447969037e-007}, {434,4.7796737603715070e-007}, {438,2.7889253726287421e-007}, {446,2.0086792736914217e-007}, {450,1.4634470599761856e-007}, {456,1.1976403297929510e-007}, {458,8.0769806023599991e-008}, {474,4.9386413350866252e-008}, {482,3.4779396484755146e-008}, {486,2.3751821870488099e-008}, {488,2.0879429939995954e-008}, {494,1.5709124465110094e-008}, {504,6.5978169149615840e-009}, {512,4.4043539862221278e-009}, {518,3.2824551223791452e-009}, {536,7.8769234079086302e-010}, {546,4.2613251737227137e-010}, {558,1.3475783614670056e-010}, {578,3.8341883235076130e-011}, {584,2.0263892064146552e-011}, {614,2.1859008932169751e-012}, {648,5.9078402519377711e-014}}; FriedmanValues FriedmanData3_19[101]={ {100,0.0}, {0,9.9999999998363065e-001}, {2,9.8586968006982945e-001}, {6,9.0521957214808024e-001}, {8,8.3225412645112251e-001}, {14,7.6285800228770562e-001}, {18,6.4350257553637369e-001}, {24,5.8955330495788161e-001}, {26,5.4320519418619972e-001}, {32,4.5509569957618112e-001}, {38,4.1727836618021730e-001}, {42,3.5239299744766572e-001}, {50,2.9383086896388833e-001}, {54,2.6999855654125909e-001}, {56,2.4850778654156064e-001}, {62,2.0769539629219408e-001}, {72,1.7277128841595485e-001}, {74,1.5932292740736459e-001}, {78,1.3380289583969063e-001}, {86,1.1082942456987270e-001}, {96,9.2229054570182142e-002}, {98,8.5100659779705698e-002}, {104,6.4825271562681475e-002}, {114,5.3314219341364134e-002}, {122,4.4520615812118851e-002}, {126,3.7445186988785094e-002}, {128,3.1099926539556684e-002}, {134,2.8094795313127970e-002}, {146,2.2996880932306483e-002}, {150,1.9335576579726430e-002}, {152,1.7698938316282085e-002}, {158,1.4602732322284814e-002}, {162,1.1983834979545385e-002}, {168,1.0812555348180137e-002}, {182,8.8351723447156801e-003}, {186,6.1800007380164151e-003}, {194,4.9969032134838925e-003}, {200,4.0568054604870254e-003}, {206,3.6612457397350393e-003}, {216,2.9974910281513490e-003}, {218,2.7507584105567751e-003}, {222,2.2854886066959630e-003}, {224,1.8707895948322801e-003}, {234,1.4810796877222001e-003}, {242,1.1917202877820654e-003}, {248,1.0777597519027716e-003}, {254,8.8800435861716414e-004}, {258,7.3087863262026207e-004}, {266,5.9181875340153759e-004}, {278,3.7377221185034084e-004}, {288,2.9886157209185185e-004}, {294,2.7143660867789444e-004}, {296,2.0386812207158072e-004}, {302,1.6190036686815871e-004}, {312,1.2724888918554930e-004}, {314,1.0214677890913663e-004}, {326,7.8426686867095194e-005}, {338,6.2549658982589756e-005}, {342,4.6750706426786538e-005}, {344,3.7612715761678048e-005}, {350,2.8909649425490758e-005}, {362,2.1932960942826674e-005}, {366,1.7304276100757443e-005}, {378,1.3214724159048457e-005}, {384,1.0565792268756894e-005}, {386,9.5328279052450309e-006}, {392,7.6082991991631299e-006}, {398,5.2438656775924426e-006}, {402,3.9505611675611019e-006}, {416,2.8680209262615377e-006}, {422,2.2216644472680806e-006}, {434,1.6915193215183095e-006}, {438,1.0589720843361297e-006}, {446,7.9700994027548424e-007}, {450,6.0492726675316077e-007}, {456,5.1584929452254297e-007}, {458,3.7788409190319077e-007}, {474,2.5827608498505807e-007}, {482,1.9576239151604039e-007}, {486,1.4848873999611512e-007}, {488,1.3211610599232480e-007}, {494,1.0201692024798296e-007}, {504,5.1773161119801188e-008}, {512,3.6659960500917801e-008}, {518,3.0340343783425715e-008}, {536,1.2952979137963466e-008}, {542,9.4418315194350026e-009}, {546,7.6226499634582996e-009}, {554,3.6658739547265736e-009}, {558,2.6735931060120081e-009}, {566,1.4714066931462837e-009}, {578,9.3710162076151734e-010}, {582,7.0119171310143668e-010}, {584,4.7220382493653691e-010}, {602,1.6015170282946748e-010}, {614,8.3822406774500873e-011}, {626,2.6201271517320197e-011}, {648,7.1189475035785435e-012}, {654,3.7514785599770750e-012}, {686,3.8400961637560600e-013}, {722,9.8464004198873348e-015}}; FriedmanValues FriedmanData3_20[111]={ {110,0.0}, {0,9.9999999998272171e-001}, {2,9.8655831532910909e-001}, {6,9.0965679018190593e-001}, {8,8.3974880836169219e-001}, {14,7.7310119225417129e-001}, {18,6.5763738829053486e-001}, {24,6.0519099180379399e-001}, {26,5.5979927678818486e-001}, {32,4.7329388454494070e-001}, {38,4.3588501686248848e-001}, {42,3.7121049292613484e-001}, {50,3.1253871740862782e-001}, {54,2.8841339561455465e-001}, {56,2.6654376385630923e-001}, {62,2.2490265586810426e-001}, {72,1.8898437139062169e-001}, {74,1.7496501604967768e-001}, {78,1.4828830452686009e-001}, {86,1.2414097146286031e-001}, {96,1.0437136472818441e-001}, {98,9.6686113584716307e-002}, {104,7.4764530305356403e-002}, {114,6.2210085955593415e-002}, {122,5.2476821471997302e-002}, {126,4.4549653497963880e-002}, {128,3.7397062625961701e-002}, {134,3.3999474415902786e-002}, {146,2.8181557599478910e-002}, {150,2.3923143161809515e-002}, {152,2.2006802757292946e-002}, {158,1.8369741377879317e-002}, {162,1.5263081527041974e-002}, {168,1.3864621644263046e-002}, {182,1.1479499554658219e-002}, {186,8.1980758083322648e-003}, {194,6.7253110732530550e-003}, {200,5.5382774250257475e-003}, {206,5.0334935623547626e-003}, {216,4.1768171359436767e-003}, {218,3.8520166126712152e-003}, {222,3.2372056323674071e-003}, {224,2.6854376043903712e-003}, {234,2.1644980461762897e-003}, {242,1.7700011472644814e-003}, {248,1.6121716057908657e-003}, {254,1.3459673974944610e-003}, {258,1.1223658133213766e-003}, {266,9.2278620355620909e-004}, {278,6.0462839629229180e-004}, {288,4.9228592063474668e-004}, {294,4.5023160323905554e-004}, {296,3.4493152286652203e-004}, {302,2.7907428819162316e-004}, {312,2.2390805276090674e-004}, {314,1.8294180152950981e-004}, {326,1.4413388835955856e-004}, {338,1.1726699387218214e-004}, {342,8.9548677891186683e-005}, {344,7.3295117589256876e-005}, {350,5.7822310574348584e-005}, {362,4.5129562819577091e-005}, {366,3.6407286943890563e-005}, {378,2.8645360828068068e-005}, {384,2.3399439133455121e-005}, {386,2.1286570009617732e-005}, {392,1.7324528277230390e-005}, {398,1.2385146345145162e-005}, {402,9.6456879097349009e-006}, {416,7.2928373588426945e-006}, {422,5.8146092271828624e-006}, {434,4.5866504520032246e-006}, {438,3.0138641042098298e-006}, {446,2.3423359195846340e-006}, {450,1.8329650839116196e-006}, {456,1.6005502348519926e-006}, {458,1.2282110645743964e-006}, {474,8.9376153236052160e-007}, {482,7.0516456335821291e-007}, {486,5.6005284331423851e-007}, {488,5.0382359522046413e-007}, {494,3.9935847253644234e-007}, {504,2.2547235397477942e-007}, {512,1.6803455869346923e-007}, {518,1.4485857729451311e-007}, {536,7.5249252598174458e-008}, {542,5.8743042326302931e-008}, {546,4.7717699562817776e-008}, {554,2.6671018665327727e-008}, {558,1.9928597513811804e-008}, {566,1.3238559212529634e-008}, {578,9.1676634229351161e-009}, {582,7.6928367467109991e-009}, {584,5.6573888519137399e-009}, {600,3.4828769618530649e-009}, {602,3.1796800358572232e-009}, {608,1.8015121904215788e-009}, {614,1.3880618367908854e-009}, {618,8.4427796293573525e-010}, {626,5.8984697608607786e-010}, {632,3.2419109275775910e-010}, {648,1.9697559933293040e-010}, {650,1.4798975724403545e-010}, {654,9.7103559874103983e-011}, {672,3.2248602441838355e-011}, {686,1.6346665763734765e-011}, {698,5.0561266156075506e-012}, {722,1.3144944560537643e-012}, {728,6.9088909612813334e-013}, {762,6.7283736202502287e-014}, {800,1.6410667366463973e-015}}; FriedmanValues FriedmanData3_21[120]={ {119,0.0}, {0,9.9999999998181288e-001}, {2,9.8718307912395731e-001}, {6,9.1369695613001900e-001}, {8,8.4660327505123267e-001}, {14,7.8249866017828962e-001}, {18,6.7070589100054956e-001}, {24,6.1970161100112031e-001}, {26,5.7526099097728844e-001}, {32,4.9037698067951535e-001}, {38,4.5341883300595476e-001}, {42,3.8908291746717671e-001}, {50,3.3044830286750726e-001}, {54,3.0611192236446505e-001}, {56,2.8394653178992246e-001}, {62,2.4164188311751897e-001}, {72,2.0488868685514869e-001}, {74,1.9036849952734786e-001}, {78,1.6267040107784689e-001}, {86,1.3747476317926119e-001}, {96,1.1664012001627436e-001}, {98,1.0843719471368873e-001}, {104,8.4979100573905564e-002}, {114,7.1440036525683648e-002}, {122,6.0804806412367490e-002}, {126,5.2049193805687788e-002}, {128,4.4106373357498563e-002}, {134,4.0323365063385845e-002}, {146,3.3791615716146313e-002}, {150,2.8929915237386271e-002}, {152,2.6729273603640476e-002}, {158,2.2540692821973449e-002}, {162,1.8931944565184891e-002}, {168,1.7298179597238787e-002}, {182,1.4486762184432133e-002}, {186,1.0535927539106291e-002}, {194,8.7515732281019318e-003}, {200,7.2954633015935291e-003}, {206,6.6704865100081284e-003}, {216,5.5994151482918328e-003}, {218,5.1864096460394393e-003}, {222,4.4020584822374543e-003}, {224,3.6938468747021130e-003}, {234,3.0225994122663516e-003}, {242,2.5056002090772622e-003}, {248,2.2959393569146696e-003}, {254,1.9384361298188236e-003}, {258,1.6345532366801290e-003}, {266,1.3613574874924575e-003}, {278,9.1962156664631171e-004}, {288,7.6000326932237688e-004}, {294,6.9911372722361695e-004}, {296,5.4463215299512175e-004}, {302,4.4749460032729389e-004}, {312,3.6513654931751954e-004}, {314,3.0270496072807180e-004}, {326,2.4341151279906923e-004}, {338,2.0122378610565550e-004}, {342,1.5641981814654290e-004}, {344,1.2986676569497516e-004}, {350,1.0456697526337548e-004}, {362,8.3446341006271059e-005}, {366,6.8512525364499663e-005}, {378,5.5131954866502427e-005}, {384,4.5784899849710046e-005}, {386,4.1933302368201196e-005}, {392,3.4673135361035062e-005}, {398,2.5505586674930242e-005}, {402,2.0358316853840770e-005}, {416,1.5858366140157425e-005}, {422,1.2917239343798126e-005}, {434,1.0444378560532992e-005}, {438,7.1175186420746267e-006}, {446,5.6688098055362317e-006}, {450,4.5417229389577487e-006}, {456,4.0295568961935604e-006}, {458,3.1893097870198089e-006}, {474,2.4192982582250381e-006}, {482,1.9600152491603277e-006}, {486,1.6001520524348026e-006}, {488,1.4525502761887792e-006}, {494,1.1761958193058274e-006}, {504,7.1257267283737903e-007}, {512,5.5059907959806944e-007}, {518,4.8548632371006972e-007}, {536,2.8026122958821066e-007}, {542,2.2659499952377949e-007}, {546,1.8684863886145166e-007}, {554,1.1351919639054330e-007}, {558,8.7657346706411012e-008}, {566,6.3313872139469605e-008}, {578,4.6616838627476020e-008}, {582,4.0709523516910084e-008}, {584,3.1515023729638944e-008}, {600,2.2304372563545745e-008}, {602,2.0374937579937600e-008}, {608,1.2544792779378514e-008}, {614,9.7248493417973728e-009}, {618,6.8959456798341517e-009}, {626,5.0036152151415447e-009}, {632,3.3742903109973336e-009}, {648,2.3056801662297438e-009}, {650,1.9672593837988313e-009}, {654,1.4663483784390236e-009}, {662,9.6641380778751953e-010}, {666,7.7347030942670464e-010}, {672,6.1268406079269224e-010}, {674,4.2148665743966757e-010}, {686,3.1017310069304364e-010}, {698,1.2847419161171973e-010}, {702,7.0634794478670028e-011}, {722,4.0951179346236970e-011}, {728,1.9762546176046275e-011}, {746,6.4370842744896428e-012}, {762,3.1631561348830560e-012}, {774,9.6904990798881679e-013}, {800,2.4151032140957523e-013}, {806,1.2663564984443188e-013}, {842,1.1760978279288491e-014}, {882,2.7351112277415093e-016}}; FriedmanValues FriedmanData3_22[131]={ {130,0.0}, {0,9.9999999998090383e-001}, {2,9.8775231281525855e-001}, {6,9.1739135478773481e-001}, {8,8.5289564730254308e-001}, {14,7.9115055824781910e-001}, {18,6.8282336301033508e-001}, {24,6.3320010600671073e-001}, {26,5.8969799017103508e-001}, {32,5.0643642438613901e-001}, {38,4.6995987681951984e-001}, {42,4.0606467510201577e-001}, {50,3.4758687058131382e-001}, {54,3.2310917960410257e-001}, {56,3.0071940249400919e-001}, {62,2.5789469517771657e-001}, {72,2.2044758184519536e-001}, {74,2.0549021700244152e-001}, {78,1.7689469337141345e-001}, {86,1.5076673077026032e-001}, {96,1.2896615723119570e-001}, {98,1.2028418455324386e-001}, {104,9.5399159060838956e-002}, {114,8.0936124730536241e-002}, {122,6.9440606083572609e-002}, {126,5.9885227296785200e-002}, {128,5.1174913954764027e-002}, {134,4.7016469840063191e-002}, {146,3.9783306380389342e-002}, {150,3.4318580578798989e-002}, {152,3.1832144475204473e-002}, {158,2.7087604121310886e-002}, {162,2.2968432083412094e-002}, {168,2.1094082587322122e-002}, {182,1.7843117456807625e-002}, {186,1.3188302766547685e-002}, {194,1.1074392629143660e-002}, {200,9.3304196278217923e-003}, {206,8.5757448211998231e-003}, {216,7.2713026896631359e-003}, {218,6.7608598079678291e-003}, {222,5.7886740323845097e-003}, {224,4.9061048038778815e-003}, {234,4.0668394385631286e-003}, {242,3.4108174196834204e-003}, {248,3.1416120823729880e-003}, {254,2.6782404013174664e-003}, {258,2.2803753273336470e-003}, {266,1.9204488337913694e-003}, {278,1.3312596743344036e-003}, {288,1.1141131547186317e-003}, {294,1.0299200657498671e-003}, {296,8.1394825994888001e-004}, {302,6.7755565273666229e-004}, {312,5.6071891684423441e-004}, {314,4.7058552298971900e-004}, {326,3.8477062901448117e-004}, {338,3.2230294885954113e-004}, {342,2.5435673376608995e-004}, {344,2.1373941625765994e-004}, {350,1.7498414894357342e-004}, {362,1.4217579200477790e-004}, {366,1.1842111166033266e-004}, {378,9.7004211320763143e-005}, {384,8.1638289547427870e-005}, {386,7.5195782455436395e-005}, {392,6.3000196618339272e-005}, {398,4.7429305196094013e-005}, {402,3.8591584346987048e-005}, {416,3.0763857960774823e-005}, {422,2.5481205099784892e-005}, {434,2.0991202828237522e-005}, {438,1.4725068429212983e-005}, {446,1.1957595728650122e-005}, {450,9.7607934149147954e-006}, {456,8.7621763823697322e-006}, {458,7.0942361869829838e-006}, {474,5.5459133335398333e-006}, {482,4.5812034809022953e-006}, {486,3.8126645164827791e-006}, {488,3.4864712697927685e-006}, {494,2.8721923541562714e-006}, {504,1.8317747321393662e-006}, {512,1.4539981648443685e-006}, {518,1.3011988483447324e-006}, {536,8.0445104276165854e-007}, {542,6.6532854638678638e-007}, {546,5.5646141425409283e-007}, {554,3.5754643179135662e-007}, {558,2.8348993476032746e-007}, {566,2.1505443282652392e-007}, {578,1.6496992864950699e-007}, {582,1.4711335786106251e-007}, {584,1.1766175510281636e-007}, {600,8.8850099355887808e-008}, {602,8.1598639542500451e-008}, {608,5.3136199606166530e-008}, {614,4.2125227481773459e-008}, {618,3.1928645301203093e-008}, {626,2.4158252287554558e-008}, {632,1.7730954423384367e-008}, {648,1.3001276734861675e-008}, {650,1.1523882199464076e-008}, {654,9.0645801349525025e-009}, {662,6.7548908426872361e-009}, {666,5.4578817703740486e-009}, {672,4.3422725683144539e-009}, {674,3.2650774564262083e-009}, {686,2.4422994734902704e-009}, {698,1.2517575231688009e-009}, {702,8.6212688853974126e-010}, {722,5.8808351312092083e-010}, {726,3.9076903350723169e-010}, {728,3.5861178378045847e-010}, {734,1.8650655084171707e-010}, {744,1.4115658327831888e-010}, {746,1.1200303270184863e-010}, {758,6.8520416744002168e-011}, {762,5.2971856436551377e-011}, {774,2.7657307979335618e-011}, {776,1.5231697671717234e-011}, {798,8.4292025372075084e-012}, {800,6.0283219014981935e-012}, {806,3.9844644513830798e-012}, {824,1.2746985876877716e-012}, {842,6.0778729999073989e-013}, {854,1.8457442268525508e-013}, {882,4.4172046327985229e-014}, {888,2.3111689874394746e-014}, {926,2.0513334208042677e-015}, {968,4.5585187128983718e-017}}; FriedmanValues FriedmanData3_23[140]={ {139,0.0}, {0,9.9999999997999456e-001}, {2,9.8827317364208456e-001}, {6,9.2078241646314152e-001}, {8,8.5869253489620134e-001}, {14,7.9914206402308618e-001}, {18,6.9408854739304648e-001}, {24,6.4578681445246988e-001}, {26,6.0320615399586131e-001}, {32,5.2155548028134757e-001}, {38,4.8558209390030804e-001}, {42,4.2220824969521020e-001}, {50,3.6398540548878400e-001}, {54,3.3942560044504033e-001}, {56,3.1687302833425668e-001}, {62,2.7365250166378008e-001}, {72,2.3563564172762419e-001}, {74,2.2029882683900054e-001}, {78,1.9091862565003714e-001}, {86,1.6396521462363073e-001}, {96,1.4129198436323376e-001}, {98,1.3216858162537676e-001}, {104,1.0596390509362072e-001}, {114,9.0637730827259205e-002}, {122,7.8326162772922009e-002}, {126,6.8003402097069510e-002}, {128,5.8552601600755982e-002}, {134,5.4030917362814679e-002}, {146,4.6113629147940011e-002}, {150,4.0051371060938021e-002}, {152,3.7280301099668955e-002}, {158,3.1980609909965610e-002}, {162,2.7347799005831654e-002}, {168,2.5230105874796148e-002}, {182,2.1531140792244014e-002}, {186,1.6145866498585393e-002}, {194,1.3688260305094159e-002}, {200,1.1640964168171276e-002}, {206,1.0748557813969007e-002}, {216,9.1943552933721421e-003}, {218,8.5782633806200954e-003}, {222,7.4018711371905003e-003}, {224,6.3287429819798525e-003}, {234,5.3053553455329706e-003}, {242,4.4949374970669935e-003}, {248,4.1588845151341904e-003}, {254,3.5756783882358854e-003}, {258,3.0705371991349502e-003}, {266,2.6110615408116654e-003}, {278,1.8507183277209961e-003}, {288,1.5656384508457065e-003}, {294,1.4535255781039536e-003}, {296,1.1632148333971905e-003}, {302,9.7921366352196593e-004}, {312,8.2018257002012466e-004}, {314,6.9562884253656114e-004}, {326,5.7676756190771171e-004}, {338,4.8854558219861132e-004}, {342,3.9062678812911512e-004}, {344,3.3167042201829412e-004}, {350,2.7532388661082567e-004}, {362,2.2707308872062598e-004}, {366,1.9142546672586030e-004}, {378,1.5910508741389759e-004}, {384,1.3539508385678354e-004}, {386,1.2531680421576675e-004}, {392,1.0617033258954004e-004}, {398,8.1487829424117944e-005}, {402,6.7344820805269047e-005}, {416,5.4690529360807291e-005}, {422,4.5919965855928858e-005}, {434,3.8393257431401923e-005}, {438,2.7582289668009510e-005}, {446,2.2755935620484291e-005}, {450,1.8861162096080757e-005}, {456,1.7086612326202135e-005}, {458,1.4080295592981005e-005}, {474,1.1264494654659084e-005}, {482,9.4469506517194107e-006}, {486,7.9777016579677422e-006}, {488,7.3398248867102103e-006}, {494,6.1329821315732533e-006}, {504,4.0696435719385664e-006}, {512,3.2985080551122314e-006}, {518,2.9838211869889632e-006}, {536,1.9381026580433819e-006}, {542,1.6296586772859257e-006}, {546,1.3797614601920110e-006}, {554,9.2398922116454667e-007}, {558,7.4817954423415210e-007}, {566,5.8669606346227230e-007}, {578,4.6354233231850040e-007}, {582,4.1894534328455672e-007}, {584,3.4286958178401175e-007}, {600,2.6918827032319099e-007}, {602,2.4857066340330349e-007}, {608,1.6864176678001597e-007}, {614,1.3645624694362205e-007}, {618,1.0752766877776870e-007}, {626,8.3990765672103328e-008}, {632,6.4666663615217924e-008}, {648,4.9573857778720847e-008}, {650,4.4773328538159119e-008}, {654,3.6344278057948469e-008}, {662,2.8575633221038329e-008}, {666,2.3478915275565600e-008}, {672,1.9016154538991538e-008}, {674,1.4955905017911459e-008}, {686,1.1541160436503929e-008}, {698,6.6421504619800072e-009}, {702,4.9782770003656045e-009}, {722,3.6700828730285162e-009}, {726,2.6631609055377037e-009}, {728,2.4371669005136415e-009}, {734,1.4478994150126549e-009}, {744,1.1101501327788917e-009}, {746,8.7670577594084956e-010}, {758,6.0951186359458709e-010}, {762,4.7168035503595588e-010}, {774,3.1386975546738943e-010}, {776,2.2223965459730952e-010}, {794,1.5343346431525830e-010}, {798,1.3288855476761627e-010}, {800,8.6871675916562929e-011}, {806,6.9833513254251447e-011}, {818,3.2170408650761903e-011}, {824,2.4720056836781833e-011}, {834,1.4978471957202114e-011}, {842,1.1253296050212079e-011}, {854,5.8904267104276635e-012}, {878,1.7193061128175635e-012}, {882,1.2080074589169706e-012}, {888,7.9648718211044410e-013}, {906,2.5058937117898389e-013}, {926,1.1603709383672256e-013}, {938,3.4956240996710575e-014}, {968,8.0457855282583128e-015}, {974,4.2014347470508475e-015}, {1014,3.5708396584338120e-016}, {1058,7.5975311881570463e-018}}; FriedmanValues FriedmanData3_24[152]={ {151,0.0}, {0,9.9999999997908595e-001}, {2,9.8875154044927238e-001}, {6,9.2390608938394114e-001}, {8,8.6405009392830279e-001}, {14,8.0654579894778178e-001}, {18,7.0458751861136859e-001}, {24,6.5754951067829326e-001}, {26,6.1586983825338926e-001}, {32,5.3580954415379300e-001}, {38,5.0035370150294856e-001}, {42,4.3756464251445576e-001}, {50,3.7967659461853992e-001}, {54,3.5508494371652138e-001}, {56,3.3242251503911896e-001}, {62,2.8891379757505570e-001}, {72,2.5043658890368387e-001}, {74,2.3477238688744217e-001}, {78,2.0470981217786210e-001}, {86,1.7702875351174208e-001}, {96,1.5357004071593228e-001}, {98,1.4404132045938550e-001}, {104,1.1662074536425865e-001}, {114,1.0049146907646572e-001}, {122,8.7409310239978250e-002}, {126,7.6354050667548579e-002}, {128,6.6192703179984019e-002}, {134,6.1321563825052793e-002}, {146,5.2741134343277200e-002}, {150,4.6091128581175943e-002}, {152,4.3038750635130678e-002}, {158,3.7189094967959031e-002}, {162,3.2043820415654074e-002}, {168,2.9682185888644259e-002}, {182,2.5530966830905267e-002}, {186,1.9396203164038183e-002}, {194,1.6584304177145900e-002}, {200,1.4221405812866872e-002}, {206,1.3184683687683618e-002}, {216,1.1366938382189242e-002}, {218,1.0638046841646084e-002}, {222,9.2431117893808819e-003}, {224,7.9650716902821585e-003}, {234,6.7432256066472900e-003}, {242,5.7643821534943268e-003}, {248,5.3546984578176256e-003}, {254,4.6385280142639679e-003}, {258,4.0134719077465249e-003}, {266,3.4421649488241488e-003}, {278,2.4876295185828415e-003}, {288,2.1242915899149818e-003}, {294,1.9796006130215925e-003}, {296,1.6018581234251456e-003}, {302,1.3617099822437627e-003}, {312,1.1525222920996212e-003}, {314,9.8650232690742300e-004}, {326,8.2772890454699895e-004}, {338,7.0788269894919134e-004}, {342,5.7252937686360977e-004}, {344,4.9053375513833796e-004}, {350,4.1203440178921370e-004}, {362,3.4416018331990140e-004}, {366,2.9313328938839487e-004}, {378,2.4663466728304395e-004}, {384,2.1187285591417791e-004}, {386,1.9692981131600986e-004}, {392,1.6845426370203017e-004}, {398,1.3143301386177921e-004}, {402,1.1004116345969574e-004}, {416,9.0744202104153316e-005}, {422,7.7063131951511204e-005}, {434,6.5221692123721201e-005}, {438,4.7809769991650175e-005}, {446,3.9969580125949357e-005}, {450,3.3554442717530622e-005}, {456,3.0622619855694394e-005}, {458,2.5597635649816216e-005}, {474,2.0859876876549929e-005}, {482,1.7710457145651312e-005}, {486,1.5131726505850052e-005}, {488,1.3993968379634561e-005}, {494,1.1833100624367606e-005}, {504,8.1064844082946756e-006}, {512,6.6816819517067958e-006}, {518,6.0947140725569535e-006}, {536,4.1116136875677043e-006}, {542,3.5021442773976645e-006}, {546,2.9963349258458081e-006}, {554,2.0725958364995622e-006}, {558,1.7070284014460265e-006}, {566,1.3716297603122404e-006}, {578,1.1083138752602681e-006}, {582,1.0113426256324057e-006}, {584,8.4225488446317392e-007}, {600,6.7918984931310606e-007}, {602,6.3022974948346220e-007}, {608,4.4138728759536174e-007}, {614,3.6332870991506117e-007}, {618,2.9394838891000438e-007}, {626,2.3529337601721915e-007}, {632,1.8699007722778812e-007}, {648,1.4786053733014101e-007}, {650,1.3510819915971010e-007}, {654,1.1205101336629868e-007}, {662,9.0918986179695443e-008}, {666,7.5846698691790675e-008}, {672,6.2476402684944708e-008}, {674,5.0561348737256899e-008}, {686,4.0056352679554553e-008}, {698,2.4810518615874597e-008}, {702,1.9463734039763617e-008}, {722,1.5022740017316789e-008}, {726,1.1395587366549282e-008}, {728,1.0472646814563743e-008}, {734,6.6860200087988534e-009}, {744,5.2591647523045745e-009}, {746,4.2285327513716012e-009}, {758,3.1455330040970679e-009}, {762,2.4963297989735906e-009}, {774,1.8321490032065427e-009}, {776,1.4092191592636899e-009}, {794,1.0552544054351153e-009}, {798,9.0353815031420465e-010}, {800,6.0641317124503497e-010}, {806,5.1864052689754182e-010}, {818,2.8149021590663131e-010}, {824,2.1692050018552942e-010}, {834,1.5179719795193414e-010}, {842,1.1586020684923940e-010}, {854,7.9429740900811949e-011}, {864,4.1263026345018918e-011}, {866,3.7838874753748356e-011}, {872,3.1517364123710407e-011}, {878,2.6550462914394875e-011}, {882,1.9876669958224785e-011}, {888,1.2817742951064982e-011}, {896,7.2581127485747311e-012}, {906,5.3955247950814067e-012}, {914,3.2426883576071831e-012}, {926,2.3661763794926779e-012}, {936,1.2422280056424988e-012}, {938,9.0136223637574663e-013}, {962,3.4777572388237470e-013}, {968,2.4013390200866346e-013}, {974,1.5797419974000786e-013}, {992,4.8934432127677033e-014}, {1014,2.2023976659249236e-014}, {1026,6.5857932849281469e-015}, {1058,1.4599922433228520e-015}, {1064,7.6101937401303916e-016}, {1106,6.2046504703226145e-017}, {1152,1.2662551980250234e-018}}; FriedmanValues FriedmanData3_25[163]={ {162,0.0}, {0,9.9999999997816957e-001}, {2,9.8919242480062430e-001}, {6,9.2679276726712445e-001}, {8,8.6901647186249120e-001}, {14,8.1342418348819279e-001}, {18,7.1439509748423569e-001}, {24,6.6856531213971526e-001}, {26,6.2776403990233565e-001}, {32,5.4926696769599603e-001}, {38,5.1433730089092711e-001}, {42,4.5218224744887053e-001}, {50,3.9469386972738146e-001}, {54,3.7011298618834165e-001}, {56,3.4738626099467307e-001}, {62,3.0368245994699894e-001}, {72,2.6484108617062962e-001}, {74,2.4889639918018730e-001}, {78,2.1824395347534087e-001}, {86,1.8992453423366629e-001}, {96,1.6576133329346532e-001}, {98,1.5586168999287520e-001}, {104,1.2732449495289283e-001}, {114,1.1045053948801782e-001}, {122,9.6643572457292951e-002}, {126,8.4892158348314498e-002}, {128,7.4052171501147748e-002}, {134,6.8846446717962501e-002}, {146,5.9626566387305922e-002}, {150,5.2401986285781278e-002}, {152,4.9073394046256831e-002}, {158,4.2682531598121735e-002}, {162,3.7029623423889900e-002}, {168,3.4425291305305764e-002}, {182,2.9821211482766879e-002}, {186,2.2924646415125007e-002}, {194,1.9751105095591356e-002}, {200,1.7063300522390742e-002}, {206,1.5877053223877054e-002}, {216,1.3784503742691176e-002}, {218,1.2936732183300898e-002}, {222,1.1310977280866226e-002}, {224,9.8155777280681047e-003}, {234,8.3827654298981556e-003}, {242,7.2229339133749694e-003}, {248,6.7334343037252567e-003}, {254,5.8721776912187534e-003}, {258,5.1154014486599220e-003}, {266,4.4207074407841013e-003}, {278,3.2499901371565690e-003}, {288,2.7983402250042213e-003}, {294,2.6164628840559625e-003}, {296,2.1382183992045578e-003}, {302,1.8333741752296017e-003}, {312,1.5659848620621386e-003}, {314,1.3512742103412795e-003}, {326,1.1455279170536781e-003}, {338,9.8791551965152430e-004}, {342,8.0718433159313735e-004}, {344,6.9711800531426752e-004}, {350,5.9156794802456975e-004}, {362,4.9954317444866891e-004}, {366,4.2929646909267184e-004}, {378,3.6499138754921868e-004}, {384,3.1612577690057035e-004}, {386,2.9492077182645437e-004}, {392,2.5440445637225949e-004}, {398,2.0133245101213679e-004}, {402,1.7043670079283109e-004}, {416,1.4237726948579068e-004}, {422,1.2209041354929685e-004}, {434,1.0439752779218190e-004}, {438,7.7866186393267536e-005}, {446,6.5835146460346423e-005}, {450,5.5873351860697498e-005}, {456,5.1305538680744777e-005}, {458,4.3399684863826934e-005}, {474,3.5907559848388718e-005}, {482,3.0801056855039000e-005}, {486,2.6572490689686900e-005}, {488,2.4684105893039427e-005}, {494,2.1085975527772781e-005}, {504,1.4831649232150021e-005}, {512,1.2395535143823661e-005}, {518,1.1382672671932532e-005}, {536,7.9155472093245512e-006}, {542,6.8134408678084099e-006}, {546,5.8823171579411780e-006}, {554,4.1774530745904989e-006}, {558,3.4893752444123809e-006}, {566,2.8573832297731895e-006}, {578,2.3502830340766872e-006}, {582,2.1604912643414741e-006}, {584,1.8243856342848301e-006}, {600,1.5007846735167268e-006}, {602,1.3985477851701639e-006}, {608,1.0049559430623512e-006}, {614,8.3916820301078623e-007}, {618,6.9229273109460651e-007}, {626,5.6498210537352277e-007}, {632,4.5945538656658982e-007}, {648,3.7181469664735481e-007}, {650,3.4255188293593509e-007}, {654,2.8867914053972131e-007}, {662,2.3932757571236911e-007}, {666,2.0224765135609123e-007}, {672,1.6902538496241107e-007}, {674,1.3961648592130576e-007}, {686,1.1297837018409634e-007}, {698,7.3698267569589613e-008}, {702,5.9546309989432386e-008}, {722,4.7406715201327139e-008}, {726,3.6993668587733994e-008}, {728,3.4167802823951758e-008}, {734,2.2890947336047867e-008}, {744,1.8412897072779553e-008}, {746,1.5074183265237361e-008}, {758,1.1694929516673060e-008}, {762,9.4926931716623812e-009}, {774,7.3431375380954490e-009}, {776,5.8915747556271799e-009}, {794,4.6134562659040705e-009}, {798,3.9678218220927499e-009}, {800,2.7500800263431760e-009}, {806,2.4215538464478682e-009}, {818,1.4435636280539482e-009}, {824,1.1401829485922554e-009}, {834,8.5664072097438232e-010}, {842,6.7540360883316364e-010}, {854,5.1011739734805843e-010}, {864,3.1058394225593329e-010}, {866,2.8424431463079929e-010}, {872,2.3501429633144176e-010}, {878,1.9487772090266615e-010}, {882,1.5321990868749128e-010}, {888,1.0386216744715969e-010}, {896,7.0987143493984950e-011}, {906,5.3538062448202900e-011}, {914,3.7920387399576077e-011}, {926,2.8739330221417506e-011}, {936,2.0443628125590571e-011}, {938,1.6342987292310090e-011}, {942,9.3022918274979047e-012}, {950,7.4208898542740489e-012}, {962,6.0411950739098884e-012}, {968,3.6464848997871085e-012}, {974,2.8318607223917566e-012}, {978,1.6221227147063580e-012}, {992,1.1656060594388045e-012}, {998,6.9574096395874974e-013}, {1014,4.9284467272872604e-013}, {1022,2.5960046525273034e-013}, {1026,1.8484920006272162e-013}, {1050,6.9809915322253622e-014}, {1058,4.7384535765250999e-014}, {1064,3.1107880407319250e-014}, {1082,9.4971250277119806e-015}, {1106,4.1577489427113555e-015}, {1118,1.2348098606062708e-015}, {1152,2.6401420878797552e-016}, {1158,1.3738868898558918e-016}, {1202,1.0763169183202839e-017}, {1250,2.1104253300397725e-019}}; FriedmanValues FriedmanData3_26[174]={ {173,0.0}, {0,9.9999999997726075e-001}, {2,9.8960005705502019e-001}, {6,9.2946844950243546e-001}, {8,8.7363295319922729e-001}, {14,8.1983109991740222e-001}, {18,7.2357685976216291e-001}, {24,6.7890217419725951e-001}, {26,6.3895530558857028e-001}, {32,5.6198964459840017e-001}, {38,5.2759029146319991e-001}, {42,4.6610690824997980e-001}, {50,4.0907050805658879e-001}, {54,3.8453649050771616e-001}, {56,3.6178460714197397e-001}, {62,3.1796625376305160e-001}, {72,2.7884526376141999e-001}, {74,2.6266223702429364e-001}, {78,2.3150342104841223e-001}, {86,2.0262687608065313e-001}, {96,1.7783412710917548e-001}, {98,1.6759606832808963e-001}, {104,1.3803655370923737e-001}, {114,1.2047422916539170e-001}, {122,1.0598781737572148e-001}, {126,9.3577279482856865e-002}, {128,8.2091693916263461e-002}, {134,7.6566930346590151e-002}, {146,6.6733184106422094e-002}, {150,5.8949851621608186e-002}, {152,5.5351537004396677e-002}, {158,4.8431095991880523e-002}, {162,4.2278403435014190e-002}, {168,3.9434152417568390e-002}, {182,3.4379706320528607e-002}, {186,2.6714995452810381e-002}, {194,2.3175369862422388e-002}, {200,2.0156082760394569e-002}, {206,1.8816385226645999e-002}, {216,1.6440164226809148e-002}, {218,1.5468473844948594e-002}, {222,1.3601644156101302e-002}, {224,1.1878330691353710e-002}, {234,1.0223877913657468e-002}, {242,8.8720173763530592e-003}, {248,8.2971588514754030e-003}, {254,7.2798111756912183e-003}, {258,6.3804704764848013e-003}, {266,5.5516925886648213e-003}, {278,4.1441471395927817e-003}, {288,3.5945587796243888e-003}, {294,3.3710143373532108e-003}, {296,2.7794476555941640e-003}, {302,2.4014984916151793e-003}, {312,2.0679267699413263e-003}, {314,1.7972578618961732e-003}, {326,1.5374156952056206e-003}, {338,1.3357404331708590e-003}, {342,1.1013586979070162e-003}, {344,9.5795398124793544e-004}, {350,8.2021168655751348e-004}, {362,6.9924690201819554e-004}, {366,6.0565361525309787e-004}, {378,5.1962294428230401e-004}, {384,4.5330525530295709e-004}, {386,4.2429347471019521e-004}, {392,3.6873047073209642e-004}, {398,2.9546059484698492e-004}, {402,2.5252161872558619e-004}, {416,2.1330019641065226e-004}, {422,1.8445273924513374e-004}, {434,1.5912235090973967e-004}, {438,1.2049667921944321e-004}, {446,1.0287674546280136e-004}, {450,8.8135895673074264e-005}, {456,8.1354222281723390e-005}, {458,6.9518010573140149e-005}, {474,5.8255287030197892e-005}, {482,5.0411067929147857e-005}, {486,4.3850339048744052e-005}, {488,4.0892634415204473e-005}, {494,3.5241287622051925e-005}, {504,2.5348033023114979e-005}, {512,2.1433891529419228e-005}, {518,1.9792396464416394e-005}, {536,1.4112882497039700e-005}, {542,1.2255549358155922e-005}, {546,1.0664446768086129e-005}, {554,7.7422607461347969e-006}, {558,6.5441796717127854e-006}, {566,5.4414341695046384e-006}, {578,4.5412856366625899e-006}, {582,4.1993189645787907e-006}, {584,3.5866688216541917e-006}, {600,2.9969974591667592e-006}, {602,2.8032879723062286e-006}, {608,2.0578272102764303e-006}, {614,1.7392660547207915e-006}, {618,1.4569206090972033e-006}, {626,1.2078684477759767e-006}, {632,9.9986112243900061e-007}, {648,8.2392825827172084e-007}, {650,7.6385224458824690e-007}, {654,6.5190736435428126e-007}, {662,5.4918894379310859e-007}, {666,4.6921992156460177e-007}, {672,3.9699154409647583e-007}, {674,3.3310735407467006e-007}, {686,2.7423972197751890e-007}, {698,1.8602802655949074e-007}, {702,1.5351774202048224e-007}, {722,1.2503472603242410e-007}, {726,9.9588244823301509e-008}, {728,9.2411793779943396e-008}, {734,6.4162075147609067e-008}, {744,5.2571074231769197e-008}, {746,4.3715428120156542e-008}, {758,3.4918836276590493e-008}, {762,2.8867262739418934e-008}, {774,2.3089543714436160e-008}, {776,1.9023136533627271e-008}, {794,1.5339719442060166e-008}, {798,1.3289304858243562e-008}, {800,9.4722672509112159e-009}, {806,8.4867876571108378e-009}, {818,5.3855412256580255e-009}, {824,4.3502429174472704e-009}, {834,3.4099999845845806e-009}, {842,2.7592982301702738e-009}, {854,2.1886524448531563e-009}, {864,1.4412010339794505e-009}, {866,1.3250244621329831e-009}, {872,1.1062592215799856e-009}, {878,9.2380765216847198e-010}, {882,7.4942184944048185e-010}, {888,5.3111712339180190e-010}, {896,3.9451397692268429e-010}, {906,3.0725166366958423e-010}, {914,2.3429556143912912e-010}, {926,1.8474704126638256e-010}, {936,1.4424095146660710e-010}, {938,1.1982531947394268e-010}, {942,7.6165058323403642e-011}, {950,6.0674848743874648e-011}, {962,4.8785433496429149e-011}, {968,3.0504655635823458e-011}, {974,2.5596862410164314e-011}, {978,1.7865804611396543e-011}, {992,1.3249913985917699e-011}, {998,9.5601462323451361e-012}, {1014,7.2579852436977945e-012}, {1016,5.0268611716595257e-012}, {1022,4.3474660146626399e-012}, {1026,2.8275559823222369e-012}, {1032,1.7353475612677465e-012}, {1046,1.3616802249194594e-012}, {1050,1.1418759094204668e-012}, {1058,7.9481646389574179e-013}, {1064,6.1966347231702514e-013}, {1082,2.4942100454183426e-013}, {1086,1.4803757863703581e-013}, {1106,1.0176298590040579e-013}, {1112,5.3796535524195428e-014}, {1118,3.7600428066374918e-014}, {1142,1.3914421112250076e-014}, {1152,9.2869618385870762e-015}, {1158,6.0852355703866478e-015}, {1176,1.8327285303603729e-015}, {1202,7.8103324089150906e-016}, {1214,2.3049361979563430e-016}, {1250,4.7590091192353603e-017}, {1256,2.4727150116943522e-017}, {1302,1.8642090415334376e-018}, {1352,3.5173755500630894e-020}}; FriedmanValues FriedmanData3_27[186]={ {185,0.0}, {0,9.9999999997635181e-001}, {2,9.8997806538426347e-001}, {6,9.3195544562984056e-001}, {8,8.7793525199254641e-001}, {14,8.2581333101273646e-001}, {18,7.3219037956904476e-001}, {24,6.8862019497534521e-001}, {26,6.4950298091560921e-001}, {32,5.7403367455243837e-001}, {38,5.4016521383624627e-001}, {42,4.7938166354887379e-001}, {50,4.2283914205691020e-001}, {54,3.9838251371237421e-001}, {56,3.7563908828439097e-001}, {62,3.3177577143720294e-001}, {72,2.9244941542331404e-001}, {74,2.7606588434342916e-001}, {78,2.4447593713051544e-001}, {86,2.1511605087500971e-001}, {96,1.8976285342636731e-001}, {98,1.7921694700467997e-001}, {104,1.4872413407519711e-001}, {114,1.3052728037569630e-001}, {122,1.1540585715996253e-001}, {126,1.0237329117164028e-001}, {128,9.0275653353701843e-002}, {134,8.4447749145482712e-002}, {146,7.4026950305687303e-002}, {150,6.5702684539058212e-002}, {152,6.1842229793329172e-002}, {158,5.4406093058310949e-002}, {162,4.7763904456861454e-002}, {168,4.4683778642374342e-002}, {182,3.9184071861976560e-002}, {186,3.0750094194028074e-002}, {194,2.6842518742870230e-002}, {200,2.3487635649684677e-002}, {206,2.1991738265390245e-002}, {216,1.9325202236124751e-002}, {218,1.8225548909947716e-002}, {222,1.6109327695308595e-002}, {224,1.4149382207968998e-002}, {234,1.2264399637472636e-002}, {242,1.0710997715488304e-002}, {248,1.0045900003282506e-002}, {254,8.8626353534053855e-003}, {258,7.8109246605379823e-003}, {266,6.8383148825382403e-003}, {278,5.1748476927116049e-003}, {288,4.5182409085938128e-003}, {294,4.2487388645393804e-003}, {296,3.5314692895733902e-003}, {302,3.0722722939120128e-003}, {312,2.6647256143051360e-003}, {314,2.3309076090417078e-003}, {326,2.0099029643431557e-003}, {338,1.7578222571118399e-003}, {342,1.4613326009944353e-003}, {344,1.2791782205495948e-003}, {350,1.1039484755934687e-003}, {362,9.4907569742980322e-004}, {366,8.2779311025007486e-004}, {378,7.1589280506082484e-004}, {384,6.2853201473909743e-004}, {386,5.9004498049082955e-004}, {392,5.1618097605128286e-004}, {398,4.1819127871401893e-004}, {402,3.6042049207437438e-004}, {416,3.0738953951986892e-004}, {422,2.6778840521040270e-004}, {434,2.3280232867965646e-004}, {438,1.7867181774839378e-004}, {446,1.5385244704400566e-004}, {450,1.3289894067118385e-004}, {456,1.2322796156432697e-004}, {458,1.0622560916284608e-004}, {474,8.9992592678029730e-005}, {482,7.8470586171394869e-005}, {486,6.8747794907763878e-005}, {488,6.4331018921121822e-005}, {494,5.5871229575351094e-005}, {504,4.0966277449458868e-005}, {512,3.4989941518112978e-005}, {518,3.2463495743835716e-005}, {536,2.3643174060063109e-005}, {542,2.0687644586264082e-005}, {546,1.8127291811529335e-005}, {554,1.3410053810266285e-005}, {558,1.1450722598994684e-005}, {566,9.6427109652313813e-006}, {578,8.1460665018007038e-006}, {582,7.5696961307764326e-006}, {584,6.5277177111222469e-006}, {600,5.5244464913091418e-006}, {602,5.1844414385451619e-006}, {608,3.8754871687522089e-006}, {614,3.3096424571346547e-006}, {618,2.8070123089483789e-006}, {626,2.3578784886481558e-006}, {632,1.9798731857218444e-006}, {648,1.6556247863838798e-006}, {650,1.5426296334887661e-006}, {654,1.3302563026410115e-006}, {662,1.1348935986377491e-006}, {666,9.7880427778973837e-007}, {672,8.3687836772626041e-007}, {674,7.1112022540313141e-007}, {686,5.9387022472122095e-007}, {698,4.1550425587712629e-007}, {702,3.4848513783058813e-007}, {722,2.8888311916510511e-007}, {726,2.3378033109121214e-007}, {728,2.1784243407299451e-007}, {734,1.5555282129405212e-007}, {744,1.2941097950986034e-007}, {746,1.0904148484886173e-007}, {758,8.9012446985190751e-008}, {762,7.4692489989616880e-008}, {774,6.1168758159459331e-008}, {776,5.1349181256140547e-008}, {794,4.2296060844101243e-008}, {798,3.6913722561587555e-008}, {800,2.6938212795920416e-008}, {806,2.4423054091125337e-008}, {818,1.6221253804437832e-008}, {824,1.3348009074835627e-008}, {834,1.0767533754957327e-008}, {842,8.8896290123978324e-009}, {854,7.2671499460461714e-009}, {864,5.0252318697539885e-009}, {866,4.6440911866790811e-009}, {872,3.9224206660387206e-009}, {878,3.3104075210691318e-009}, {882,2.7447982747719709e-009}, {888,2.0137652460130324e-009}, {896,1.5681906311387645e-009}, {906,1.2544230206805774e-009}, {914,9.9746284102511648e-010}, {926,8.0919176831426237e-010}, {936,6.6014147200918251e-010}, {938,5.6049723460466936e-010}, {942,3.7801741328116575e-010}, {950,3.0601851151848624e-010}, {962,2.4913515288844861e-010}, {968,1.6319913256497584e-010}, {974,1.4213796729097348e-010}, {978,1.0775078929447614e-010}, {992,8.3184186443030818e-011}, {998,6.4714752737864059e-011}, {1014,5.1429317163189665e-011}, {1016,3.8586814491145211e-011}, {1022,3.2848538472822879e-011}, {1026,2.1867893125017402e-011}, {1032,1.5567522731048976e-011}, {1046,1.2132580746117841e-011}, {1050,9.9565180226797933e-012}, {1058,7.4378129739330993e-012}, {1064,6.3004367551204729e-012}, {1082,3.3090038189343863e-012}, {1086,2.4492703553236620e-012}, {1094,1.8818281618912520e-012}, {1098,1.6466529152386974e-012}, {1106,1.4428343681398167e-012}, {1112,8.7544567398952315e-013}, {1118,6.4638643994341277e-013}, {1134,3.0423795416199677e-013}, {1142,2.4928687528729860e-013}, {1152,1.7167176292456701e-013}, {1154,1.3438962217175118e-013}, {1158,1.0836016375742046e-013}, {1176,5.2901984849670131e-014}, {1178,3.1255352239491539e-014}, {1202,2.0843568873759253e-014}, {1206,1.1061430905243185e-014}, {1214,7.5908364499990880e-015}, {1238,2.7553244125542503e-015}, {1250,1.8087986520331328e-015}, {1256,1.1831103023107290e-015}, {1274,3.5181376480957391e-016}, {1302,1.4604729513107020e-016}, {1314,4.2847496492312928e-017}, {1352,8.5530848792289738e-018}, {1358,4.4377554856588983e-018}, {1406,3.2242609208882349e-019}, {1458,5.8622925834331547e-021}}; FriedmanValues FriedmanData3_28[198]={ {197,0.0}, {0,9.9999999997544264e-001}, {2,9.9032956334971423e-001}, {6,9.3427303746380286e-001}, {8,8.8195436531182425e-001}, {14,8.3141167480080314e-001}, {18,7.4028646074289572e-001}, {24,6.9777268749245691e-001}, {26,6.5946005281011921e-001}, {32,5.8544992914980598e-001}, {38,5.5211015568427468e-001}, {42,4.9204682669014033e-001}, {50,4.3603137541801185e-001}, {54,4.1167789720104575e-001}, {56,3.8897176147648738e-001}, {62,3.4512357612359201e-001}, {72,3.0565703597493765e-001}, {74,2.8910692369966673e-001}, {78,2.5715356784973198e-001}, {86,2.2737723579859773e-001}, {96,2.0152714162633853e-001}, {98,1.9070200257867001e-001}, {104,1.5935954261702587e-001}, {114,1.4057933183996796e-001}, {122,1.2486601386326503e-001}, {126,1.1124811653645310e-001}, {128,9.8571972378311237e-002}, {134,9.2456921271400344e-002}, {146,8.1476575291135417e-002}, {150,7.2630654640120113e-002}, {152,6.8516463745709133e-002}, {158,6.0580243746804020e-002}, {162,5.3460787293894953e-002}, {168,5.0149853563240747e-002}, {182,4.4212152337391862e-002}, {186,3.5012303562571852e-002}, {194,3.0737161086252969e-002}, {200,2.7044762527131110e-002}, {206,2.5390978520660419e-002}, {216,2.2429522361065608e-002}, {218,2.1198793269291000e-002}, {222,1.8826688637955946e-002}, {224,1.6623137573287990e-002}, {234,1.4500441213670390e-002}, {242,1.2737481242723173e-002}, {248,1.1977927008263112e-002}, {254,1.0620120039532780e-002}, {258,9.4073129918269757e-003}, {266,8.2821221831577106e-003}, {278,6.3453303277410727e-003}, {288,5.5732598141229562e-003}, {294,5.2537484910628362e-003}, {296,4.3989852783601008e-003}, {302,3.8507647701316117e-003}, {312,3.3617416640847834e-003}, {314,2.9577622915768235e-003}, {326,2.5686863067937524e-003}, {338,2.2599081383865446e-003}, {342,1.8928022705639973e-003}, {344,1.6664293579898059e-003}, {350,1.4483479692089006e-003}, {362,1.2545004597275845e-003}, {366,1.1010397317537061e-003}, {378,9.5896707765640618e-004}, {384,8.4678537304627873e-004}, {386,7.9705640408614809e-004}, {392,7.0143805728509385e-004}, {398,5.7389848330376245e-004}, {402,4.9829772717976018e-004}, {416,4.2859848145481143e-004}, {422,3.7583937805610811e-004}, {434,3.2897059727230078e-004}, {438,2.5552237305360314e-004}, {446,2.2169508953332848e-004}, {450,1.9290495069125766e-004}, {456,1.7957619084687907e-004}, {458,1.5599236517043754e-004}, {474,1.3341195322598697e-004}, {482,1.1711366486047344e-004}, {486,1.0325034373817260e-004}, {488,9.6912779453732918e-005}, {494,8.4747846082056663e-005}, {504,6.3190235703461248e-005}, {512,5.4445279026411735e-005}, {518,5.0721111844885585e-005}, {536,3.7618937389235046e-005}, {542,3.3134569610909220e-005}, {546,2.9213635178783752e-005}, {554,2.1967025022930537e-005}, {558,1.8923851669892608e-005}, {566,1.6108140702206287e-005}, {578,1.3749880073214718e-005}, {582,1.2830391169378265e-005}, {584,1.1155931304479434e-005}, {600,9.5424883331034952e-006}, {602,8.9814935271971006e-006}, {608,6.8201177305818268e-006}, {614,5.8768605079537087e-006}, {618,5.0364072625165877e-006}, {626,4.2778751622044912e-006}, {632,3.6347334375578069e-006}, {648,3.0767991261524265e-006}, {650,2.8787770350385409e-006}, {654,2.5041974644018517e-006}, {662,2.1586357431876251e-006}, {666,1.8770082268369524e-006}, {672,1.6194765864102935e-006}, {674,1.3905903808228861e-006}, {686,1.1753754484958403e-006}, {698,8.4343166286389051e-007}, {702,7.1661047135940288e-007}, {722,6.0255521518659418e-007}, {726,4.9397761069517417e-007}, {728,4.6200946287827962e-007}, {734,3.3755152999440883e-007}, {744,2.8443939922832976e-007}, {746,2.4237318564805922e-007}, {758,2.0124585121478311e-007}, {762,1.7097091809019630e-007}, {774,1.4253084114729159e-007}, {776,1.2136556281343324e-007}, {794,1.0161869327098628e-007}, {798,8.9296852997239895e-008}, {800,6.6476967522246640e-008}, {806,6.0801466143315076e-008}, {818,4.1830890066879568e-008}, {824,3.4950280803292029e-008}, {834,2.8793240882471567e-008}, {842,2.4152740271719002e-008}, {854,2.0161757087596330e-008}, {864,1.4432452443741731e-008}, {866,1.3401626423234026e-008}, {872,1.1441408309722033e-008}, {878,9.7572726399244399e-009}, {882,8.2236674498177163e-009}, {888,6.2000195513855942e-009}, {896,4.9803357501647381e-009}, {906,4.0690183290366699e-009}, {914,3.3257699635176191e-009}, {926,2.7551347180173747e-009}, {936,2.3071022455261456e-009}, {938,1.9880724251026313e-009}, {942,1.3951194334959645e-009}, {950,1.1481208666001610e-009}, {962,9.4877034176923726e-010}, {968,6.4637333155470050e-010}, {974,5.7522398033037082e-010}, {978,4.5621779944486262e-010}, {992,3.6313361657801906e-010}, {998,2.9408362496748224e-010}, {1014,2.4066886257168736e-010}, {1016,1.8784154072457794e-010}, {1022,1.6046844854339355e-010}, {1026,1.1033753187928532e-010}, {1032,8.4123171715325312e-011}, {1046,6.6813581869811116e-011}, {1050,5.5286861271214733e-011}, {1058,4.3285833718049109e-011}, {1064,3.8069467607363426e-011}, {1082,2.2759048233569494e-011}, {1086,1.8153880327463392e-011}, {1094,1.4655521116580522e-011}, {1098,1.2606883412409021e-011}, {1106,1.0796034013185998e-011}, {1112,7.0509818390646179e-012}, {1118,5.4810636957128249e-012}, {1134,3.0052400744101692e-012}, {1142,2.4221802059296909e-012}, {1152,1.8165866227253296e-012}, {1154,1.5562018178994001e-012}, {1158,1.2511751274443352e-012}, {1176,8.3996044022747119e-013}, {1178,6.0300241177758429e-013}, {1184,3.9216986609452108e-013}, {1194,3.3272278985740165e-013}, {1202,2.9076014780767027e-013}, {1206,1.9963796159523650e-013}, {1208,1.4663251900610211e-013}, {1214,1.2098868219793295e-013}, {1226,6.7419896740701500e-014}, {1238,5.3923140525875621e-014}, {1248,3.6766789542919086e-014}, {1250,3.0693249246247446e-014}, {1256,2.2831316938027218e-014}, {1274,1.1128410529145083e-014}, {1302,4.2375200890290111e-015}, {1304,2.2579411294571031e-015}, {1314,1.5217544268302369e-015}, {1338,5.4230603116144963e-016}, {1352,3.5025732612835403e-016}, {1358,2.2872223038625617e-016}, {1376,6.7204345127652689e-017}, {1406,2.7194198245757780e-017}, {1418,7.9346130116695615e-018}, {1458,1.5329895105663764e-018}, {1464,7.9434064505447036e-019}, {1514,5.5691779542564340e-020}, {1568,9.7704876390463749e-022}}; FriedmanValues FriedmanData3_29[210]={ {209,0.0}, {0,9.9999999997453370e-001}, {2,9.9065724566022362e-001}, {6,9.3643796127007761e-001}, {8,8.8571735346149494e-001}, {14,8.3666187721183705e-001}, {18,7.4791006406028893e-001}, {24,7.0640709711119776e-001}, {26,6.6887398599250614e-001}, {32,5.9628459313910787e-001}, {38,5.6346912207249655e-001}, {42,5.0414001705700651e-001}, {50,4.4867757013689163e-001}, {54,4.2444892394331613e-001}, {56,4.0180477891050931e-001}, {62,3.5802356561636522e-001}, {72,3.1847402497758598e-001}, {74,3.0178772688927613e-001}, {78,2.6953185909464017e-001}, {86,2.3939966404960503e-001}, {96,2.1311100113492351e-001}, {98,2.0203332827721351e-001}, {104,1.6991952931231571e-001}, {114,1.5060435959432047e-001}, {122,1.3434068863124191e-001}, {126,1.2017340440832287e-001}, {128,1.0695191865741448e-001}, {134,1.0056561059901312e-001}, {146,8.9053485392077580e-002}, {150,7.9706193458506880e-002}, {152,7.5347268565676057e-002}, {158,6.6927859526634464e-002}, {162,5.9344867460207763e-002}, {168,5.5809005375556775e-002}, {182,4.9442339617823516e-002}, {186,3.9483872336899456e-002}, {194,3.4843487664706949e-002}, {200,3.0813585557171203e-002}, {206,2.9001176261621089e-002}, {216,2.5742037172816618e-002}, {218,2.4377979887762434e-002}, {222,2.1745192069906084e-002}, {224,1.9292694194482582e-002}, {234,1.6926701293989821e-002}, {242,1.4947603041114964e-002}, {248,1.4090023492276043e-002}, {254,1.2550240751500803e-002}, {258,1.1168698763017279e-002}, {266,9.8831966614332835e-003}, {278,7.6574444778318013e-003}, {288,6.7621589321389102e-003}, {294,6.3888614058077321e-003}, {296,5.3855191879737512e-003}, {302,4.7409447789188456e-003}, {312,4.1633161009129666e-003}, {314,3.6824259372293120e-003}, {326,3.2186120197891886e-003}, {338,2.8469784290423104e-003}, {342,2.4008163198200277e-003}, {344,2.1247762425002383e-003}, {350,1.8584867249981441e-003}, {362,1.6205726366193007e-003}, {366,1.4303651192644300e-003}, {378,1.2537224847055186e-003}, {384,1.1128109795702334e-003}, {386,1.0500010607689613e-003}, {392,9.2902631652437150e-004}, {398,7.6686803792853833e-004}, {402,6.7027183124923227e-004}, {416,5.8087398840148520e-004}, {422,5.1237244427709730e-004}, {434,4.5121262864742572e-004}, {438,3.5427388332141574e-004}, {446,3.0945159875110255e-004}, {450,2.7102612405394908e-004}, {456,2.5318501111689615e-004}, {458,2.2143631796542364e-004}, {474,1.9096476492852464e-004}, {482,1.6863873493333235e-004}, {486,1.4951111245722359e-004}, {488,1.4072024480811206e-004}, {494,1.2381384571886374e-004}, {504,9.3695499222930129e-005}, {512,8.1351940080994468e-005}, {518,7.6059564252192914e-005}, {536,5.7315304817527308e-005}, {542,5.0778836044644919e-005}, {546,4.5018612025079801e-005}, {554,3.4340672844933381e-005}, {558,2.9813886752876085e-005}, {566,2.5614168429099588e-005}, {578,2.2061394842439822e-005}, {582,2.0660506905707854e-005}, {584,1.8093895202401578e-005}, {600,1.5618538201789998e-005}, {602,1.4739039030478557e-005}, {608,1.1347303765705576e-005}, {614,9.8551687392016052e-006}, {618,8.5210851355353371e-006}, {626,7.3074194027313981e-006}, {632,6.2711917736346165e-006}, {648,5.3638515453934065e-006}, {650,5.0364649310734580e-006}, {654,4.4140868876877486e-006}, {662,3.8382431520338557e-006}, {666,3.3614827132451942e-006}, {672,2.9233678181484965e-006}, {674,2.5326007442364580e-006}, {686,2.1628252015445551e-006}, {698,1.5852975656405706e-006}, {702,1.3614149476431114e-006}, {722,1.1583016912792001e-006}, {726,9.5997607301288977e-007}, {728,9.0081043205664899e-007}, {734,6.7093571795295407e-007}, {744,5.7155822907124770e-007}, {746,4.9174901358984930e-007}, {758,4.1397391575980550e-007}, {762,3.5538334949151275e-007}, {774,3.0047126567061480e-007}, {776,2.5877424960171912e-007}, {794,2.1953931351663138e-007}, {798,1.9412041117472932e-007}, {800,1.4700135084240728e-007}, {806,1.3537856454431107e-007}, {818,9.5815495618203857e-008}, {824,8.1079263385378321e-008}, {834,6.7893982952558853e-008}, {842,5.7693579691613355e-008}, {854,4.8919154775870406e-008}, {864,3.5953012158091098e-008}, {866,3.3526870456303569e-008}, {872,2.8897147581128504e-008}, {878,2.4877161790853034e-008}, {882,2.1239398410000574e-008}, {888,1.6368735971237343e-008}, {896,1.3445524339553342e-008}, {906,1.1173078440411985e-008}, {914,9.3151873475670785e-009}, {926,7.8426203865607859e-009}, {936,6.6849155855221178e-009}, {938,5.8247467520712350e-009}, {942,4.2100034850314468e-009}, {950,3.5151804988191927e-009}, {962,2.9449540634584096e-009}, {968,2.0712416050175416e-009}, {974,1.8696503432329096e-009}, {978,1.5264897886693804e-009}, {992,1.2435181270955892e-009}, {998,1.0331063437110255e-009}, {1014,8.6309146840505402e-010}, {1016,6.9061697673336639e-010}, {1022,5.9433494984305621e-010}, {1026,4.2066663914298803e-010}, {1032,3.3385671787736624e-010}, {1046,2.7044257060322179e-010}, {1050,2.2662882798903628e-010}, {1058,1.8310657707717257e-010}, {1064,1.6442614831481268e-010}, {1082,1.0605569427299582e-010}, {1086,8.7793235039137380e-011}, {1094,7.2915065376106959e-011}, {1098,6.2855444200562228e-011}, {1106,5.3849481141942000e-011}, {1112,3.6918196174230648e-011}, {1118,2.9691883525604414e-011}, {1134,1.7873084942677685e-011}, {1142,1.4603066307395889e-011}, {1152,1.1529060049031444e-011}, {1154,1.0254450028868143e-011}, {1158,8.4181038728742929e-012}, {1176,6.3304834003226257e-012}, {1178,4.8448354900918416e-012}, {1184,3.2728317091385844e-012}, {1194,2.7163783831548320e-012}, {1202,2.3051056367696439e-012}, {1206,1.7561555469978028e-012}, {1208,1.3672580624531917e-012}, {1214,1.0992043041747418e-012}, {1226,7.4382818830705427e-013}, {1238,5.9052753230046293e-013}, {1248,4.4688310296521448e-013}, {1250,3.7046575468229363e-013}, {1256,3.1153107050006765e-013}, {1262,2.1836003647898090e-013}, {1266,1.9310047294967839e-013}, {1274,1.7099835486153871e-013}, {1286,7.6233255034606591e-014}, {1302,6.4965508558300075e-014}, {1304,3.8613275571202648e-014}, {1314,2.6502013585555109e-014}, {1322,1.4825883198058394e-014}, {1338,1.1564167112811769e-014}, {1346,7.8125490068561673e-015}, {1352,6.4146706846076147e-015}, {1358,4.7710857676271537e-015}, {1374,2.3230301640087901e-015}, {1376,1.8147107741002258e-015}, {1406,8.5553418618580403e-016}, {1418,3.0308866863597558e-016}, {1442,1.0613615585702170e-016}, {1458,6.7459680537891784e-017}, {1464,4.3984618411958344e-017}, {1482,1.2778983624557790e-017}, {1514,5.0436885607318055e-018}, {1526,1.4641075727097684e-018}, {1568,2.7406217827500171e-019}, {1574,1.4183491222669429e-019}, {1626,9.6076461783868688e-021}, {1682,1.6284146065062490e-022}}; FriedmanValues FriedmanData3_30[224]={ {223,0.0}, {0,9.9999999997362488e-001}, {2,9.9096345257527541e-001}, {6,9.3846482148649391e-001}, {8,8.8924793241467937e-001}, {14,8.4159538573006432e-001}, {18,7.5510113068731066e-001}, {24,7.1456577180047820e-001}, {26,6.7778738663043880e-001}, {32,6.0657964273784659e-001}, {38,5.7428240058517932e-001}, {42,5.1569628885420860e-001}, {50,4.6080670780056093e-001}, {54,4.3672108168161361e-001}, {56,4.1416005066425576e-001}, {62,3.7049047641768396e-001}, {72,3.3090807529476218e-001}, {74,3.1411280657218571e-001}, {78,2.8160914852367652e-001}, {86,2.5117590006760088e-001}, {96,2.2450211711453569e-001}, {98,2.1319675238222288e-001}, {104,1.8038470433702186e-001}, {114,1.6058017496086940e-001}, {122,1.4380594311638228e-001}, {126,1.2912420796800661e-001}, {128,1.1538987186306883e-001}, {134,1.0874794060143911e-001}, {146,9.6731727903164560e-002}, {150,8.6903981295993998e-002}, {152,8.2309734110388222e-002}, {158,7.3424936385428408e-002}, {162,6.5393274296377868e-002}, {168,6.1638993176923423e-002}, {182,5.4853805204846576e-002}, {186,4.4147226346107349e-002}, {194,3.9145580715603187e-002}, {200,3.4779868592519733e-002}, {206,3.2808932436165131e-002}, {216,2.9250995075573775e-002}, {218,2.7752141799235304e-002}, {222,2.4855420785144557e-002}, {224,2.2150141489155232e-002}, {234,1.9536753437944785e-002}, {242,1.7336294148191021e-002}, {248,1.6377743560579760e-002}, {254,1.4649711297521951e-002}, {258,1.3092868406128371e-002}, {266,1.1640338547941873e-002}, {278,9.1117851623598919e-003}, {288,8.0862631472763766e-003}, {294,7.6557019212113052e-003}, {296,6.4934839902889953e-003}, {302,5.7457279312642497e-003}, {312,5.0727988987224150e-003}, {314,4.5085784361541198e-003}, {326,3.9636700788587128e-003}, {338,3.5232270394322186e-003}, {342,2.9897405348076988e-003}, {344,2.6586730559216717e-003}, {350,2.3388944156297838e-003}, {362,2.0518627180685189e-003}, {366,1.8203212622492633e-003}, {378,1.6046755413128048e-003}, {384,1.4310477701427269e-003}, {386,1.3532707224039207e-003}, {392,1.2032381144309687e-003}, {398,1.0012225916095163e-003}, {402,8.8034085551107416e-004}, {416,7.6808317488628202e-004}, {422,6.8110772505571579e-004}, {434,6.0309737045292845e-004}, {438,4.7818424501486928e-004}, {446,4.2022389711993385e-004}, {450,3.7020886141602945e-004}, {456,3.4692349702051661e-004}, {458,3.0527372335664780e-004}, {474,2.6521518307619316e-004}, {482,2.3546620216773409e-004}, {486,2.0981212305725409e-004}, {488,1.9796760342044047e-004}, {494,1.7514923234413741e-004}, {504,1.3430297361181453e-004}, {512,1.1740923248534783e-004}, {518,1.1012070862836700e-004}, {536,8.4154177793854544e-005}, {542,7.4947185581011657e-005}, {546,6.6778521072588144e-005}, {554,5.1592873942707268e-005}, {558,4.5101603718444540e-005}, {566,3.9063549661945166e-005}, {578,3.3911090699470823e-005}, {582,3.1858529726336227e-005}, {584,2.8078650416396168e-005}, {600,2.4429506809339439e-005}, {602,2.3108640914146529e-005}, {608,1.8009503637975766e-005}, {614,1.5750674877381796e-005}, {618,1.3723933048191825e-005}, {626,1.1868073586975581e-005}, {632,1.0273224736324775e-005}, {648,8.8657433007138807e-006}, {650,8.3502753891165770e-006}, {654,7.3664374478484758e-006}, {662,6.4535506945428757e-006}, {666,5.6879336509403422e-006}, {672,4.9813426842635029e-006}, {674,4.3487662219139900e-006}, {686,3.7471914469276781e-006}, {698,2.7968906658913325e-006}, {702,2.4237408531787384e-006}, {722,2.0828140033520157e-006}, {726,1.7424362191943270e-006}, {728,1.6398585972747023e-006}, {734,1.2417030111503309e-006}, {744,1.0677725802421869e-006}, {746,9.2640606843071151e-007}, {758,7.8888965336060610e-007}, {762,6.8331626426443438e-007}, {774,5.8443477190806093e-007}, {776,5.0807133067857041e-007}, {794,4.3575838694452596e-007}, {798,3.8746802476598803e-007}, {800,2.9779861043659177e-007}, {806,2.7579215973012001e-007}, {818,1.9982652070006745e-007}, {824,1.7092341537917051e-007}, {834,1.4501967460072992e-007}, {842,1.2456739427613269e-007}, {854,1.0693007523225167e-007}, {864,8.0262925130652372e-008}, {866,7.5127042949270090e-008}, {872,6.5297667191975428e-008}, {878,5.6686939614796366e-008}, {882,4.8910871423931271e-008}, {888,3.8385639152091176e-008}, {896,3.2073523640725669e-008}, {906,2.7025478333058823e-008}, {914,2.2876910797669907e-008}, {926,1.9511420959046497e-008}, {936,1.6851258627839345e-008}, {938,1.4813052254835608e-008}, {942,1.0959406124661392e-008}, {950,9.2651959757987072e-009}, {962,7.8557465511869136e-009}, {968,5.6712510481600572e-009}, {974,5.1719562936540755e-009}, {978,4.3104770017663706e-009}, {992,3.5756509153147085e-009}, {998,3.0247797114622243e-009}, {1014,2.5666219235581751e-009}, {1016,2.0907150482045835e-009}, {1022,1.8133255725850795e-009}, {1026,1.3154192123416577e-009}, {1032,1.0724390778167011e-009}, {1046,8.8380200475227050e-010}, {1050,7.4964853453433452e-010}, {1058,6.1949302102563500e-010}, {1064,5.6376646570405920e-010}, {1082,3.8259892974107587e-010}, {1086,3.2399579286692904e-010}, {1094,2.7427172309426500e-010}, {1098,2.3791745348100370e-010}, {1106,2.0505907444115743e-010}, {1112,1.4563668552487003e-010}, {1118,1.1995976492961852e-010}, {1134,7.6903689508451370e-011}, {1142,6.3855342569256171e-011}, {1152,5.2076079447758747e-011}, {1154,4.7241155967132713e-011}, {1158,3.9515760239258526e-011}, {1176,3.1400870445750088e-011}, {1178,2.4850806617728122e-011}, {1184,1.7381519284141378e-011}, {1194,1.4492766258954651e-011}, {1202,1.2290651717347315e-011}, {1206,9.8591622067580250e-012}, {1208,7.9600336948137416e-012}, {1214,6.4596442956016587e-012}, {1226,4.7865981520426607e-012}, {1238,3.8764946443613614e-012}, {1248,3.1005395704558827e-012}, {1250,2.6117057571609243e-012}, {1256,2.3042003412164159e-012}, {1262,1.7998837303837219e-012}, {1266,1.5630753222967261e-012}, {1274,1.3522694060781061e-012}, {1286,6.7999732050680399e-013}, {1302,5.6287206108214537e-013}, {1304,3.6253750540602305e-013}, {1314,2.6755913244384607e-013}, {1322,1.8470894340909152e-013}, {1338,1.4510239094541854e-013}, {1346,1.1145938262856596e-013}, {1350,9.2609205252807145e-014}, {1352,8.8399277997927213e-014}, {1358,6.7308214448834439e-014}, {1368,3.9923947650254874e-014}, {1374,3.5229053285131432e-014}, {1376,2.7466132167513122e-014}, {1382,1.7362646768771134e-014}, {1400,1.4397450327640533e-014}, {1406,1.2766592285018705e-014}, {1418,5.7573193598514776e-015}, {1422,3.2367371008079087e-015}, {1442,2.4601380328927519e-015}, {1448,1.6479320511917621e-015}, {1458,1.3302324324991980e-015}, {1464,9.8939304224820106e-016}, {1478,4.8145144452880746e-016}, {1482,3.7094722933139389e-016}, {1512,1.7161462576375166e-016}, {1514,1.3938422966450602e-016}, {1526,6.0000646012005036e-017}, {1550,2.0663034362669335e-017}, {1568,1.2927739298850383e-017}, {1574,8.4170308388321728e-018}, {1592,2.4195798430751106e-018}, {1626,9.3202310003300437e-019}, {1638,2.6925835518556356e-019}, {1682,4.8879578438584814e-020}, {1688,2.5267566644265663e-020}, {1742,1.6555548499465148e-021}, {1800,2.7140243441746147e-023}}; FriedmanValues FriedmanData4_2[12]={ {11,0.0}, {0,9.9999999999909062e-001}, {8,9.5833333333246185e-001}, {16,8.3333333333257553e-001}, {24,7.9166666666594676e-001}, {32,6.2499999999943168e-001}, {40,5.4166666666617413e-001}, {48,4.5833333333291659e-001}, {56,3.7499999999965905e-001}, {64,2.0833333333314391e-001}, {72,1.6666666666651514e-001}, {80,4.1666666666628785e-002}}; FriedmanValues FriedmanData4_3[18]={ {17,0.0}, {4,9.9999999999818179e-001}, {12,9.5833333333159088e-001}, {20,9.0972222222056809e-001}, {36,7.2743055555423286e-001}, {44,6.0763888888778406e-001}, {52,5.2430555555460223e-001}, {68,4.4618055555474428e-001}, {76,3.4201388888826700e-001}, {84,3.0034722222167609e-001}, {100,2.0659722222184654e-001}, {108,1.7534722222190338e-001}, {116,1.4756944444417611e-001}, {132,7.4652777777642038e-002}, {140,5.3819444444346581e-002}, {148,3.2986111111051125e-002}, {164,1.7361111111079540e-002}, {180,1.7361111111079543e-003}}; FriedmanValues FriedmanData4_4[37]={ {36,0.0}, {0,9.9999999999727207e-001}, {8,9.9240451388618167e-001}, {16,9.2816840277524582e-001}, {24,9.0039062499754385e-001}, {32,7.9969618055337410e-001}, {40,7.5390624999794342e-001}, {48,6.7664930555370972e-001}, {56,6.4887152777600776e-001}, {64,5.2387152777634882e-001}, {72,5.0759548610972660e-001}, {80,4.3207465277659929e-001}, {88,3.8925057870264201e-001}, {96,3.5452835648051451e-001}, {104,3.2414641203615291e-001}, {120,2.4168113425859999e-001}, {128,2.0001446759204700e-001}, {136,1.8974247685133427e-001}, {144,1.5849247685141954e-001}, {152,1.4113136574035581e-001}, {160,1.0525173611082403e-001}, {168,9.4401041666409183e-002}, {176,7.7039930555345429e-002}, {184,6.7780671296111414e-002}, {192,5.3891782407260405e-002}, {200,5.1721643518377436e-002}, {208,3.6385995370271124e-002}, {216,3.2913773148058371e-002}, {224,1.9024884259207366e-002}, {232,1.4105902777739304e-002}, {248,1.1501736111079739e-002}, {256,6.8721064814627380e-003}, {264,6.2210648147978474e-003}, {272,2.7488425925850952e-003}, {288,1.5914351851808446e-003}, {296,9.4039351851595357e-004}, {320,7.2337962962765661e-005}}; FriedmanValues FriedmanData4_5[46]={ {45,0.0}, {4,9.9999999999636313e-001}, {12,9.7459129050571480e-001}, {20,9.4384765624656741e-001}, {36,8.5655984760490955e-001}, {44,7.7092978394781353e-001}, {52,7.0896026234310061e-001}, {68,6.5217496141738118e-001}, {76,5.6120997299178621e-001}, {84,5.2058015046106976e-001}, {100,4.4462528935023488e-001}, {108,4.0758222414975231e-001}, {116,3.7201605902642487e-001}, {132,2.9823133680447100e-001}, {140,2.6031418788485583e-001}, {148,2.2607421874917788e-001}, {164,2.0961733217516365e-001}, {172,1.6163315007657272e-001}, {180,1.5138527199019022e-001}, {196,1.2321867766158895e-001}, {204,1.0661108699806909e-001}, {212,9.3349127121574088e-002}, {228,7.5460551697256434e-002}, {236,6.6599151234325707e-002}, {244,5.4783950617084722e-002}, {260,4.4340157214344929e-002}, {268,3.3640166859445562e-002}, {276,3.1349464698960071e-002}, {292,2.2608627507633833e-002}, {300,1.9564404899620216e-002}, {308,1.6670886381112218e-002}, {324,1.1999059606437849e-002}, {332,8.7438512731163511e-003}, {340,6.6942756558398542e-003}, {356,5.4585021218937308e-003}, {364,3.1376591435071082e-003}, {372,2.2937162422756096e-003}, {388,1.8416039737587349e-003}, {396,1.6004774305497353e-003}, {404,1.3593508873407354e-003}, {420,6.3597125771373657e-004}, {428,3.3456307870248698e-004}, {436,2.1399980709798717e-004}, {452,1.3864776234517477e-004}, {468,4.8225308641799923e-005}, {500,3.0140817901124952e-006}}; FriedmanValues FriedmanData4_6[79]={ {78,0.0}, {0,9.9999999999545386e-001}, {8,9.9636300796872146e-001}, {16,9.5742107124050346e-001}, {24,9.3959277745200431e-001}, {32,8.7400635769921609e-001}, {40,8.4383539898021742e-001}, {48,7.8873798385701110e-001}, {56,7.7151250642653391e-001}, {64,6.7873906892695557e-001}, {72,6.6786576886913462e-001}, {80,6.0932476530072799e-001}, {88,5.7370020234274954e-001}, {96,5.4144952718857509e-001}, {104,5.1195673687235121e-001}, {120,4.3068578900427928e-001}, {128,3.8552730858395984e-001}, {136,3.7510612079465538e-001}, {144,3.3782569665323531e-001}, {152,3.1653560434205380e-001}, {160,2.6989268864010535e-001}, {168,2.5556826493260876e-001}, {176,2.3003899217037915e-001}, {184,2.1807308746364340e-001}, {192,1.9673338838966636e-001}, {200,1.9353846169215000e-001}, {208,1.6328461572392336e-001}, {216,1.5548002768865790e-001}, {224,1.2675833996373706e-001}, {232,1.1405398521842444e-001}, {248,1.0810494128519531e-001}, {256,8.9357352550712629e-002}, {264,8.8181860652569818e-002}, {272,7.2810043523010057e-002}, {280,6.5900261019183448e-002}, {288,6.0045407141895241e-002}, {296,5.5793040083015395e-002}, {304,4.3329811880911562e-002}, {312,4.1159672992032534e-002}, {320,3.7301648300692047e-002}, {328,3.5435931672614107e-002}, {336,3.2056392465453547e-002}, {344,2.9189247162611644e-002}, {352,2.2799393767578967e-002}, {360,2.1774605958941651e-002}, {376,1.6834274731469256e-002}, {384,1.3714700078705662e-002}, {392,1.3036531675930966e-002}, {400,1.0263576429029990e-002}, {408,9.5695840968572192e-003}, {416,8.5447962882199031e-003}, {424,7.2562763229479816e-003}, {432,6.1448336628450095e-003}, {440,5.6525336371270824e-003}, {456,3.9767041618260579e-003}, {464,3.2683949411502653e-003}, {472,2.7823742524950676e-003}, {480,2.2925859616022321e-003}, {488,1.9821355372209274e-003}, {504,1.4659740306646320e-003}, {512,9.0334542984414439e-004}, {520,8.7320461194304684e-004}, {528,7.2852868601777860e-004}, {536,6.4564143678976036e-004}, {544,3.9697968910570565e-004}, {552,3.5930366672933369e-004}, {560,2.7641641750131545e-004}, {576,2.3723335422988864e-004}, {584,2.2467468010443133e-004}, {592,1.2294941968822709e-004}, {600,9.4692402905948141e-005}, {608,6.1537503214740836e-005}, {616,4.6467094264192054e-005}, {632,2.3861480838368892e-005}, {640,1.6326276363094504e-005}, {648,1.1805153677929872e-005}, {656,8.0375514402926795e-006}, {680,2.3861480838368892e-006}, {720,1.2558674125457312e-007}}; FriedmanValues FriedmanData4_7[86]={ {85,0.0}, {4,9.9999999999454503e-001}, {12,9.8350794913300943e-001}, {20,9.6309508020950974e-001}, {36,9.0598772778428915e-001}, {44,8.4487384434619817e-001}, {52,7.9953608885277905e-001}, {68,7.5743729390802572e-001}, {76,6.8533585264148655e-001}, {84,6.5201769018667854e-001}, {100,5.9001096350998172e-001}, {108,5.5697356591359082e-001}, {116,5.2434550260197610e-001}, {132,4.5644381278250817e-001}, {140,4.1797518108542825e-001}, {148,3.8241236494193226e-001}, {164,3.6574723985260543e-001}, {172,3.0991477599844863e-001}, {180,2.9716112845720521e-001}, {196,2.6168904350148475e-001}, {204,2.3905972557827035e-001}, {212,2.2045781746365992e-001}, {228,1.9478081806427205e-001}, {236,1.8047444745084379e-001}, {244,1.6067797918454446e-001}, {260,1.4265254560897728e-001}, {268,1.2218711340148167e-001}, {276,1.1752784530094124e-001}, {292,1.0008987510427708e-001}, {300,9.2870976535201544e-002}, {308,8.5303621854172867e-002}, {324,7.3352306140557072e-002}, {332,6.2775767552330303e-002}, {340,5.5898805050224473e-002}, {356,5.1628541880719733e-002}, {364,4.1286468505634152e-002}, {372,3.7973553064712152e-002}, {388,3.5144146577619821e-002}, {396,3.2837479202656519e-002}, {404,2.9711374039350529e-002}, {420,2.2892249464373259e-002}, {428,1.9604608355128714e-002}, {436,1.7460465921691336e-002}, {452,1.5496430573555507e-002}, {460,1.3296245056833328e-002}, {468,1.2357358579214994e-002}, {484,1.0151348977367138e-002}, {492,9.0609263980826436e-003}, {500,8.4077497568182044e-003}, {516,6.6778865860939738e-003}, {524,5.3255999529512729e-003}, {532,4.2659827547403177e-003}, {548,3.9402735412968791e-003}, {556,3.3511252069486699e-003}, {564,2.9744277765559202e-003}, {580,2.4924572603066200e-003}, {588,2.1102654099839874e-003}, {596,1.9133453996969954e-003}, {612,1.4255874277882194e-003}, {620,1.1194383492951622e-003}, {628,9.5416619780429399e-004}, {644,7.9120170268397671e-004}, {652,5.4915419003954957e-004}, {660,5.2453918875367564e-004}, {676,4.4695797934373366e-004}, {684,3.6970643512958457e-004}, {692,2.8750991297854127e-004}, {708,1.9102789900980326e-004}, {716,1.7344575523417900e-004}, {724,1.3007646725430585e-004}, {740,1.0623068475861546e-004}, {748,7.5132267955480082e-005}, {756,6.8538964039621000e-005}, {772,4.5242623536918846e-005}, {780,4.2055859977586948e-005}, {788,3.5023002467337241e-005}, {804,2.5462711789341553e-005}, {812,1.5572755915552910e-005}, {820,1.1763291430834320e-005}, {836,8.1369742771118185e-006}, {852,3.2286258064167149e-006}, {876,1.6901882260495931e-006}, {884,1.2506346316589869e-006}, {900,4.4478637527620874e-007}, {932,1.1512117948325403e-007}, {980,5.2327808856024558e-009}}; FriedmanValues FriedmanData4_8[137]={ {136,0.0}, {0,9.9999999999363554e-001}, {8,9.9762052697592019e-001}, {16,9.7098467803985966e-001}, {24,9.5852601979975194e-001}, {32,9.1190208164990005e-001}, {40,8.9009283642579562e-001}, {48,8.4931056554538964e-001}, {56,8.3657620952302270e-001}, {64,7.6531773437201300e-001}, {72,7.5696047746222783e-001}, {80,7.1026071631734355e-001}, {88,6.8118453908416099e-001}, {96,6.5410022338360185e-001}, {104,6.2879756491897087e-001}, {120,5.5783622799776900e-001}, {128,5.1661352441578401e-001}, {136,5.0700725307412275e-001}, {144,4.7127121618500323e-001}, {152,4.5043437340008852e-001}, {160,4.0373541810346081e-001}, {168,3.8916058402736070e-001}, {176,3.6222337226305740e-001}, {184,3.4958864838875220e-001}, {192,3.2612522868091470e-001}, {200,3.2251991242114969e-001}, {208,2.8708757043628752e-001}, {216,2.7766886485498243e-001}, {224,2.4249588391045465e-001}, {232,2.2626646632158223e-001}, {248,2.1862678065463911e-001}, {256,1.9250205928992201e-001}, {264,1.9093799481926668e-001}, {272,1.6833934796910369e-001}, {280,1.5784422447442525e-001}, {288,1.4829453192199188e-001}, {296,1.4148105438972652e-001}, {304,1.2057163642244917e-001}, {312,1.1675064586570336e-001}, {320,1.0965488335217399e-001}, {328,1.0629405656946647e-001}, {336,9.9995094834167936e-002}, {344,9.4285195964462609e-002}, {352,8.1068405452608266e-002}, {360,7.8713838945680598e-002}, {376,6.7514794789230392e-002}, {384,5.9835256263062561e-002}, {392,5.8086791428421755e-002}, {400,5.0709043074268996e-002}, {408,4.8801966546074688e-002}, {416,4.5943549521755167e-002}, {424,4.2044287900652746e-002}, {432,3.8466516999469534e-002}, {440,3.6961290135124399e-002}, {456,3.0929540355748915e-002}, {464,2.7656209157969174e-002}, {472,2.5353778591265006e-002}, {480,2.3173592763089584e-002}, {488,2.1801697155709482e-002}, {504,1.8795199409368735e-002}, {512,1.5616298975450495e-002}, {520,1.5388021089641666e-002}, {528,1.4490269502565869e-002}, {536,1.3721539105265664e-002}, {544,1.1205729688129181e-002}, {552,1.0580708896550439e-002}, {560,9.3920582987427892e-003}, {568,8.8436907700968730e-003}, {576,8.3900714606861791e-003}, {584,8.1134945712382101e-003}, {592,6.4120558662861165e-003}, {600,6.1821204971317725e-003}, {608,5.3114625052213035e-003}, {616,4.8276116763742178e-003}, {632,4.2237627162586052e-003}, {640,3.7533426916845527e-003}, {648,3.6270778692404494e-003}, {656,3.1964496547807770e-003}, {664,2.8362599038221350e-003}, {672,2.4737258670267459e-003}, {680,2.3374398331216491e-003}, {688,1.9257734723310872e-003}, {696,1.8763481126063220e-003}, {704,1.5391128271325025e-003}, {712,1.4865617529587398e-003}, {720,1.2992142431719805e-003}, {728,1.1908259084283004e-003}, {736,9.7178170055718053e-004}, {744,9.0416370595348700e-004}, {760,7.2599798236065672e-004}, {768,6.8800101609003657e-004}, {776,6.8401756164087539e-004}, {784,5.0777575715364970e-004}, {792,4.7031602305395103e-004}, {800,3.9373601905352384e-004}, {808,3.5153276908103079e-004}, {816,3.1924999953748335e-004}, {824,2.9404892679244486e-004}, {832,2.0623588649093478e-004}, {840,1.9821228913301830e-004}, {848,1.7459849325661108e-004}, {856,1.5310920641975652e-004}, {864,1.3274322321301030e-004}, {872,1.1191326676774107e-004}, {888,9.6480051675818245e-005}, {896,7.4007002032471344e-005}, {904,7.0374579967718952e-005}, {912,6.0216008008478613e-005}, {920,5.7383329289075055e-005}, {928,3.9312792630810995e-005}, {936,3.6962401883030031e-005}, {944,2.6950347788586444e-005}, {952,2.3796725174866232e-005}, {968,1.9498867807495323e-005}, {976,1.4773666667800599e-005}, {984,1.4138755920348078e-005}, {992,1.1745630795334735e-005}, {1000,1.0231612859101800e-005}, {1016,7.5663831280373727e-006}, {1024,5.5639723091486533e-006}, {1032,5.2968824514462712e-006}, {1040,4.4421949067986466e-006}, {1048,3.5142484297526544e-006}, {1056,2.9770162588312908e-006}, {1064,2.3141973466555824e-006}, {1080,1.2397330048128546e-006}, {1088,9.4669727521938359e-007}, {1096,7.7575976628985881e-007}, {1104,5.6819279116115005e-007}, {1112,3.7283563809883599e-007}, {1128,2.1934073212130349e-007}, {1152,1.2166215559014646e-007}, {1160,9.8768739215656543e-008}, {1168,3.7719628883683405e-008}, {1184,2.3765546522089546e-008}, {1224,5.4508134224976016e-009}, {1280,2.1803253689990407e-010}}; FriedmanValues FriedmanData4_9[141]={ {140,0.0}, {4,9.9999999999272604e-001}, {12,9.8830187630686706e-001}, {20,9.7360961426705683e-001}, {36,9.3207285727305655e-001}, {44,8.8606518852485916e-001}, {52,8.5141107617889644e-001}, {68,8.1878833902066062e-001}, {76,7.6102146160992001e-001}, {84,7.3386705847826894e-001}, {100,6.8272676285341727e-001}, {108,6.5447017450515044e-001}, {116,6.2611287089585610e-001}, {132,5.6620291445087267e-001}, {140,5.3094897170248245e-001}, {148,4.9781250971481600e-001}, {164,4.8215986656875509e-001}, {172,4.2723896132119032e-001}, {180,4.1439663384230196e-001}, {196,3.7815690707129507e-001}, {204,3.5417126640567470e-001}, {212,3.3412428006270883e-001}, {228,3.0594285995776593e-001}, {236,2.8949085883886583e-001}, {244,2.6631052385565879e-001}, {260,2.4470081574090932e-001}, {268,2.1923701128155540e-001}, {276,2.1329247015629457e-001}, {292,1.9084288386639403e-001}, {300,1.8104651627876217e-001}, {308,1.7043781701923177e-001}, {324,1.5339428207199834e-001}, {332,1.3752376533475719e-001}, {340,1.2700999133688190e-001}, {356,1.2039930673932329e-001}, {364,1.0328590566399828e-001}, {372,9.7835807388226670e-002}, {388,9.2876576010306605e-002}, {396,8.8569360577439596e-002}, {404,8.2552024493018974e-002}, {420,6.9317086370016615e-002}, {428,6.2661846605510010e-002}, {436,5.8083786031541566e-002}, {452,5.3798700519612934e-002}, {460,4.8779030522464260e-002}, {468,4.6488736518896172e-002}, {484,4.1091709760963852e-002}, {492,3.8116227252016077e-002}, {500,3.6360650196023178e-002}, {516,3.1502781381393896e-002}, {524,2.7342090681348401e-002}, {532,2.4065548300368181e-002}, {548,2.2908098376624497e-002}, {556,2.0824889387262117e-002}, {564,1.9394655250050085e-002}, {580,1.7583550212640926e-002}, {588,1.6023485221827640e-002}, {596,1.5178368869485617e-002}, {612,1.2882389122436522e-002}, {620,1.1214079262288939e-002}, {628,1.0204644432772747e-002}, {644,9.4249317910977369e-003}, {652,7.7894967678476213e-003}, {660,7.6054886443961888e-003}, {676,6.9325330725318107e-003}, {684,6.4049003291292879e-003}, {692,5.6993452954615439e-003}, {708,4.7891735394302035e-003}, {716,4.5704086312390512e-003}, {724,4.0586099557475266e-003}, {740,3.6209902009437522e-003}, {748,3.0157670907648782e-003}, {756,2.8725458779261994e-003}, {772,2.3488275816749048e-003}, {780,2.2425206945448357e-003}, {788,2.0370817169764566e-003}, {804,1.8000292207365732e-003}, {812,1.5483344224323850e-003}, {820,1.4015758497150455e-003}, {836,1.2615243938978147e-003}, {844,9.8242879258382998e-004}, {852,9.1923380602374556e-004}, {868,8.2762220286444863e-004}, {876,7.6396803978165330e-004}, {884,6.9639190742510596e-004}, {900,5.6782248106608730e-004}, {908,4.8523971427607573e-004}, {916,4.2554153354278871e-004}, {932,3.7233101996122088e-004}, {940,3.1480771378350838e-004}, {948,2.9109798359088673e-004}, {964,2.4912421286351889e-004}, {972,2.1271942919364343e-004}, {980,1.9021570964012640e-004}, {996,1.5709048962809496e-004}, {1004,1.3780572977185291e-004}, {1012,1.1461404488690498e-004}, {1028,1.0950652369376093e-004}, {1036,9.1191790594185660e-005}, {1044,8.1207644664474320e-005}, {1060,6.0210648041891743e-005}, {1068,5.1336178708731459e-005}, {1076,4.9797741128367143e-005}, {1092,3.6340173361440825e-005}, {1100,3.0801928891651401e-005}, {1108,2.6429940461738495e-005}, {1124,2.3788285498728774e-005}, {1132,1.7811468580965590e-005}, {1140,1.6555601168423283e-005}, {1156,1.3733497027061937e-005}, {1164,1.2655544164629791e-005}, {1172,1.1143270488693428e-005}, {1188,8.3329401043246729e-006}, {1196,6.3780603784819093e-006}, {1204,4.8396227981175835e-006}, {1220,4.3598422006697802e-006}, {1228,3.4509735706033574e-006}, {1236,2.9172299202728771e-006}, {1252,2.1717221684785578e-006}, {1260,2.1007525777177034e-006}, {1268,1.7013169701174425e-006}, {1284,1.4745086236075237e-006}, {1292,1.1500762087007615e-006}, {1300,1.0218730770037343e-006}, {1316,7.7217131411934600e-007}, {1332,4.2026679956322061e-007}, {1348,3.5616523371470709e-007}, {1356,2.5641534808309163e-007}, {1364,2.0016295356296754e-007}, {1388,9.6652006669832139e-008}, {1396,7.5720883127460359e-008}, {1412,4.3343051397854028e-008}, {1428,2.4374220687579615e-008}, {1444,1.4889805332442411e-008}, {1460,9.0029268361503532e-009}, {1476,5.5689143799799868e-009}, {1484,3.2795727425330759e-009}, {1492,1.9713775211348405e-009}, {1508,1.2355177090983332e-009}, {1556,2.5437129304965685e-010}, {1620,9.0846890374877445e-012}}; FriedmanValues FriedmanData4_10[212]={ {211,0.0}, {0,9.9999999999181788e-001}, {8,9.9826930178373607e-001}, {16,9.7860619280299233e-001}, {24,9.6929540292322947e-001}, {32,9.3403149753240045e-001}, {40,9.1733747316153369e-001}, {48,8.8572452634852117e-001}, {56,8.7575110537117373e-001}, {64,8.1912240944955816e-001}, {72,8.1241576070619337e-001}, {80,7.7436883122371669e-001}, {88,7.5037085107028523e-001}, {96,7.2769408463391183e-001}, {104,7.0623584317748478e-001}, {120,6.4531028972666993e-001}, {128,6.0897260298092204e-001}, {136,6.0039487897386090e-001}, {144,5.6797726053068021e-001}, {152,5.4882151941817847e-001}, {160,5.0532628966752191e-001}, {168,4.9159324174207503e-001}, {176,4.6574912440957156e-001}, {184,4.5350651292963268e-001}, {192,4.3039372611613030e-001}, {200,4.2677607698219250e-001}, {208,3.9076288312585483e-001}, {216,3.8104592898406547e-001}, {224,3.4429171942080078e-001}, {232,3.2700880086430556e-001}, {248,3.1880119010929042e-001}, {256,2.8970400288843290e-001}, {264,2.8796353377024253e-001}, {272,2.6202837838279514e-001}, {280,2.4979263826639186e-001}, {288,2.3836328042710248e-001}, {296,2.3018103939299961e-001}, {304,2.0456113843166490e-001}, {312,1.9976877134695936e-001}, {320,1.9071945122965162e-001}, {328,1.8641335950014495e-001}, {336,1.7824366119653823e-001}, {344,1.7062825208988941e-001}, {352,1.5269034080828481e-001}, {360,1.4937219574795801e-001}, {376,1.3354064767988361e-001}, {384,1.2229589281131432e-001}, {392,1.1967027359631462e-001}, {400,1.0846447840532668e-001}, {408,1.0552482115638190e-001}, {416,1.0106834198420669e-001}, {424,9.4821958767938863e-002}, {432,8.8960533458144975e-002}, {440,8.6483604597766439e-002}, {456,7.6157924235197794e-002}, {464,7.0185442213084592e-002}, {472,6.5937699760598198e-002}, {480,6.1898912741689176e-002}, {488,5.9338961928856217e-002}, {504,5.3448065887824747e-002}, {512,4.7097960914454770e-002}, {520,4.6615534219631459e-002}, {528,4.4747146911015827e-002}, {536,4.3043749115587608e-002}, {544,3.7398014196300754e-002}, {552,3.5917131209784528e-002}, {560,3.3093917691623939e-002}, {568,3.1768445572002979e-002}, {576,3.0571262979471672e-002}, {584,2.9853446586297287e-002}, {592,2.5456699403525570e-002}, {600,2.4903515222718768e-002}, {608,2.2508534858853298e-002}, {616,2.1152482949157059e-002}, {632,1.9443486418857112e-002}, {640,1.7983282955420357e-002}, {648,1.7617988790232880e-002}, {656,1.6185718304076186e-002}, {664,1.4980115703780831e-002}, {672,1.3630764524448297e-002}, {680,1.3120685308051362e-002}, {688,1.1630774684344819e-002}, {696,1.1416317267833953e-002}, {704,1.0113865977351191e-002}, {712,9.9085326092930599e-003}, {720,9.1450931803131272e-003}, {728,8.6394272661050858e-003}, {736,7.6580375166614310e-003}, {744,7.3493683090914566e-003}, {760,6.4941918264813910e-003}, {768,6.2637844441391444e-003}, {776,6.2307969389282626e-003}, {784,5.1805163459135144e-003}, {792,4.9561462504504319e-003}, {800,4.4883698431330736e-003}, {808,4.1950405826949909e-003}, {816,3.9613454741018045e-003}, {824,3.8043600034791260e-003}, {832,3.1211265913161095e-003}, {840,3.0575215264352753e-003}, {848,2.8280992423488091e-003}, {856,2.6563741760490052e-003}, {864,2.4921081902082444e-003}, {872,2.2968475165438640e-003}, {888,2.0898257930957011e-003}, {896,1.8543204012297380e-003}, {904,1.7892287859699785e-003}, {912,1.6584119211018170e-003}, {920,1.6012089728560299e-003}, {928,1.3189907913110251e-003}, {936,1.2902509005947842e-003}, {944,1.0824014370608330e-003}, {952,1.0162232475687456e-003}, {968,9.3179696117118933e-004}, {976,8.3193752554573360e-004}, {984,7.8971353182148631e-004}, {992,7.0415156844735492e-004}, {1000,6.5028608512498933e-004}, {1016,5.7049343982865498e-004}, {1024,4.8305074141826181e-004}, {1032,4.7944407444693726e-004}, {1040,4.4271022517077945e-004}, {1048,4.0762766575338030e-004}, {1056,3.8420388523292392e-004}, {1064,3.5487019652947083e-004}, {1072,2.8932402885372083e-004}, {1080,2.8373578679781865e-004}, {1088,2.4312640917827197e-004}, {1096,2.3260945077886603e-004}, {1104,2.0660188249339883e-004}, {1112,1.8703829990358048e-004}, {1120,1.6098849916995031e-004}, {1128,1.5606069129535030e-004}, {1144,1.4255487020261367e-004}, {1152,1.2799608822698796e-004}, {1160,1.2360722952953643e-004}, {1168,9.8811445203056048e-005}, {1176,9.4256779574809234e-005}, {1184,8.0338808852164706e-005}, {1192,7.1587459767192936e-005}, {1200,6.5746981320165146e-005}, {1208,6.2896859997814772e-005}, {1216,5.5514142028061875e-005}, {1224,5.4660408375764745e-005}, {1232,4.3507805640267689e-005}, {1240,4.0381752786609692e-005}, {1248,3.7125164307344424e-005}, {1256,3.5887557119768596e-005}, {1272,2.6966381129102449e-005}, {1280,2.3475407672670210e-005}, {1288,2.2817751892098674e-005}, {1296,2.1265155823870836e-005}, {1304,1.9608585489609051e-005}, {1312,1.5381661374250600e-005}, {1320,1.4261382945593819e-005}, {1328,1.2745102921793305e-005}, {1336,1.1849148177194484e-005}, {1344,9.5444079918311277e-006}, {1352,9.1022107529318149e-006}, {1360,7.8192936787815539e-006}, {1368,7.2497858788832625e-006}, {1376,5.9628488298339182e-006}, {1384,5.0936257827278820e-006}, {1400,4.7005880673826280e-006}, {1416,3.7281084446766002e-006}, {1424,3.2091910068557713e-006}, {1432,2.8240645415473228e-006}, {1440,2.5746898274685106e-006}, {1448,2.3373750380869532e-006}, {1456,1.9314029967245889e-006}, {1464,1.7586803463995103e-006}, {1480,1.4278159716545074e-006}, {1488,1.2235126710628906e-006}, {1496,1.1894791547562333e-006}, {1504,7.9232683233442147e-007}, {1512,7.2882485596243988e-007}, {1528,5.2489629879361922e-007}, {1544,4.8108538591037446e-007}, {1552,3.5849886321088568e-007}, {1560,3.4044304374889520e-007}, {1568,2.7285295731004783e-007}, {1576,2.4586386029453589e-007}, {1584,2.3925474901976959e-007}, {1592,2.3066971787935148e-007}, {1600,1.8183951430289920e-007}, {1608,1.7099239559214869e-007}, {1616,1.3665227103047627e-007}, {1624,1.0948905080841264e-007}, {1632,8.9321041145208181e-008}, {1640,7.7874332957984032e-008}, {1656,5.0839812497284663e-008}, {1664,3.8916158135592849e-008}, {1672,3.3465344713105159e-008}, {1680,2.9172829142896104e-008}, {1688,2.2018636525881007e-008}, {1696,1.8838995362763187e-008}, {1704,1.7680697510484553e-008}, {1712,8.6187201955987650e-009}, {1728,7.5209869369033271e-009}, {1736,6.5670945879679819e-009}, {1744,3.5691472055997524e-009}, {1760,2.8026265680624209e-009}, {1768,1.8941576643144727e-009}, {1784,1.5875494092995402e-009}, {1800,1.0273269186549716e-009}, {1808,5.4356722740918914e-010}, {1832,3.0509414017535274e-010}, {1848,1.6882380461316044e-010}, {1856,1.0068863683206429e-010}, {1872,6.2835765842566435e-011}, {1928,1.1734390006744334e-011}, {2000,3.7852870989497850e-013}}; FriedmanValues FriedmanData4_11[209]={ {208,0.0}, {4,9.9999999999090827e-001}, {12,9.9116257566521038e-001}, {20,9.7995279082137576e-001}, {36,9.4795976853517805e-001}, {44,9.1178478794933726e-001}, {52,8.8426010004259692e-001}, {68,8.5808737473176344e-001}, {76,8.1076404619615661e-001}, {84,7.8827804503407994e-001}, {100,7.4551141137559884e-001}, {108,7.2136532135875708e-001}, {116,6.9687908899531747e-001}, {132,6.4456981803986158e-001}, {140,6.1309493647933966e-001}, {148,5.8318823075823234e-001}, {164,5.6894229194110457e-001}, {172,5.1768516346486160e-001}, {180,5.0554170629917117e-001}, {196,4.7091595201034359e-001}, {204,4.4748102357525116e-001}, {212,4.2768375808819376e-001}, {228,3.9951657125064921e-001}, {236,3.8264129731763041e-001}, {244,3.5859768648592050e-001}, {260,3.3585785047221900e-001}, {268,3.0847272791283376e-001}, {276,3.0199021746720445e-001}, {292,2.7729651236335895e-001}, {300,2.6622016576195096e-001}, {308,2.5402381005203611e-001}, {324,2.3419091833234595e-001}, {332,2.1524123244595467e-001}, {340,2.0254146144490354e-001}, {356,1.9448284822056497e-001}, {364,1.7292306652478986e-001}, {372,1.6603541132554259e-001}, {388,1.5960166651216975e-001}, {396,1.5384243450219087e-001}, {404,1.4567339221912817e-001}, {420,1.2753843439475837e-001}, {428,1.1819950727265478e-001}, {436,1.1162851584518300e-001}, {452,1.0539880301343187e-001}, {460,9.7919842030662840e-002}, {468,9.4419080070867800e-002}, {484,8.6095959375090070e-002}, {492,8.1308295209625320e-002}, {500,7.8480499495445971e-002}, {516,7.0497536514389808e-002}, {524,6.3400501005800192e-002}, {532,5.7767008030531142e-002}, {548,5.5689503860986395e-002}, {556,5.1906308604667037e-002}, {564,4.9244274377018574e-002}, {580,4.5854960047308019e-002}, {588,4.2833632229176855e-002}, {596,4.1168235056797314e-002}, {612,3.6506219474951127e-002}, {620,3.2967051014747090e-002}, {628,3.0760871054547251e-002}, {644,2.9121312930417833e-002}, {652,2.5382442058101109e-002}, {660,2.4948032112442366e-002}, {676,2.3315769460998361e-002}, {684,2.2068219399946003e-002}, {692,2.0310904713212941e-002}, {708,1.7993564885800596e-002}, {716,1.7408336961757788e-002}, {724,1.6022609962637963e-002}, {740,1.4760573195261638e-002}, {748,1.2955875708128489e-002}, {756,1.2525500874731935e-002}, {772,1.0911705195051295e-002}, {780,1.0560596688993007e-002}, {788,9.8853044276072596e-003}, {804,9.0916786049240646e-003}, {812,8.2313927611882137e-003}, {820,7.7033376403110032e-003}, {836,7.1975607770200624e-003}, {844,6.1059219961612380e-003}, {852,5.8203811340781586e-003}, {868,5.4378946846091207e-003}, {876,5.1228835365328780e-003}, {884,4.8102349323418036e-003}, {900,4.2138221350446637e-003}, {908,3.8067415235255382e-003}, {916,3.5010900452485884e-003}, {932,3.2169838285048295e-003}, {940,2.9073108120052263e-003}, {948,2.7973945646722590e-003}, {964,2.5371250041442239e-003}, {972,2.3037092502123128e-003}, {980,2.1491249546955922e-003}, {996,1.9154005768275142e-003}, {1004,1.7485745639421759e-003}, {1012,1.5599365112423890e-003}, {1028,1.5120811359646991e-003}, {1036,1.3370249507754545e-003}, {1044,1.2504841405472666e-003}, {1060,1.0662914947123180e-003}, {1068,9.9105699022175239e-004}, {1076,9.6338060619828320e-004}, {1092,8.0326334635607362e-004}, {1100,7.4699703712067622e-004}, {1108,6.8686914125898400e-004}, {1124,6.5196316982209072e-004}, {1132,5.5567312318753614e-004}, {1140,5.2994457219944307e-004}, {1156,4.6682219255616891e-004}, {1164,4.3876537976640195e-004}, {1172,4.1146632073153029e-004}, {1188,3.5357795107233259e-004}, {1196,3.0877073012104656e-004}, {1204,2.6822617743574973e-004}, {1220,2.5033362071847943e-004}, {1228,2.1863867108986047e-004}, {1236,2.0596013994919981e-004}, {1252,1.8323195135664129e-004}, {1260,1.7333433216915677e-004}, {1268,1.5633624254711054e-004}, {1284,1.4393232807096736e-004}, {1292,1.2277560867267009e-004}, {1300,1.1465793746714892e-004}, {1316,1.0191413122700700e-004}, {1324,8.1867039248070513e-005}, {1332,7.8431433186037722e-005}, {1348,7.2383969562514247e-005}, {1356,6.6825417721418366e-005}, {1364,6.0613164147566955e-005}, {1380,4.6630387101717020e-005}, {1388,4.4010568324399783e-005}, {1396,4.0114832856718015e-005}, {1412,3.4875054946792336e-005}, {1420,3.0101413614281533e-005}, {1428,2.8417391620922264e-005}, {1444,2.6213084880954392e-005}, {1452,2.3752776335519446e-005}, {1460,2.1890176609750613e-005}, {1476,1.8509508627468985e-005}, {1484,1.5065649535518435e-005}, {1492,1.2832740850790327e-005}, {1508,1.1680997301984717e-005}, {1516,1.0208393576796333e-005}, {1524,9.4608914834071713e-006}, {1540,7.8789954003913509e-006}, {1548,7.3223994040524376e-006}, {1556,6.6409770675495833e-006}, {1572,5.5194073039720431e-006}, {1580,4.9081001558435621e-006}, {1588,4.2229484283145878e-006}, {1604,3.8791863975215569e-006}, {1612,3.1953143493845000e-006}, {1620,3.1057402617968086e-006}, {1636,2.5721453574782594e-006}, {1644,2.1933274674212952e-006}, {1652,1.9096328169789295e-006}, {1668,1.5149134878403266e-006}, {1676,1.3423753702614785e-006}, {1684,1.1665513080401536e-006}, {1700,1.0979116718930368e-006}, {1716,7.9436412116644319e-007}, {1732,6.4648967256196326e-007}, {1740,5.9321885405760405e-007}, {1748,5.5598601309494798e-007}, {1764,4.7099559274348864e-007}, {1772,3.9473704112781983e-007}, {1780,3.4539582379305429e-007}, {1796,2.8727953813348173e-007}, {1804,2.3541400746460627e-007}, {1812,1.8722477917028666e-007}, {1828,1.6330365734849523e-007}, {1836,1.5202231889141670e-007}, {1844,1.3364601178839851e-007}, {1860,9.6604532860623770e-008}, {1868,7.7470411280396533e-008}, {1876,6.1616682588234510e-008}, {1892,5.8120812232061763e-008}, {1900,5.1012831661719467e-008}, {1908,4.5075230318312228e-008}, {1924,3.9606752222701068e-008}, {1932,3.3409606360542743e-008}, {1940,3.1674683106859002e-008}, {1956,2.4294146093363001e-008}, {1964,1.8204565472933071e-008}, {1972,1.4824934974757147e-008}, {1988,1.1433160013805433e-008}, {1996,8.2235519944905098e-009}, {2004,7.3387411351118026e-009}, {2020,4.9740407403408641e-009}, {2036,4.4089762366160695e-009}, {2052,2.3348754868371580e-009}, {2060,1.6166172598120891e-009}, {2084,1.3584606796639482e-009}, {2092,8.2150193264883014e-010}, {2100,6.6188899330992602e-010}, {2116,4.3183816987146197e-010}, {2124,3.1733323512833512e-010}, {2132,2.2711722593678058e-010}, {2148,1.7940683646047771e-010}, {2164,1.2215436908891429e-010}, {2180,1.0480513655207688e-010}, {2196,5.1022515687880935e-011}, {2228,1.6324050614206110e-011}, {2252,8.5168959726292736e-012}, {2260,5.0470494652617918e-012}, {2276,3.1386338862096768e-012}, {2340,5.3624900568406537e-013}, {2420,1.5772029578943099e-014}}; FriedmanValues FriedmanData4_12[303]={ {302,0.0}, {0,9.9999999999000277e-001}, {8,9.9866695739474576e-001}, {16,9.8339059226325154e-001}, {24,9.7609628363917467e-001}, {32,9.4823643273704428e-001}, {40,9.3493594957924409e-001}, {48,9.0953551104932773e-001}, {56,9.0145418560602542e-001}, {64,8.5516419598649063e-001}, {72,8.4963778310144522e-001}, {80,8.1799919722370773e-001}, {88,7.9786818484460043e-001}, {96,7.7866857847445126e-001}, {104,7.6034233619473890e-001}, {120,7.0786062606650668e-001}, {128,6.7600004422676296e-001}, {136,6.6840795151281041e-001}, {144,6.3944368992025435e-001}, {152,6.2217354300775751e-001}, {160,5.8261485200955021e-001}, {168,5.7002135508496110e-001}, {176,5.4605949040045054e-001}, {184,5.3461672166221974e-001}, {192,5.1280147174150170e-001}, {200,5.0934659178241204e-001}, {208,4.7467791184204117e-001}, {216,4.6523428691634533e-001}, {224,4.2919336920224055e-001}, {232,4.1205391589399237e-001}, {248,4.0385653754524736e-001}, {256,3.7415869425475418e-001}, {264,3.7237561545830788e-001}, {272,3.4538962421772634e-001}, {280,3.3253148271140742e-001}, {288,3.2034889228926433e-001}, {296,3.1158445797521095e-001}, {304,2.8381590225623671e-001}, {312,2.7855064447645100e-001}, {320,2.6851098475298535e-001}, {328,2.6370462286990620e-001}, {336,2.5451482745261828e-001}, {344,2.4581812983746115e-001}, {352,2.2511618485084187e-001}, {360,2.2121447218878967e-001}, {376,2.0250689371155720e-001}, {384,1.8893648224486806e-001}, {392,1.8572212912214961e-001}, {400,1.7189796851442296e-001}, {408,1.6823696725907292e-001}, {416,1.6264160131462604e-001}, {424,1.5468658439012412e-001}, {432,1.4712867570015387e-001}, {440,1.4391424625139532e-001}, {456,1.3026783297119748e-001}, {464,1.2212247420389673e-001}, {472,1.1628406346077801e-001}, {480,1.1069804831199802e-001}, {488,1.0713397811517929e-001}, {504,9.8756314723028982e-002}, {512,8.9582811966199521e-002}, {520,8.8868090505402453e-002}, {528,8.6104543990510235e-002}, {536,8.3519012464677522e-002}, {544,7.4877619038328180e-002}, {552,7.2558883615795058e-002}, {560,6.8115032569065412e-002}, {568,6.6003987805573164e-002}, {576,6.4036878164229857e-002}, {584,6.2855528549892584e-002}, {592,5.5596733356514376e-002}, {600,5.4701441334777695e-002}, {608,5.0627631036893592e-002}, {616,4.8297461865281069e-002}, {632,4.5334874721628615e-002}, {640,4.2702029319559437e-002}, {648,4.2055037136264177e-002}, {656,3.9392951457387138e-002}, {664,3.7134427832428284e-002}, {672,3.4514787422573141e-002}, {680,3.3516241130760398e-002}, {688,3.0613823313110359e-002}, {696,3.0172714562285329e-002}, {704,2.7561281104174270e-002}, {712,2.7145886624530994e-002}, {720,2.5574815968166457e-002}, {728,2.4489015774615690e-002}, {736,2.2390709327025433e-002}, {744,2.1724078141873670e-002}, {760,1.9839319202534716e-002}, {768,1.9295540882345714e-002}, {776,1.9212757952665454e-002}, {784,1.6713456391034987e-002}, {792,1.6175767419333683e-002}, {800,1.5040607329454810e-002}, {808,1.4302548630919683e-002}, {816,1.3704611189486961e-002}, {824,1.3312592036607325e-002}, {832,1.1514785626991602e-002}, {840,1.1344885635772682e-002}, {848,1.0709214449458397e-002}, {856,1.0243598395862986e-002}, {864,9.7963040759716912e-003}, {872,9.2434462893610393e-003}, {888,8.6170052709744517e-003}, {896,7.9156264793948661e-003}, {904,7.7053787863239492e-003}, {912,7.2938926989339643e-003}, {920,7.1038744953549043e-003}, {928,6.1816458591352260e-003}, {936,6.0906388651652456e-003}, {944,5.3660365282310486e-003}, {952,5.1344907422441743e-003}, {968,4.8384532252849083e-003}, {976,4.4750842107310809e-003}, {984,4.3017040655004470e-003}, {992,3.9615259600526836e-003}, {1000,3.7454798174133279e-003}, {1016,3.4301970399504590e-003}, {1024,3.0617207775800884e-003}, {1032,3.0489027194005778e-003}, {1040,2.8860603243469917e-003}, {1048,2.7304446155681584e-003}, {1056,2.6216950041918121e-003}, {1064,2.4840485159599206e-003}, {1072,2.1636783943272996e-003}, {1080,2.1342117110757933e-003}, {1088,1.9142414537881441e-003}, {1096,1.8598614026462594e-003}, {1104,1.7130076652565832e-003}, {1112,1.6123252755994417e-003}, {1120,1.4593860981571790e-003}, {1128,1.4225341149206290e-003}, {1144,1.3423214854911916e-003}, {1152,1.2417225206596571e-003}, {1160,1.2154951551496360e-003}, {1168,1.0560268959187863e-003}, {1176,1.0261401461094054e-003}, {1184,9.2928969185221118e-004}, {1192,8.6477641504142369e-004}, {1200,8.2548250824116020e-004}, {1208,8.0072066759355107e-004}, {1216,7.3824101178270897e-004}, {1224,7.2935175219729115e-004}, {1232,6.3461207409999480e-004}, {1240,6.0172804034290333e-004}, {1248,5.6949834052460026e-004}, {1256,5.5530950039819947e-004}, {1272,4.6272606464030336e-004}, {1280,4.2492818970860606e-004}, {1288,4.1851462171263438e-004}, {1296,3.9773812688018688e-004}, {1304,3.7619136654681639e-004}, {1312,3.2284439462723901e-004}, {1320,3.1190340139973456e-004}, {1328,2.9323509526264481e-004}, {1336,2.8100547690182448e-004}, {1344,2.5495048553021905e-004}, {1352,2.4783924542944724e-004}, {1360,2.2437711594462559e-004}, {1368,2.1735394640357670e-004}, {1376,1.9242865771094557e-004}, {1384,1.7848252502010323e-004}, {1400,1.6749543770099872e-004}, {1408,1.4585058029606461e-004}, {1416,1.4441013007703040e-004}, {1424,1.2983383162229261e-004}, {1432,1.1937708900228272e-004}, {1440,1.1391400374211828e-004}, {1448,1.0656790083477183e-004}, {1456,9.3871352082402359e-005}, {1464,9.0443840478305064e-005}, {1480,8.2423266681576135e-005}, {1488,7.5860461107799711e-005}, {1496,7.3977598172398861e-005}, {1504,5.9908802243705409e-005}, {1512,5.6470497855539285e-005}, {1528,4.9308473558389601e-005}, {1536,4.6519287409234480e-005}, {1544,4.5994397308849442e-005}, {1552,3.9629547866256739e-005}, {1560,3.8626191782862634e-005}, {1568,3.4594246796568514e-005}, {1576,3.2413157146568059e-005}, {1584,3.0787925803538543e-005}, {1592,2.9711075132595058e-005}, {1600,2.5795519901666761e-005}, {1608,2.5279392421532172e-005}, {1616,2.2412467484241417e-005}, {1624,2.0220805905902332e-005}, {1632,1.7907288522994362e-005}, {1640,1.7217023629652750e-005}, {1656,1.5046132899491391e-005}, {1664,1.2960418573454205e-005}, {1672,1.2291858003746976e-005}, {1680,1.1650042230203045e-005}, {1688,1.0860132366770854e-005}, {1696,1.0037983465469443e-005}, {1704,9.6011195975181564e-006}, {1712,7.8142645390988683e-006}, {1720,7.4746193076948120e-006}, {1728,6.9415974485274345e-006}, {1736,6.7577240363784840e-006}, {1744,5.6669739699573455e-006}, {1752,5.4080418791150420e-006}, {1760,5.2516905954932035e-006}, {1768,4.8145683540963625e-006}, {1784,4.4463298525483687e-006}, {1800,3.5605363326395748e-006}, {1808,2.9908847496633315e-006}, {1816,2.7790169628776171e-006}, {1824,2.4213680858854505e-006}, {1832,2.3319520498062499e-006}, {1840,1.8693110825094865e-006}, {1848,1.8229345020306577e-006}, {1856,1.6980332131822696e-006}, {1864,1.6379369029864036e-006}, {1872,1.4648816047857892e-006}, {1880,1.3430847876075402e-006}, {1888,1.1524847310194137e-006}, {1896,1.0909516007579297e-006}, {1912,9.6975818988731092e-007}, {1920,8.8697251000670824e-007}, {1928,8.5248310318513356e-007}, {1936,7.2684429846160505e-007}, {1944,7.0178367904681676e-007}, {1952,5.6885941110410057e-007}, {1960,5.2796566521080218e-007}, {1968,4.7794444470680059e-007}, {1976,4.5540154591775597e-007}, {1992,3.5463789731319710e-007}, {2000,3.3959871508865322e-007}, {2008,3.0753064602006527e-007}, {2016,2.7149212622527782e-007}, {2024,2.3290697041718541e-007}, {2040,1.8389243913113284e-007}, {2048,1.6117396610881559e-007}, {2056,1.5990244085619192e-007}, {2064,1.4444496863518528e-007}, {2072,1.3190563732687208e-007}, {2080,1.1401996652001182e-007}, {2088,1.0705702553368380e-007}, {2096,9.9459252470789123e-008}, {2104,8.8899815579577979e-008}, {2112,8.1034367516684504e-008}, {2120,7.9888537453790089e-008}, {2136,6.5531353560268622e-008}, {2144,4.9398649208928864e-008}, {2152,4.4259546293034239e-008}, {2168,3.9358821832195532e-008}, {2176,3.0017301065069266e-008}, {2184,2.9331478016873912e-008}, {2192,2.3705295397507997e-008}, {2200,2.1739974335736834e-008}, {2208,2.0069590227091646e-008}, {2216,1.8587011560657546e-008}, {2224,1.4554442695961395e-008}, {2232,1.4146388746695349e-008}, {2240,1.0634672758142145e-008}, {2248,1.0385190794262648e-008}, {2256,1.0076547947432591e-008}, {2264,9.5470493704087917e-009}, {2280,7.0414416633818452e-009}, {2296,6.0598220864484734e-009}, {2304,5.2013820605265358e-009}, {2312,5.0611135154663323e-009}, {2320,4.1029154024576693e-009}, {2328,3.6271994462980180e-009}, {2336,3.2080419882084066e-009}, {2344,2.6591556438247100e-009}, {2352,1.9675284887443132e-009}, {2360,1.8320152106021567e-009}, {2368,1.5919018322925440e-009}, {2376,1.4308792678101677e-009}, {2384,9.9124971532710603e-010}, {2400,7.3344011982993562e-010}, {2408,6.7427923687937346e-010}, {2424,4.6435352318383092e-010}, {2432,4.2063345719104026e-010}, {2440,3.8055673003098214e-010}, {2448,2.7366968557458156e-010}, {2456,2.4186275925707515e-010}, {2464,1.5997438168327676e-010}, {2472,1.1703503115464304e-010}, {2504,9.7256906062666304e-011}, {2512,5.8741609830922132e-011}, {2520,4.1739361944836866e-011}, {2528,3.2023791724216712e-011}, {2536,2.7757457723116469e-011}, {2552,1.9950303081546706e-011}, {2560,1.4398548669763762e-011}, {2576,1.1535925301188183e-011}, {2592,8.0660787938238455e-012}, {2600,7.1552440856407073e-012}, {2616,4.6396053678015597e-012}, {2624,2.8731380549615324e-012}, {2632,1.8972437247653124e-012}, {2664,8.5628977255601032e-013}, {2696,4.2255895913546788e-013}, {2704,2.4906663376725090e-013}, {2720,1.5443445629367798e-013}, {2792,2.4315212267515255e-014}, {2880,6.5716789912203397e-016}}; FriedmanValues FriedmanData4_13[293]={ {292,0.0}, {4,9.9999999998908962e-001}, {12,9.9302287201371797e-001}, {20,9.8410970413832599e-001}, {36,9.5849085295315595e-001}, {44,9.2910238432035996e-001}, {52,9.0657989639762759e-001}, {68,8.8500758607905017e-001}, {76,8.4542752190927506e-001}, {84,8.2647903311475845e-001}, {100,7.9017925192710003e-001}, {108,7.6937606113841961e-001}, {116,7.4812411851171456e-001}, {132,7.0236725896965579e-001}, {140,6.7441138692465230e-001}, {148,6.4764665254658838e-001}, {164,6.3481392066765763e-001}, {172,5.8786928910305192e-001}, {180,5.7665141031657763e-001}, {196,5.4442625336683848e-001}, {204,5.2227896081145209e-001}, {212,5.0342889480225328e-001}, {228,4.7638779387919794e-001}, {236,4.5990970197288239e-001}, {244,4.3625055941379420e-001}, {260,4.1366365927817772e-001}, {268,3.8605166902357002e-001}, {276,3.7945662214408205e-001}, {292,3.5416656149561532e-001}, {300,3.4262041602891591e-001}, {308,3.2977582891355417e-001}, {324,3.0871577203383382e-001}, {332,2.8825371502611913e-001}, {340,2.7443171488197177e-001}, {356,2.6560084091816460e-001}, {364,2.4149479606184576e-001}, {372,2.3376208421672723e-001}, {388,2.2643383554817226e-001}, {396,2.1975016899371569e-001}, {404,2.1017933118036219e-001}, {420,1.8878301736896158e-001}, {428,1.7758770525534168e-001}, {436,1.6960954830844238e-001}, {452,1.6198123777733700e-001}, {460,1.5267320122361405e-001}, {468,1.4825588352594049e-001}, {484,1.3767905242661288e-001}, {492,1.3144979260476633e-001}, {500,1.2775799962015963e-001}, {516,1.1721467632259880e-001}, {524,1.0763714145264272e-001}, {532,9.9985353414662387e-002}, {548,9.7105124398618542e-002}, {556,9.1800462243911266e-002}, {564,8.8018878230385747e-002}, {580,8.3177702831474090e-002}, {588,7.8773275726155625e-002}, {596,7.6321104030104850e-002}, {612,6.9350783948990011e-002}, {620,6.3933533050296712e-002}, {628,6.0506787002355511e-002}, {644,5.7987707017318021e-002}, {652,5.2016316684910052e-002}, {660,5.1310884236083903e-002}, {676,4.8625779594230673e-002}, {684,4.6579214255032766e-002}, {692,4.3627664139928191e-002}, {708,3.9690435468364454e-002}, {716,3.8671205454713489e-002}, {724,3.6236728487883674e-002}, {740,3.3960217431303508e-002}, {748,3.0640561438478101e-002}, {756,2.9844167331330270e-002}, {772,2.6817746975406561e-002}, {780,2.6138057718180986e-002}, {788,2.4828017330616809e-002}, {804,2.3270103329575180e-002}, {812,2.1556205917016291e-002}, {820,2.0481172776862053e-002}, {836,1.9446965360747907e-002}, {844,1.7134670757172885e-002}, {852,1.6500016057622476e-002}, {868,1.5665646603104884e-002}, {876,1.4937082362610278e-002}, {884,1.4223817296714935e-002}, {900,1.2855573085255119e-002}, {908,1.1893740439749497e-002}, {916,1.1161363972554194e-002}, {932,1.0468492465493409e-002}, {940,9.7041940019663223e-003}, {948,9.4448778484889154e-003}, {964,8.7701206398014750e-003}, {972,8.1537766308180555e-003}, {980,7.7355004514145769e-003}, {996,7.0940345901118890e-003}, {1004,6.6098389631055413e-003}, {1012,6.0644830692290486e-003}, {1028,5.9204348839245260e-003}, {1036,5.3879885775639886e-003}, {1044,5.1283737175644986e-003}, {1060,4.5705656505956975e-003}, {1068,4.3415739962317504e-003}, {1076,4.2446043266582073e-003}, {1092,3.7104028487423449e-003}, {1100,3.5265366522478085e-003}, {1108,3.3172711263873621e-003}, {1124,3.1960613384133217e-003}, {1132,2.8414904169462908e-003}, {1140,2.7426334364483410e-003}, {1156,2.4943146210931089e-003}, {1164,2.3779363188232506e-003}, {1172,2.2692695270880069e-003}, {1188,2.0353929545170670e-003}, {1196,1.8483177229833123e-003}, {1204,1.6732937939573937e-003}, {1220,1.5922460250653761e-003}, {1228,1.4453938141926368e-003}, {1236,1.3898734480776089e-003}, {1252,1.2861539226766839e-003}, {1260,1.2314462724611322e-003}, {1268,1.1463802720650101e-003}, {1284,1.0811205892242617e-003}, {1292,9.6438210931110776e-004}, {1300,9.1938220924357662e-004}, {1316,8.4618915685419165e-004}, {1324,7.3077003844579456e-004}, {1332,7.0647239750730136e-004}, {1348,6.6640193539912258e-004}, {1356,6.3387283600933539e-004}, {1364,5.9184296368134661e-004}, {1380,4.9736605495232812e-004}, {1388,4.7546628740626021e-004}, {1396,4.4724965908154269e-004}, {1412,4.0926098476326057e-004}, {1420,3.7133380589788744e-004}, {1428,3.5514484113722275e-004}, {1444,3.3773074057537626e-004}, {1452,3.1720229454636526e-004}, {1460,3.0128379954268175e-004}, {1476,2.6888378824739328e-004}, {1484,2.3407783486144185e-004}, {1492,2.1179574712369744e-004}, {1508,1.9913088060366255e-004}, {1516,1.8145595803341173e-004}, {1524,1.7415308777260545e-004}, {1540,1.5441036562395798e-004}, {1548,1.4719346825969832e-004}, {1556,1.3849496939922752e-004}, {1572,1.2160114861506014e-004}, {1580,1.1305330875140135e-004}, {1588,1.0255692408203332e-004}, {1604,9.8224929426799629e-005}, {1612,8.7195917896916496e-005}, {1620,8.5357762762691512e-005}, {1636,7.6388296169528248e-005}, {1644,6.9395861498737306e-005}, {1652,6.4316935776611051e-005}, {1668,5.6529643888250918e-005}, {1676,5.2644055220429242e-005}, {1684,4.7485967236962748e-005}, {1700,4.4997675377934882e-005}, {1708,3.7640818113707298e-005}, {1716,3.7003643585165668e-005}, {1732,3.3258140597878703e-005}, {1740,3.1100578126461841e-005}, {1748,2.9630422363529380e-005}, {1764,2.6339780052497046e-005}, {1772,2.3028325338863058e-005}, {1780,2.1504051928023801e-005}, {1796,2.0066534722845322e-005}, {1804,1.7750311236987630e-005}, {1812,1.6197214446254971e-005}, {1828,1.5003534712077952e-005}, {1836,1.4385560969542528e-005}, {1844,1.3190661956603787e-005}, {1860,1.0914278864940909e-005}, {1868,9.8049256620313869e-006}, {1876,8.8741648398035807e-006}, {1892,8.1823434352574740e-006}, {1900,7.5653369618331000e-006}, {1908,7.1106234661059650e-006}, {1924,6.4215067648536049e-006}, {1932,5.8273551383457961e-006}, {1940,5.5711596129258931e-006}, {1956,4.8881157508595754e-006}, {1964,4.2945939299153655e-006}, {1972,3.8047129323939310e-006}, {1988,3.4382156320248955e-006}, {1996,2.9181530266773603e-006}, {2004,2.7827476305319831e-006}, {2020,2.4579732694819469e-006}, {2028,2.3436005996362450e-006}, {2036,2.2600138695452582e-006}, {2052,1.8256491289961256e-006}, {2060,1.6313824856038454e-006}, {2068,1.5261155641790369e-006}, {2084,1.4439927532934479e-006}, {2092,1.2057332982009086e-006}, {2100,1.1272858563471600e-006}, {2116,9.8932011747331610e-007}, {2124,9.0221277810489327e-007}, {2132,7.9962625746680631e-007}, {2148,7.4186523367943883e-007}, {2156,6.6453572708276958e-007}, {2164,5.8459272136301359e-007}, {2180,5.4747225085383184e-007}, {2188,4.4914413586948618e-007}, {2196,4.2106496685872343e-007}, {2212,3.2936927735777323e-007}, {2220,3.1247213920557666e-007}, {2228,2.8612220434599170e-007}, {2244,2.5290948420113267e-007}, {2252,2.3312365677281241e-007}, {2260,2.0743227315077651e-007}, {2276,1.9252283566671588e-007}, {2284,1.5708563271425614e-007}, {2292,1.4876517079836874e-007}, {2308,1.3675713591417029e-007}, {2316,1.2822140928828308e-007}, {2324,1.1593163091799363e-007}, {2340,9.2402398686696688e-008}, {2348,7.9992231921755504e-008}, {2356,7.1154790696379016e-008}, {2372,6.1010523732746821e-008}, {2380,5.0505232547673659e-008}, {2388,4.9429594588085482e-008}, {2404,4.4036962539809538e-008}, {2412,3.5688848477354888e-008}, {2420,3.3569993936481675e-008}, {2436,2.8190527288694781e-008}, {2444,2.5050476219916354e-008}, {2452,2.2306497067626900e-008}, {2468,2.0082472744163783e-008}, {2476,1.7972193422914236e-008}, {2484,1.6716576233625769e-008}, {2500,1.4386448784864012e-008}, {2508,1.3468567101007450e-008}, {2516,1.2482393350534064e-008}, {2532,9.4490373784214066e-009}, {2540,8.2570412706147850e-009}, {2548,6.8830013306248004e-009}, {2564,6.1283104545876322e-009}, {2572,4.6832553084988382e-009}, {2580,4.3669354262715247e-009}, {2596,3.6406880090981434e-009}, {2604,3.3597967054803661e-009}, {2612,2.7113435098691822e-009}, {2628,2.5700631179184310e-009}, {2636,2.1774803796258487e-009}, {2644,1.7999742229829356e-009}, {2660,1.4801868764818958e-009}, {2668,1.1980582352380566e-009}, {2676,1.1572645379000936e-009}, {2692,1.1373375642789840e-009}, {2700,1.0690519050491749e-009}, {2708,9.0891848873445729e-010}, {2724,6.7801121123188145e-010}, {2732,5.3534860351530666e-010}, {2740,4.8707677359727450e-010}, {2756,4.1167677898355146e-010}, {2772,2.9045898367909040e-010}, {2788,2.0141766210737946e-010}, {2796,1.8336591708641279e-010}, {2804,1.6211047855722911e-010}, {2820,1.0374665812236809e-010}, {2828,7.4943317687825182e-011}, {2836,6.0955279899059077e-011}, {2852,5.8891033381931259e-011}, {2860,4.3517576133833977e-011}, {2868,3.8724850645541358e-011}, {2884,3.1394799898740879e-011}, {2892,2.3060925186032412e-011}, {2900,2.1933225071140033e-011}, {2916,1.5197637453086490e-011}, {2924,8.4527947204536512e-012}, {2948,7.0118445736467200e-012}, {2964,5.7901694491799735e-012}, {2980,2.8534503999810637e-012}, {2988,2.5864759409629809e-012}, {2996,2.0140827008282119e-012}, {3020,1.2523155777632826e-012}, {3028,9.2197918047157539e-013}, {3044,7.5538711804429188e-013}, {3060,4.1081208293828657e-013}, {3076,3.0509019716712585e-013}, {3092,2.5383110103565398e-013}, {3108,9.9697846695880903e-014}, {3140,4.4167159220119724e-014}, {3180,2.0673406826528449e-014}, {3188,1.2130224137949804e-014}, {3204,7.5026668483030394e-015}, {3284,1.0952798318690568e-015}, {3380,2.7381995796726421e-017}}; FriedmanValues FriedmanData4_14[412]={ {411,0.0}, {0,9.9999999998817724e-001}, {8,9.9893254785546282e-001}, {16,9.8662441212662078e-001}, {24,9.8071130089571068e-001}, {32,9.5798701459771363e-001}, {40,9.4707100694177948e-001}, {48,9.2609535263152387e-001}, {56,9.1937967587107550e-001}, {64,8.8067079840382134e-001}, {72,8.7602136523479901e-001}, {80,8.4923142958229891e-001}, {88,8.3207725882270900e-001}, {96,8.1560857271047249e-001}, {104,7.9978970817271433e-001}, {120,7.5420361502444289e-001}, {128,7.2617321911462773e-001}, {136,7.1944833094319949e-001}, {144,6.9362268242384351e-001}, {152,6.7812375012306725e-001}, {160,6.4239646930989536e-001}, {168,6.3095321071125188e-001}, {176,6.0901610253296234e-001}, {184,5.9847646753373862e-001}, {192,5.7824598247244885e-001}, {200,5.7501655715721256e-001}, {208,5.4241977120002660e-001}, {216,5.3348062814373887e-001}, {224,4.9914410160123512e-001}, {232,4.8269051461943757e-001}, {248,4.7477768452331076e-001}, {256,4.4568409013814841e-001}, {264,4.4393041820235879e-001}, {272,4.1713217526809565e-001}, {280,4.0427498203268042e-001}, {288,3.9198255929586712e-001}, {296,3.8309966151905134e-001}, {304,3.5473358916063252e-001}, {312,3.4930746642611593e-001}, {320,3.3889098497840747e-001}, {328,3.3387865497227043e-001}, {336,3.2423985523946713e-001}, {344,3.1503117862401503e-001}, {352,2.9295180022890416e-001}, {360,2.8874378661411332e-001}, {376,2.6847630209625412e-001}, {384,2.5356113487967208e-001}, {392,2.4999593770709080e-001}, {400,2.3457383915762417e-001}, {408,2.3046215838644149e-001}, {416,2.2413998394384124e-001}, {424,2.1507068360298759e-001}, {432,2.0638423695836919e-001}, {440,2.0267009911369757e-001}, {456,1.8673148991929314e-001}, {464,1.7703284012930717e-001}, {472,1.7004035192107234e-001}, {480,1.6331458542183844e-001}, {488,1.5900052446931792e-001}, {504,1.4873615522649314e-001}, {512,1.3736178636544494e-001}, {520,1.3646291109167380e-001}, {528,1.3298233413214677e-001}, {536,1.2967955048592578e-001}, {544,1.1857298076937625e-001}, {552,1.1555473929590246e-001}, {560,1.0974269980657553e-001}, {568,1.0695958408734618e-001}, {576,1.0432433705102698e-001}, {584,1.0273618616861839e-001}, {592,9.2939696009980144e-002}, {600,9.1739495195896623e-002}, {608,8.6139996386378356e-002}, {616,8.2915083070252901e-002}, {632,7.8787883778085530e-002}, {640,7.5036800592670636e-002}, {648,7.4119988792923877e-002}, {656,7.0257748570801207e-002}, {664,6.6960676378771011e-002}, {672,6.3067738481414171e-002}, {680,6.1573968680469673e-002}, {688,5.7230533931566775e-002}, {696,5.6553561024389930e-002}, {704,5.2576191239681651e-002}, {712,5.1939462342473729e-002}, {720,4.9507029896017733e-002}, {728,4.7790877670767770e-002}, {736,4.4470641419425125e-002}, {744,4.3408533898176560e-002}, {760,4.0371172982337791e-002}, {768,3.9464817437799241e-002}, {776,3.9323247226692698e-002}, {784,3.5120089578094399e-002}, {792,3.4210765300851001e-002}, {800,3.2275273615062133e-002}, {808,3.0994537826756308e-002}, {816,2.9946500088321198e-002}, {824,2.9263764587326775e-002}, {832,2.6059090531539625e-002}, {840,2.5753232411770275e-002}, {848,2.4590801613469330e-002}, {856,2.3742840725825703e-002}, {864,2.2925049550830297e-002}, {872,2.1895350427410459e-002}, {888,2.0695113256656850e-002}, {896,1.9349148875864461e-002}, {904,1.8932371420768167e-002}, {912,1.8120855314115666e-002}, {920,1.7738002003116930e-002}, {928,1.5882881658769814e-002}, {936,1.5701339251007470e-002}, {944,1.4198234783569862e-002}, {952,1.3715788204865586e-002}, {968,1.3096364584379197e-002}, {976,1.2320017503146723e-002}, {984,1.1932515848641431e-002}, {992,1.1177129917120754e-002}, {1000,1.0694100207046883e-002}, {1016,9.9906453364036665e-003}, {1024,9.1439144611974183e-003}, {1032,9.1161785067351321e-003}, {1040,8.7322730804268445e-003}, {1048,8.3635617551494745e-003}, {1056,8.1012662868106735e-003}, {1064,7.7665613325799297e-003}, {1072,6.9739634916091116e-003}, {1080,6.8992608359938956e-003}, {1088,6.3329822601003042e-003}, {1096,6.1943753714075334e-003}, {1104,5.8077657133945642e-003}, {1112,5.5498851965775009e-003}, {1120,5.1387173500713453e-003}, {1128,5.0328209818058184e-003}, {1144,4.8150267097951402e-003}, {1152,4.5272661304040758e-003}, {1160,4.4549195741046092e-003}, {1168,4.0029566355565867e-003}, {1176,3.9171123232453189e-003}, {1184,3.6330764833940443e-003}, {1192,3.4404329647796665e-003}, {1200,3.3257525079761260e-003}, {1208,3.2473246488684574e-003}, {1216,3.0505139273289805e-003}, {1224,3.0208226360589358e-003}, {1232,2.7188493285861272e-003}, {1240,2.6082300243531532e-003}, {1248,2.5006911306357858e-003}, {1256,2.4512048719032092e-003}, {1272,2.1342052369627061e-003}, {1280,2.0015160153065378e-003}, {1288,1.9795589881152114e-003}, {1296,1.9020722204373119e-003}, {1304,1.8220172996274743e-003}, {1312,1.6231500557339421e-003}, {1320,1.5851960296963058e-003}, {1328,1.5163834282298384e-003}, {1336,1.4691745587189541e-003}, {1344,1.3732396316562491e-003}, {1352,1.3448006495860973e-003}, {1360,1.2467108815511383e-003}, {1368,1.2195473505281873e-003}, {1376,1.1125813572966719e-003}, {1384,1.0541525667966479e-003}, {1400,1.0029227547657881e-003}, {1408,9.0493126763829216e-004}, {1416,8.9691416943772932e-004}, {1424,8.2732428924021039e-004}, {1432,7.7724805417553929e-004}, {1440,7.5208094701052482e-004}, {1448,7.1505200648718783e-004}, {1456,6.5089817633826378e-004}, {1464,6.3542655209890980e-004}, {1480,5.9547487477028553e-004}, {1488,5.6044667775533973e-004}, {1496,5.4972903657902854e-004}, {1504,4.7391501842634681e-004}, {1512,4.5413369618349725e-004}, {1528,4.1475193636609598e-004}, {1536,3.9782069699048953e-004}, {1544,3.9413374748751727e-004}, {1552,3.5519732717465593e-004}, {1560,3.4835189714356468e-004}, {1568,3.2154018909692875e-004}, {1576,3.0696595129173074e-004}, {1584,2.9360825388962628e-004}, {1592,2.8544709812995027e-004}, {1600,2.5783195879079012e-004}, {1608,2.5440598286438577e-004}, {1616,2.3397166700097152e-004}, {1624,2.1757130757394053e-004}, {1632,1.9971902425742330e-004}, {1640,1.9503161288559270e-004}, {1656,1.7854570071996695e-004}, {1664,1.6083084270752791e-004}, {1672,1.5551260489410248e-004}, {1680,1.4944234932598303e-004}, {1688,1.4295019711436333e-004}, {1696,1.3562063364953012e-004}, {1704,1.3149892317550985e-004}, {1712,1.1538078605283175e-004}, {1720,1.1187664480704486e-004}, {1728,1.0563742887591416e-004}, {1736,1.0400724889562958e-004}, {1744,9.2046270941038776e-005}, {1752,8.9182560636673398e-005}, {1760,8.6295933576936324e-005}, {1768,8.1186201690736166e-005}, {1784,7.7541202011233298e-005}, {1800,6.6208190806837019e-005}, {1808,5.9151469402583721e-005}, {1816,5.6530050947983648e-005}, {1824,5.2153129340743946e-005}, {1832,5.0360676533875802e-005}, {1840,4.3656580974787244e-005}, {1848,4.2769169185135069e-005}, {1856,4.0924003061162953e-005}, {1864,3.9757291552386467e-005}, {1872,3.7695839908080251e-005}, {1880,3.5739829903474248e-005}, {1888,3.2221833516224617e-005}, {1896,3.1165335162064664e-005}, {1912,2.8259077131357770e-005}, {1920,2.6917585042236759e-005}, {1928,2.6301937540714471e-005}, {1936,2.3759566575075285e-005}, {1944,2.3086278768689548e-005}, {1952,2.0186140382003625e-005}, {1960,1.9178358304322889e-005}, {1968,1.7879810747031541e-005}, {1976,1.7464117711405270e-005}, {1992,1.5011140777529539e-005}, {2000,1.4449857095307874e-005}, {2008,1.3559521277593380e-005}, {2016,1.2571124145553272e-005}, {2024,1.1660970732022035e-005}, {2040,9.9846011323360251e-006}, {2048,9.1591304404540872e-006}, {2056,9.1139638058941256e-006}, {2064,8.4283843592434002e-006}, {2072,7.9166171356085988e-006}, {2080,7.2341174415312997e-006}, {2088,7.0402964738508425e-006}, {2096,6.6918278146224002e-006}, {2104,6.3117465642599036e-006}, {2112,5.9127397099756830e-006}, {2120,5.8081985157832416e-006}, {2128,5.0230009420164742e-006}, {2136,4.9521518894894386e-006}, {2144,4.3580451430499093e-006}, {2152,4.0370396527255302e-006}, {2168,3.8139825318173382e-006}, {2176,3.3258322212632048e-006}, {2184,3.2718195044638795e-006}, {2192,2.8887943316066603e-006}, {2200,2.7569158084935978e-006}, {2208,2.5831811301374422e-006}, {2216,2.4797643865654332e-006}, {2224,2.1831893532933838e-006}, {2232,2.1175924628977988e-006}, {2240,1.8276976811807022e-006}, {2248,1.7881431217072790e-006}, {2256,1.7319958736565133e-006}, {2264,1.6543322914480141e-006}, {2272,1.3910561236517526e-006}, {2280,1.3759928706722998e-006}, {2296,1.2501203701575010e-006}, {2304,1.1396698407775461e-006}, {2312,1.1268491134515642e-006}, {2320,1.0199221081761872e-006}, {2328,9.6946790625159995e-007}, {2336,8.9155098061769223e-007}, {2344,8.1141302285073235e-007}, {2352,7.2171041319738323e-007}, {2360,7.0010033006845086e-007}, {2368,6.2948732295002859e-007}, {2376,6.1378364072199479e-007}, {2384,5.1336838639806294e-007}, {2392,4.6933645854935133e-007}, {2400,4.5420739274676363e-007}, {2408,4.2928369418165696e-007}, {2424,3.7589834896945003e-007}, {2432,3.5895976712611472e-007}, {2440,3.4642946956722238e-007}, {2448,3.1500010555548083e-007}, {2456,2.9764266336012033e-007}, {2464,2.4945784267277722e-007}, {2472,2.3423669755725712e-007}, {2480,2.1896582227866857e-007}, {2488,2.1296004553421754e-007}, {2504,2.0431693222916829e-007}, {2512,1.6608259464941241e-007}, {2520,1.5649913650368522e-007}, {2528,1.3615719160684058e-007}, {2536,1.3064542570656463e-007}, {2552,1.1642382813040326e-007}, {2560,1.0106916113802226e-007}, {2568,9.8743141536272052e-008}, {2576,8.8375832184726473e-008}, {2584,8.1560148194693042e-008}, {2592,7.6078535517044061e-008}, {2600,7.3105828607410507e-008}, {2608,6.0249318754014239e-008}, {2616,5.9679715337649079e-008}, {2624,4.9075486799749977e-008}, {2632,4.6361246585057257e-008}, {2640,4.4206550545079865e-008}, {2648,4.3047784421886160e-008}, {2656,3.8315772959859275e-008}, {2664,3.7436819830443130e-008}, {2680,3.1583114882214509e-008}, {2688,2.9160592260073742e-008}, {2696,2.8758085547190906e-008}, {2704,2.5976636084623374e-008}, {2712,2.4440480724768241e-008}, {2720,2.1407871035262793e-008}, {2728,1.9427460015740619e-008}, {2736,1.8044972529247306e-008}, {2744,1.6757306539346331e-008}, {2760,1.3639323757336166e-008}, {2768,1.1963158492485129e-008}, {2776,1.0866402348904528e-008}, {2784,1.0218444657889875e-008}, {2792,9.1647974438196312e-009}, {2808,7.6751563171953705e-009}, {2816,6.6837964988649760e-009}, {2824,6.6081100703206247e-009}, {2832,5.9691752557697361e-009}, {2840,5.7292609719519995e-009}, {2848,4.5794928076058918e-009}, {2856,4.2665013849509295e-009}, {2864,3.9173748506125851e-009}, {2872,3.5562554676092166e-009}, {2880,3.4863902094969479e-009}, {2888,3.4224268804496979e-009}, {2896,3.1523421393204723e-009}, {2904,3.0268982421532706e-009}, {2912,2.5090686486765142e-009}, {2920,2.3021095734246249e-009}, {2936,2.1349269041664885e-009}, {2944,1.5985100149039927e-009}, {2952,1.5595936819618803e-009}, {2960,1.4119325114492447e-009}, {2968,1.3217684287902158e-009}, {2976,1.1374814772023547e-009}, {2984,1.0390137027764080e-009}, {2992,8.3932055648265574e-010}, {3000,8.1443284144706737e-010}, {3016,7.0212125476789452e-010}, {3024,5.5990001515986409e-010}, {3032,5.1339502221165612e-010}, {3048,4.0171634298332823e-010}, {3064,3.7952056108184555e-010}, {3080,3.1156482295578725e-010}, {3088,2.5614804458259103e-010}, {3096,2.5162288568897971e-010}, {3104,2.1303214293155397e-010}, {3112,1.9214079823683251e-010}, {3120,1.7580875436173136e-010}, {3128,1.6570881393879873e-010}, {3136,1.4086055179548745e-010}, {3144,1.3750094520320696e-010}, {3152,1.2249804850424051e-010}, {3160,1.1067785815462641e-010}, {3168,1.0309916519500068e-010}, {3176,9.1701016969350622e-011}, {3192,6.0208264826174668e-011}, {3200,5.4105876733594062e-011}, {3208,4.9217871027265228e-011}, {3216,3.9147624096941115e-011}, {3224,3.1589488170659755e-011}, {3232,2.8580270723925800e-011}, {3240,2.8137152449613747e-011}, {3248,2.1060757102715686e-011}, {3256,2.0110565339242423e-011}, {3264,1.6862138777228471e-011}, {3272,1.5436851132018570e-011}, {3280,1.1652903469043618e-011}, {3288,9.9947399359982090e-012}, {3296,8.7912190747457919e-012}, {3304,6.4734335312062709e-012}, {3320,5.8201766938183986e-012}, {3328,4.8683237559334628e-012}, {3336,4.7262933437359724e-012}, {3344,3.5385536393943868e-012}, {3352,2.6309294702200735e-012}, {3368,2.3016016431071794e-012}, {3384,1.6940271020401377e-012}, {3392,1.3609616325009938e-012}, {3400,1.2097947610393373e-012}, {3408,1.0548583014896685e-012}, {3416,8.4700385322989101e-013}, {3424,5.1518426449949675e-013}, {3432,4.6036550891450043e-013}, {3456,3.6443268664075698e-013}, {3464,3.0047747179159466e-013}, {3488,1.7422821650493661e-013}, {3496,1.5886235319702099e-013}, {3504,9.4076551142025417e-014}, {3528,7.9509329378180266e-014}, {3536,5.4532385545622438e-014}, {3552,3.4805939407082107e-014}, {3560,2.3177718525416230e-014}, {3592,1.6325374077291700e-014}, {3600,1.3625965658333549e-014}, {3608,1.0199793434271284e-014}, {3624,5.1523788757459860e-015}, {3656,2.2453236553295172e-015}, {3704,9.9944284657960226e-016}, {3712,5.8414924366296387e-016}, {3728,3.6052961132323551e-016}, {3816,4.9059409135756728e-017}, {3920,1.1409164915292263e-018}}; FriedmanValues FriedmanData4_15[390]={ {389,0.0}, {4,9.9999999998727096e-001}, {12,9.9431146004563264e-001}, {20,9.8700557247900900e-001}, {36,9.6589406476419670e-001}, {44,9.4141393508621252e-001}, {52,9.2255173071514607e-001}, {68,9.0438678410597673e-001}, {76,8.7069347120725860e-001}, {84,8.5447329323116483e-001}, {100,8.2323122399363646e-001}, {108,8.0512763487596029e-001}, {116,7.8653204641088392e-001}, {132,7.4626348777368123e-001}, {140,7.2138277102782566e-001}, {148,6.9742865710866575e-001}, {164,6.8588546990491428e-001}, {172,6.4315078135036241e-001}, {180,6.3287594222034793e-001}, {196,6.0319617640858714e-001}, {204,5.8256696437608024e-001}, {212,5.6491133505047308e-001}, {228,5.3943231042694795e-001}, {236,5.2371635607517975e-001}, {244,5.0102342405363387e-001}, {260,4.7921613830094145e-001}, {268,4.5226002951679989e-001}, {276,4.4578079531241388e-001}, {292,4.2080731066673244e-001}, {300,4.0926214824533935e-001}, {308,3.9632839531172687e-001}, {324,3.7499554347880432e-001}, {332,3.5401813860577569e-001}, {340,3.3976621533450280e-001}, {356,3.3061297881623430e-001}, {364,3.0528056194317338e-001}, {372,2.9712371813631672e-001}, {388,2.8932221337800396e-001}, {396,2.8211400095765765e-001}, {404,2.7172366658213493e-001}, {420,2.4837140285708903e-001}, {428,2.3601059731280577e-001}, {436,2.2712874142079104e-001}, {452,2.1858468564605221e-001}, {460,2.0803614118266167e-001}, {468,2.0298627369923883e-001}, {484,1.9082927190783860e-001}, {492,1.8355833934183535e-001}, {500,1.7923420679881685e-001}, {516,1.6679038086322259e-001}, {524,1.5532227994348788e-001}, {532,1.4611352148522169e-001}, {548,1.4260557078870215e-001}, {556,1.3608387764876692e-001}, {564,1.3139611550275301e-001}, {580,1.2536748006389911e-001}, {588,1.1980622116932700e-001}, {596,1.1668900796193589e-001}, {612,1.0774450747353455e-001}, {620,1.0068641947132610e-001}, {628,9.6181536923201985e-002}, {644,9.2880571406527779e-002}, {652,8.4876999980303125e-002}, {660,8.3921785992060932e-002}, {676,8.0256751647529878e-002}, {684,7.7456183014133109e-002}, {692,7.3362759536975866e-002}, {708,6.7861638056851942e-002}, {716,6.6415123883268229e-002}, {724,6.2938352657587654e-002}, {740,5.9639750006404424e-002}, {748,5.4765260549390432e-002}, {756,5.3590267388854931e-002}, {772,4.9087322556255725e-002}, {780,4.8056764123638532e-002}, {788,4.6064334771582061e-002}, {804,4.3676252875021873e-002}, {812,4.1019859308209269e-002}, {820,3.9333244808481382e-002}, {836,3.7704323599432946e-002}, {844,3.3986774956166893e-002}, {852,3.2942208465283868e-002}, {868,3.1577065437088839e-002}, {876,3.0348491265202365e-002}, {884,2.9149796946241244e-002}, {900,2.6839255975550886e-002}, {908,2.5185392880140611e-002}, {916,2.3915823673038402e-002}, {932,2.2702449913306295e-002}, {940,2.1350628969418712e-002}, {948,2.0900258190103143e-002}, {964,1.9675383002981568e-002}, {972,1.8542399930419413e-002}, {980,1.7763475981230441e-002}, {996,1.6558376832377632e-002}, {1004,1.5623264363748363e-002}, {1012,1.4568215407761105e-002}, {1028,1.4284050203206305e-002}, {1036,1.3224795996886177e-002}, {1044,1.2709571047473537e-002}, {1060,1.1595247852963845e-002}, {1068,1.1134292931183721e-002}, {1076,1.0927642773501448e-002}, {1092,9.8053448038205124e-003}, {1100,9.4200332134887575e-003}, {1108,8.9695812136275383e-003}, {1124,8.7081644554965146e-003}, {1132,7.9209290355688623e-003}, {1140,7.6973673560550579e-003}, {1156,7.1289259677583001e-003}, {1164,6.8552960952420411e-003}, {1172,6.6024906017629432e-003}, {1188,6.0547218577786761e-003}, {1196,5.6083796650076507e-003}, {1204,5.1843085827906052e-003}, {1220,4.9839701158164154e-003}, {1228,4.6153414582828789e-003}, {1236,4.4783420651749260e-003}, {1252,4.2180497032666461e-003}, {1260,4.0701571751680220e-003}, {1268,3.8469517390515824e-003}, {1284,3.6719377261213498e-003}, {1292,3.3518342375900402e-003}, {1300,3.2280125025678143e-003}, {1316,3.0230283094648657e-003}, {1324,2.6970328972860764e-003}, {1332,2.6238111121412479e-003}, {1348,2.5044172072139484e-003}, {1356,2.4107936531926957e-003}, {1364,2.2833425394963407e-003}, {1380,1.9960932681417493e-003}, {1388,1.9248279263075535e-003}, {1396,1.8358771666068996e-003}, {1412,1.7156648054067118e-003}, {1420,1.5915504630294134e-003}, {1428,1.5353940406161802e-003}, {1444,1.4779303162081776e-003}, {1452,1.4087169388931112e-003}, {1460,1.3543332275763632e-003}, {1476,1.2389053544588171e-003}, {1484,1.1121597445171972e-003}, {1492,1.0307548828615825e-003}, {1508,9.8311068866937124e-004}, {1516,9.1429148181056195e-004}, {1524,8.8750506898967532e-004}, {1540,8.0898968861790746e-004}, {1548,7.7991008125692304e-004}, {1556,7.4478193783270616e-004}, {1572,6.7345968417861042e-004}, {1580,6.3734637679974180e-004}, {1588,5.9187026624844537e-004}, {1604,5.7416071724372957e-004}, {1612,5.2470151503786861e-004}, {1620,5.1585869614761179e-004}, {1636,4.7490142971352882e-004}, {1644,4.4193866378033810e-004}, {1652,4.1801904462947909e-004}, {1668,3.8037538827673635e-004}, {1676,3.6051172251994686e-004}, {1684,3.3289421184665602e-004}, {1700,3.1882797075932486e-004}, {1708,2.7986411792604784e-004}, {1716,2.7549350681858734e-004}, {1732,2.5517637582225209e-004}, {1740,2.4221172425707027e-004}, {1748,2.3359737993982146e-004}, {1764,2.1364113949491235e-004}, {1772,1.9306821485607425e-004}, {1780,1.8397333142018804e-004}, {1796,1.7614299586965747e-004}, {1804,1.6102840960526831e-004}, {1812,1.5161453101348706e-004}, {1828,1.4348736897630687e-004}, {1836,1.3886713002287269e-004}, {1844,1.2992035242654880e-004}, {1860,1.1329512944507477e-004}, {1868,1.0509367113395386e-004}, {1876,9.8203482785587327e-005}, {1892,9.1805554495022820e-005}, {1900,8.6826369412331669e-005}, {1908,8.3011633957744558e-005}, {1924,7.6763859358086058e-005}, {1932,7.1501083793744681e-005}, {1940,6.9094289088915268e-005}, {1956,6.3028304317959633e-005}, {1964,5.7545430121496463e-005}, {1972,5.2848287271280649e-005}, {1988,4.9626573215376758e-005}, {1996,4.4347751378966513e-005}, {2004,4.3021094994739953e-005}, {2020,3.9753941926504368e-005}, {2028,3.8392661904315755e-005}, {2036,3.7153177523689726e-005}, {2052,3.2268558812450201e-005}, {2060,2.9947349662015193e-005}, {2068,2.8470063677890608e-005}, {2084,2.7129531286812495e-005}, {2092,2.3689858224485686e-005}, {2100,2.2609767418958828e-005}, {2116,2.0587165875923865e-005}, {2124,1.9386656528822671e-005}, {2132,1.7832984634715868e-005}, {2148,1.6899999166099124e-005}, {2156,1.5864257679412105e-005}, {2164,1.4591422716694127e-005}, {2180,1.3925122770445587e-005}, {2188,1.2079780505481625e-005}, {2196,1.1665178013414657e-005}, {2212,1.0022614664528670e-005}, {2220,9.6664412049862710e-006}, {2228,9.2401906666997169e-006}, {2244,8.4916603762842166e-006}, {2252,7.9667551814504916e-006}, {2260,7.3526748044593489e-006}, {2276,6.9832827965245789e-006}, {2284,6.0458254093396534e-006}, {2292,5.7837669615008111e-006}, {2308,5.4025170333847357e-006}, {2316,5.1966730686965108e-006}, {2324,4.8454134032397644e-006}, {2340,4.2228270619688111e-006}, {2348,3.7989883795228157e-006}, {2356,3.5344525547986481e-006}, {2372,3.2515569382240595e-006}, {2380,2.8925965127073086e-006}, {2388,2.8125926565671521e-006}, {2404,2.6310732934469972e-006}, {2412,2.3550466352708906e-006}, {2420,2.2478723883579827e-006}, {2436,1.9908023910130764e-006}, {2444,1.8385140848451819e-006}, {2452,1.6788457847588941e-006}, {2468,1.5904801976890208e-006}, {2476,1.5001995267368935e-006}, {2484,1.4330513747805323e-006}, {2500,1.2585478431899843e-006}, {2508,1.2006915861851645e-006}, {2516,1.1548251372602688e-006}, {2532,9.7021236010326813e-007}, {2540,8.8426225112099264e-007}, {2548,7.9889261248716970e-007}, {2564,7.4457050197967700e-007}, {2572,6.4055172326041737e-007}, {2580,6.1867789772461570e-007}, {2596,5.6699627650506116e-007}, {2604,5.2615815324523972e-007}, {2612,4.8087232810352460e-007}, {2628,4.5320738827640487e-007}, {2636,4.1205367762375611e-007}, {2644,3.6676832827274066e-007}, {2660,3.3096360834680536e-007}, {2668,2.9055652139507296e-007}, {2676,2.8252327634957864e-007}, {2692,2.7083775624151574e-007}, {2700,2.5614972936713430e-007}, {2708,2.3144019978954219e-007}, {2724,1.9914004354492646e-007}, {2732,1.8090467675267536e-007}, {2740,1.7308894458685193e-007}, {2756,1.6152998702118720e-007}, {2764,1.3459816903441839e-007}, {2772,1.3040144815574288e-007}, {2788,1.1206024670715782e-007}, {2796,1.0723870820289715e-007}, {2804,9.8549831599316310e-008}, {2820,8.2239385592158080e-008}, {2828,7.1530865302470854e-008}, {2836,6.6932326984202043e-008}, {2852,6.4318693430780396e-008}, {2860,5.7306994208481321e-008}, {2868,5.4826261750843195e-008}, {2884,5.1368375371238815e-008}, {2892,4.6644799676328482e-008}, {2900,4.4915110126054296e-008}, {2916,3.9035005242019842e-008}, {2924,3.3724410267401462e-008}, {2932,3.0259381616502441e-008}, {2948,2.7917246854255395e-008}, {2956,2.5432516546792939e-008}, {2964,2.3460684870168401e-008}, {2980,2.0037800343872566e-008}, {2988,1.8566462523090418e-008}, {2996,1.7034858625009225e-008}, {3012,1.4273899371453978e-008}, {3020,1.3983479882881602e-008}, {3028,1.2028133765009754e-008}, {3044,1.1608371518070448e-008}, {3052,9.5583851065305982e-009}, {3060,8.7858715198958779e-009}, {3076,7.8556416653828976e-009}, {3084,7.0457052284544541e-009}, {3092,6.8432360999906831e-009}, {3108,6.0930499153770938e-009}, {3116,5.7063666474751993e-009}, {3124,5.1343389027918234e-009}, {3140,4.6445300571930124e-009}, {3148,4.1598661502682746e-009}, {3156,3.9206829908386909e-009}, {3172,3.2997752447117501e-009}, {3180,2.9929445209653819e-009}, {3188,2.8721025880491944e-009}, {3204,2.3945935060658804e-009}, {3212,1.9175637670734803e-009}, {3220,1.7308343574335529e-009}, {3236,1.6637275233572020e-009}, {3244,1.3392581122817230e-009}, {3252,1.2458814021679774e-009}, {3268,1.0981615874068944e-009}, {3276,1.0669695337881086e-009}, {3284,9.8281166946913785e-010}, {3300,8.3282109218033004e-010}, {3308,7.3410026019481861e-010}, {3316,7.0159912327208998e-010}, {3332,5.9075502445741626e-010}, {3340,5.1349272440479029e-010}, {3348,4.9457402432394003e-010}, {3364,4.4878360192110343e-010}, {3372,4.3278045760160161e-010}, {3380,4.0465599613660693e-010}, {3396,3.3074809467770377e-010}, {3404,2.6408447670925361e-010}, {3412,2.1527701616236544e-010}, {3428,2.1314149858861947e-010}, {3436,1.7882630729665236e-010}, {3444,1.5478236218652045e-010}, {3460,1.3074422006289363e-010}, {3468,1.2179398404077432e-010}, {3476,1.0828344490390100e-010}, {3492,9.2499562628813871e-011}, {3500,7.8668811492518888e-011}, {3508,6.7498140337876538e-011}, {3524,6.0599814102858396e-011}, {3532,4.8116966904894035e-011}, {3540,4.7671564515766337e-011}, {3556,4.2707338457079788e-011}, {3564,4.1616913224884180e-011}, {3572,3.5314746281129298e-011}, {3588,3.0034547678550835e-011}, {3596,2.8649932850577835e-011}, {3604,2.5004373794362711e-011}, {3620,2.1550492274088366e-011}, {3628,1.6637379274222266e-011}, {3636,1.6161329015840897e-011}, {3652,1.2114557405433392e-011}, {3660,9.8832627445148591e-012}, {3668,8.9223942845147322e-012}, {3684,7.3796983459124288e-012}, {3692,6.5811666150550026e-012}, {3700,5.8201410877109514e-012}, {3716,4.3732931157182472e-012}, {3724,3.1145491866002894e-012}, {3732,2.8041172184203832e-012}, {3748,2.5845107598398076e-012}, {3756,2.0364979068281070e-012}, {3764,1.9765398929070716e-012}, {3780,1.3395334143377502e-012}, {3788,9.7974207106123412e-013}, {3796,8.9979805249985366e-013}, {3812,7.9104304023615753e-013}, {3820,5.8597185775765121e-013}, {3828,5.4492168239246691e-013}, {3844,4.5457393157396359e-013}, {3852,3.9033320237285427e-013}, {3860,3.2782619085699634e-013}, {3876,2.0938265836180420e-013}, {3884,1.8210904963182271e-013}, {3892,1.4480678494130840e-013}, {3908,1.1482777798079073e-013}, {3924,1.0340720390059353e-013}, {3940,8.2754000803640132e-014}, {3948,5.0539510592534395e-014}, {3956,4.3790989545145131e-014}, {3988,2.2577073530792800e-014}, {4004,1.8294358250718844e-014}, {4036,1.0637382446950258e-014}, {4044,7.8271625137548764e-015}, {4052,5.9902869623944858e-015}, {4068,4.2525285312356062e-015}, {4076,3.5387426512232794e-015}, {4084,2.4605765667291366e-015}, {4100,1.9364680534333732e-015}, {4148,8.5930027086931755e-016}, {4164,5.2486912429011585e-016}, {4180,2.6245833123863141e-016}, {4212,1.1271304172555608e-016}, {4268,4.7823416269890100e-017}, {4276,2.7857377668146715e-017}, {4292,1.7161285560069904e-017}, {4388,2.1867566087623698e-018}, {4500,4.7538187147008039e-020}}; FriedmanValues FriedmanData5_2[22]={ {21,0.0}, {0,9.9999999999909062e-001}, {2,9.9166666666576486e-001}, {4,9.5833333333246185e-001}, {6,9.3333333333248458e-001}, {8,8.8333333333253006e-001}, {10,8.2499999999924978e-001}, {12,7.7499999999929525e-001}, {14,7.4166666666599224e-001}, {16,6.5833333333273469e-001}, {18,6.0833333333278017e-001}, {20,5.2499999999952263e-001}, {22,4.7499999999956805e-001}, {24,3.9166666666631050e-001}, {26,3.4166666666635598e-001}, {28,2.5833333333309844e-001}, {30,2.2499999999979539e-001}, {32,1.7499999999984087e-001}, {34,1.1666666666656057e-001}, {36,6.6666666666606048e-002}, {38,4.1666666666628778e-002}, {40,8.3333333333257559e-003}}; FriedmanValues FriedmanData5_3[45]={ {44,0.0}, {0,9.9999999999818157e-001}, {2,9.9958333333151561e-001}, {4,9.8833333333153606e-001}, {6,9.7166666666489965e-001}, {8,9.4083333333162233e-001}, {10,9.1374999999833828e-001}, {12,8.4479166666513039e-001}, {14,8.3118055555404402e-001}, {16,7.6784722222082580e-001}, {18,7.1993055555424634e-001}, {20,6.8249999999875888e-001}, {22,6.4916666666548617e-001}, {24,5.9458333333225200e-001}, {26,5.5874999999898389e-001}, {28,4.9270833333243746e-001}, {30,4.7520833333246926e-001}, {32,4.3229166666588059e-001}, {34,4.0562499999926244e-001}, {36,3.4687499999936922e-001}, {38,3.2604166666607376e-001}, {40,2.9062499999947150e-001}, {42,2.5312499999953963e-001}, {44,2.3604166666623735e-001}, {46,2.1270833333294645e-001}, {48,1.7229166666635334e-001}, {50,1.6256944444414881e-001}, {52,1.2715277777754655e-001}, {54,1.1715277777756475e-001}, {56,9.5902777777603393e-002}, {58,8.0069444444298837e-002}, {60,6.3402777777662483e-002}, {62,5.5902777777676126e-002}, {64,4.5486111111028384e-002}, {66,3.7569444444376113e-002}, {68,2.8402777777726120e-002}, {70,2.5902777777730666e-002}, {72,1.7152777777746583e-002}, {74,1.5069444444417036e-002}, {76,7.7777777777636344e-003}, {78,5.2777777777681806e-003}, {80,4.0277777777704520e-003}, {82,2.7777777777727259e-003}, {86,9.0277777777613593e-004}, {90,6.9444444444318148e-005}}; FriedmanValues FriedmanData5_4[79]={ {78,0.0}, {0,9.9999999999727063e-001}, {2,9.9942534721949439e-001}, {4,9.9096701388618413e-001}, {6,9.7984201388621450e-001}, {8,9.5906423610849334e-001}, {10,9.3962673610854641e-001}, {12,9.0579340277530540e-001}, {14,8.9459895833089154e-001}, {16,8.4965451388656965e-001}, {18,8.1548611110888514e-001}, {20,7.8476388888674675e-001}, {22,7.5915277777570556e-001}, {24,7.1534722222026959e-001}, {26,6.8513541666479638e-001}, {28,6.2974652777605866e-001}, {30,6.1238541666499502e-001}, {32,5.7882986110953094e-001}, {34,5.5175520833182712e-001}, {36,4.9994270833196863e-001}, {38,4.7902604166535900e-001}, {40,4.4210937499879310e-001}, {42,4.1349942129516748e-001}, {44,3.9509664351744000e-001}, {46,3.7029108796195209e-001}, {48,3.2900405092502782e-001}, {50,3.1746932870283695e-001}, {52,2.8589988425847879e-001}, {54,2.7452488425850985e-001}, {56,2.4869155092524708e-001}, {58,2.2726446759197227e-001}, {60,2.0513946759203269e-001}, {62,1.9719502314760992e-001}, {64,1.7800057870321787e-001}, {66,1.6091840277733852e-001}, {68,1.4346006944405285e-001}, {70,1.3622395833296147e-001}, {72,1.2086284722189231e-001}, {74,1.1290104166635848e-001}, {76,9.5039930555296109e-002}, {78,8.6364004629393892e-002}, {80,7.9780671296078520e-002}, {82,7.2034143518321894e-002}, {84,6.2990162036865124e-002}, {86,5.9712384259096286e-002}, {88,4.8906828703570222e-002}, {90,4.3306134259141059e-002}, {92,3.7889467592489186e-002}, {94,3.5083912036941299e-002}, {96,2.8019097222145763e-002}, {98,2.4626736111043903e-002}, {100,2.1175347222164433e-002}, {102,1.9008680555503681e-002}, {104,1.6925347222176031e-002}, {106,1.4151041666628046e-002}, {108,1.0850115740711127e-002}, {110,1.0211226851823981e-002}, {112,7.9334490740524208e-003}, {114,7.0931712962769376e-003}, {116,5.7320601851695418e-003}, {118,5.0792824073935443e-003}, {120,4.0422453703593377e-003}, {122,3.5943287036938939e-003}, {124,2.8304398148070896e-003}, {126,2.2378472222161147e-003}, {128,1.6822916666620756e-003}, {130,1.3159722222186312e-003}, {132,8.8541666666425015e-004}, {134,8.2986111110884629e-004}, {136,5.2430555555412503e-004}, {138,3.1712962962876436e-004}, {140,2.3379629629565837e-004}, {142,1.7824074074025440e-004}, {144,1.2268518518485043e-004}, {146,1.0706018518489306e-004}, {148,4.4560185185063593e-005}, {152,1.6782407407361614e-005}, {154,9.8379629629361169e-006}, {160,5.7870370370212451e-007}}; FriedmanValues FriedmanData5_5[121]={ {120,0.0}, {0,9.9999999999636258e-001}, {2,9.9971805555191917e-001}, {4,9.9424843749638347e-001}, {6,9.8649612268159681e-001}, {8,9.7196834490387196e-001}, {10,9.5839571758910658e-001}, {12,9.3242706403981834e-001}, {14,9.2457405478058774e-001}, {16,8.9114658564490690e-001}, {18,8.6506556712648319e-001}, {20,8.4247524112347894e-001}, {22,8.2281416859268630e-001}, {24,7.8892730516688359e-001}, {26,7.6521357059906869e-001}, {28,7.2091852816095825e-001}, {30,7.0725649112397093e-001}, {32,6.7919698109320881e-001}, {34,6.5730982831551088e-001}, {36,6.1253532985888359e-001}, {38,5.9439894868611010e-001}, {40,5.6215849729733836e-001}, {42,5.3467913772953712e-001}, {44,5.1788004436540069e-001}, {46,4.9434725115560973e-001}, {48,4.5410824652612647e-001}, {50,4.4291322337801897e-001}, {52,4.1009720293060747e-001}, {54,3.9838944830102041e-001}, {56,3.7122133487519327e-001}, {58,3.4851145833206598e-001}, {60,3.2502303240622543e-001}, {62,3.1607357252971480e-001}, {64,2.9480302854831064e-001}, {66,2.7539677854838118e-001}, {68,2.5478344907314754e-001}, {70,2.4640844907317802e-001}, {72,2.2706354166584095e-001}, {74,2.1760250771525802e-001}, {76,1.9467301311657595e-001}, {78,1.8304878472155647e-001}, {80,1.7446545138825439e-001}, {82,1.6370464891915773e-001}, {84,1.5091182484513016e-001}, {86,1.4592224151181499e-001}, {88,1.2958090277730649e-001}, {90,1.2099621913536243e-001}, {92,1.1174291570175410e-001}, {94,1.0721436631905454e-001}, {96,9.4406495948730768e-002}, {98,8.8612707368504906e-002}, {100,8.1908376735813221e-002}, {102,7.7343176118545881e-002}, {104,7.3054692322265163e-002}, {106,6.6455058834634831e-002}, {108,5.7722829860901159e-002}, {110,5.5715499613994884e-002}, {112,4.8814072144884188e-002}, {114,4.6282243441189697e-002}, {116,4.1565470678861183e-002}, {118,3.8494483024551336e-002}, {120,3.4529976851726242e-002}, {122,3.2194521604821162e-002}, {124,2.8860489004524648e-002}, {126,2.6413343942805159e-002}, {128,2.3610103202074621e-002}, {130,2.1888459683562365e-002}, {132,1.9013170331720973e-002}, {134,1.8262784529254568e-002}, {136,1.5409196566301984e-002}, {138,1.3463305362605356e-002}, {140,1.2466777584831201e-002}, {142,1.1640388695945319e-002}, {144,1.0295095486073666e-002}, {146,9.4156587576818048e-003}, {148,7.6605468749721406e-003}, {150,7.0920669367026019e-003}, {152,6.2723331404092864e-003}, {154,5.6247636959672002e-003}, {156,4.5861352237487538e-003}, {158,4.2987123842436244e-003}, {160,3.7285927854802644e-003}, {162,3.3462625385680751e-003}, {164,2.9685619212854977e-003}, {166,2.6431375385706332e-003}, {168,2.1256799768441196e-003}, {170,1.9858265817829009e-003}, {172,1.6183979552410273e-003}, {174,1.5103732638833956e-003}, {176,1.2412760416621522e-003}, {178,1.0375723379591891e-003}, {180,8.6830150462647150e-004}, {182,7.8824749228108379e-004}, {184,6.8552758487404992e-004}, {186,5.7653838734358215e-004}, {188,4.8611593364020737e-004}, {190,4.4599247685022991e-004}, {192,3.4385127314689768e-004}, {194,3.1047935956677203e-004}, {196,2.2878568672756301e-004}, {198,1.9213445215979507e-004}, {200,1.5760513117226636e-004}, {202,1.2789834104891758e-004}, {204,9.1440007715716851e-005}, {206,8.3338155863894457e-005}, {208,4.9773341049201710e-005}, {210,4.4179205246752914e-005}, {212,3.6607831789990317e-005}, {214,3.1206597222108721e-005}, {216,1.8185763888822748e-005}, {218,1.3556134259209951e-005}, {220,9.0952932098434612e-006}, {222,7.1662808641714652e-006}, {224,6.3946759259026675e-006}, {226,4.8514660493650704e-006}, {230,2.3919753086332748e-006}, {232,9.4521604937927812e-007}, {234,6.5586419752847865e-007}, {238,2.9417438271497941e-007}, {242,1.0127314814777980e-007}, {250,4.8225308641799905e-009}}; FriedmanValues FriedmanData5_6[175]={ {174,0.0}, {0,9.9999999999545452e-001}, {2,9.9978359454921062e-001}, {4,9.9575462560632766e-001}, {6,9.9006575600758806e-001}, {8,9.7930988216504433e-001}, {10,9.6914418723839313e-001}, {12,9.5002260159033192e-001}, {14,9.4397364325702604e-001}, {16,9.1832038322627829e-001}, {18,8.9814949202266614e-001}, {20,8.8033256815443439e-001}, {22,8.6475201259894963e-001}, {24,8.3759898404969046e-001}, {26,8.1837868601737029e-001}, {28,7.8214386734469543e-001}, {30,7.7074358763795714e-001}, {32,7.4748903516892695e-001}, {34,7.2888256092132631e-001}, {36,6.9077527889989465e-001}, {38,6.7507437226416345e-001}, {40,6.4683845887694624e-001}, {42,6.2302477313727822e-001}, {44,6.0798563347685275e-001}, {46,5.8677224613127010e-001}, {48,5.5019057657125159e-001}, {50,5.3978996410987912e-001}, {52,5.0950007334034075e-001}, {54,4.9844020403097755e-001}, {56,4.7244742094853409e-001}, {58,4.5041490503428239e-001}, {60,4.2732559779094587e-001}, {62,4.1858965546845467e-001}, {64,3.9695463666068259e-001}, {66,3.7695268594703901e-001}, {68,3.5549935357830942e-001}, {70,3.4654142774887492e-001}, {72,3.2602091511393733e-001}, {74,3.1563496816986164e-001}, {76,2.9048693937946668e-001}, {78,2.7745678409403207e-001}, {80,2.6763795211105201e-001}, {82,2.5523421947221941e-001}, {84,2.4017960069335270e-001}, {86,2.3418932291560215e-001}, {88,2.1438039158853170e-001}, {90,2.0375809582276208e-001}, {92,1.9225424141502115e-001}, {94,1.8651838107554111e-001}, {96,1.6992676986805480e-001}, {98,1.6236003568599042e-001}, {100,1.5331715976975061e-001}, {102,1.4714411289477863e-001}, {104,1.4120758945730560e-001}, {106,1.3191641288038028e-001}, {108,1.1941906406677966e-001}, {110,1.1645689521391248e-001}, {112,1.0636622439991514e-001}, {114,1.0245927031042670e-001}, {116,9.5147896371416740e-002}, {118,9.0162033620667756e-002}, {120,8.3769346988752366e-002}, {122,7.9949814533137029e-002}, {124,7.4238168121125978e-002}, {126,7.0050050837194358e-002}, {128,6.5021403396373648e-002}, {130,6.1819498496696844e-002}, {132,5.6458939565394065e-002}, {134,5.4954700560771272e-002}, {136,4.9127315819285436e-002}, {138,4.5138195448933188e-002}, {140,4.2924909376412385e-002}, {142,4.1186497918086963e-002}, {144,3.8046591475200009e-002}, {146,3.5919638350209677e-002}, {148,3.1753900020753290e-002}, {150,3.0419703454401335e-002}, {152,2.8345045854102129e-002}, {154,2.6537924181656632e-002}, {156,2.3536918683985095e-002}, {158,2.2619490057446054e-002}, {160,2.0734859463318808e-002}, {162,1.9333828406226414e-002}, {164,1.8062642626268204e-002}, {166,1.6879519073032836e-002}, {168,1.4782713999739900e-002}, {170,1.4211662446887556e-002}, {172,1.2678042414101314e-002}, {174,1.2114124590029801e-002}, {176,1.0943568552226482e-002}, {178,9.9025143469843018e-003}, {180,8.9546627844886116e-003}, {182,8.5093314766202677e-003}, {184,7.8732661795552581e-003}, {186,7.0835755449137876e-003}, {188,6.4109554638983272e-003}, {190,6.1126915750107941e-003}, {192,5.3773699122054968e-003}, {194,5.1272975742436694e-003}, {196,4.4093698157592794e-003}, {198,4.0920376398347960e-003}, {200,3.7308525832520749e-003}, {202,3.3660843058617566e-003}, {204,2.9934919543974019e-003}, {206,2.8523171858795249e-003}, {208,2.3988039721470167e-003}, {210,2.2394482622711972e-003}, {212,2.0792230500805676e-003}, {214,1.9682542036304545e-003}, {216,1.6515103764714008e-003}, {218,1.4916470952221282e-003}, {220,1.3190330423679751e-003}, {222,1.2131148324919137e-003}, {224,1.1328365724614148e-003}, {226,1.0123215261656656e-003}, {228,8.3419532053375951e-004}, {230,7.9592371559566175e-004}, {232,6.8135243859000988e-004}, {234,6.1637968588968773e-004}, {236,5.3332083493841907e-004}, {238,4.8892461580281842e-004}, {240,4.3832903324132007e-004}, {242,4.0589847768591201e-004}, {244,3.4910112043308385e-004}, {246,3.1612706564928302e-004}, {248,2.7444352012478111e-004}, {250,2.4510927051071688e-004}, {252,2.0163897730103797e-004}, {254,1.9206464602536134e-004}, {256,1.5544716917367601e-004}, {258,1.3441852334043826e-004}, {260,1.2043559509976116e-004}, {262,1.1026101948252346e-004}, {264,9.5303940007282793e-005}, {266,8.3597246334496508e-005}, {268,6.6908878279016806e-005}, {270,6.3663315007426600e-005}, {272,5.4524619019813851e-005}, {274,4.9716555748230777e-005}, {276,3.8863450038403560e-005}, {278,3.4870394482866149e-005}, {280,2.7829499421169778e-005}, {282,2.3614366319337095e-005}, {284,2.0870346257621176e-005}, {286,1.7571735146525061e-005}, {288,1.2734736689756925e-005}, {290,1.1298426247376622e-005}, {292,9.0065184541771640e-006}, {294,7.8466997813429329e-006}, {296,6.4939798739416738e-006}, {298,4.7777617026531806e-006}, {300,3.4961741254985129e-006}, {302,3.2974858538944770e-006}, {304,2.5572273662435218e-006}, {306,1.9881687242707997e-006}, {308,1.5167663322976333e-006}, {310,1.3528002829156621e-006}, {312,9.6796231995444825e-007}, {314,8.2208076131313582e-007}, {316,4.9535429526523806e-007}, {318,3.8443608538919905e-007}, {320,3.3138824588326737e-007}, {322,2.2481031378498639e-007}, {324,1.8864133230366932e-007}, {326,1.7658500514323031e-007}, {328,1.0665830761268391e-007}, {330,6.5063978909169292e-008}, {332,4.9149627057389781e-008}, {334,3.4682034464862934e-008}, {338,1.2980645576072684e-008}, {340,9.3637474279409774e-009}, {342,5.0234696501829274e-009}, {344,3.4159593621243900e-009}, {350,1.0046939300365855e-009}, {360,4.0187757201463415e-011}}; FriedmanValues FriedmanData5_7[235]={ {234,0.0}, {0,9.9999999999454270e-001}, {2,9.9984065344747564e-001}, {4,9.9679932037939811e-001}, {6,9.9245468544500826e-001}, {8,9.8418769816045981e-001}, {10,9.7632272870319814e-001}, {12,9.6133850867229520e-001}, {14,9.5659941707638485e-001}, {16,9.3629473727245116e-001}, {18,9.2019909490138085e-001}, {20,9.0592343097459249e-001}, {22,8.9332230388891665e-001}, {24,8.7120806780806714e-001}, {26,8.5543873265431447e-001}, {28,8.2547393206110575e-001}, {30,8.1599106470486893e-001}, {32,7.9643762693370823e-001}, {34,7.8072413027741538e-001}, {36,7.4817669832551292e-001}, {38,7.3466552313509670e-001}, {40,7.1020247777731793e-001}, {42,6.8928411406215440e-001}, {44,6.7604469221334873e-001}, {46,6.5718412403894022e-001}, {48,6.2436635509260108e-001}, {50,6.1495839188856283e-001}, {52,5.8723819711372538e-001}, {54,5.7705528910757597e-001}, {56,5.5291094085266024e-001}, {58,5.3228318732830648e-001}, {60,5.1051773466859840e-001}, {62,5.0220822391440001e-001}, {64,4.8141155381179368e-001}, {66,4.6199971608604445e-001}, {68,4.4097128765854537e-001}, {70,4.3212796867228959e-001}, {72,4.1162869286583320e-001}, {74,4.0119067723687141e-001}, {76,3.7566362365768802e-001}, {78,3.6227963521040174e-001}, {80,3.5212813946232180e-001}, {82,3.3912857750894621e-001}, {84,3.2322066191403981e-001}, {86,3.1679793855052035e-001}, {88,2.9541975556975025e-001}, {90,2.8385434901706569e-001}, {92,2.7112313909739016e-001}, {94,2.6476341438356177e-001}, {96,2.4604392472129477e-001}, {98,2.3748823568215033e-001}, {100,2.2706979089214804e-001}, {102,2.1985317198867019e-001}, {104,2.1288254647631430e-001}, {106,2.0180109685172842e-001}, {108,1.8669562101302534e-001}, {110,1.8305661686566865e-001}, {112,1.7056594693984306e-001}, {114,1.6568021950529543e-001}, {116,1.5642370282541734e-001}, {118,1.4996206460769929e-001}, {120,1.4169152413599367e-001}, {122,1.3664428136177992e-001}, {124,1.2906062188675385e-001}, {126,1.2346206086569385e-001}, {128,1.1660265028951923e-001}, {130,1.1218876216020306e-001}, {132,1.0465270346769928e-001}, {134,1.0249595781602638e-001}, {136,9.4057400498283733e-002}, {138,8.8231126175345287e-002}, {140,8.4924139208253036e-002}, {142,8.2317366321339541e-002}, {144,7.7500998019995132e-002}, {146,7.4189068782616066e-002}, {148,6.7679380092089306e-002}, {150,6.5599715196374489e-002}, {152,6.2247255784018143e-002}, {154,5.9269173029404765e-002}, {156,5.4234713486447428e-002}, {158,5.2665788890744816e-002}, {160,4.9391441148109005e-002}, {162,4.6883708739643620e-002}, {164,4.4635850970156758e-002}, {166,4.2481542231742594e-002}, {168,3.8566670291391894e-002}, {170,3.7486272058855338e-002}, {172,3.4538100258218782e-002}, {174,3.3431114007796164e-002}, {176,3.1139733062029964e-002}, {178,2.9029402750827490e-002}, {180,2.7060456897478012e-002}, {182,2.6120120329035355e-002}, {184,2.4739492278792120e-002}, {186,2.2971100568732330e-002}, {188,2.1393150003701070e-002}, {190,2.0681427833726816e-002}, {192,1.8913746475095559e-002}, {194,1.8321121864920045e-002}, {196,1.6486937751753295e-002}, {198,1.5691526734150044e-002}, {200,1.4741921956634641e-002}, {202,1.3756051264767595e-002}, {204,1.2737438750774417e-002}, {206,1.2311976499137079e-002}, {208,1.0989998415537683e-002}, {210,1.0511130824153342e-002}, {212,9.9854021638552861e-003}, {214,9.6264589853271507e-003}, {216,8.5844988589557393e-003}, {218,8.0384272082064043e-003}, {220,7.4206775809512234e-003}, {222,7.0175878805397562e-003}, {224,6.6854414926171869e-003}, {226,6.2294248790008486e-003}, {228,5.5126644308576859e-003}, {230,5.3545599989526854e-003}, {232,4.8374907132527059e-003}, {234,4.5374104797366787e-003}, {236,4.1412833809332233e-003}, {238,3.8909368338666864e-003}, {240,3.6303558099912230e-003}, {242,3.4710511787549524e-003}, {244,3.1580761564524553e-003}, {246,2.9603682129414441e-003}, {248,2.7093454003624391e-003}, {250,2.5303453641944353e-003}, {252,2.2599406527172169e-003}, {254,2.1924722563698494e-003}, {256,1.9221796673956314e-003}, {258,1.7584880334159008e-003}, {260,1.6544497063524252e-003}, {262,1.5697975635416733e-003}, {264,1.4363608746653014e-003}, {266,1.3306020574719484e-003}, {268,1.1701953915295368e-003}, {270,1.1208533227176493e-003}, {272,1.0218207445128139e-003}, {274,9.6876634435556731e-004}, {276,8.4095870305611012e-004}, {278,7.9710489807949746e-004}, {280,7.1781725018898394e-004}, {282,6.6037538311968143e-004}, {284,6.1765362908506379e-004}, {286,5.6887448894258296e-004}, {288,4.8812581179003142e-004}, {290,4.6327681326907636e-004}, {292,4.1129306720776027e-004}, {294,3.8739842745094623e-004}, {296,3.5551713404834249e-004}, {298,3.1724657399196727e-004}, {300,2.8486663692617190e-004}, {302,2.7541036924361021e-004}, {304,2.4742391452732765e-004}, {306,2.2318686838119781e-004}, {308,1.9777164043637780e-004}, {310,1.8849170055731319e-004}, {312,1.6291534984693337e-004}, {314,1.5473382978524960e-004}, {316,1.2982159884242009e-004}, {318,1.1793222502132584e-004}, {320,1.0882013131960083e-004}, {322,9.8247130258701743e-005}, {324,8.9360177080166568e-005}, {326,8.4615642615171879e-005}, {328,7.1239203893536983e-005}, {330,6.5402054062893263e-005}, {332,5.8121625902567793e-005}, {334,5.5062529805619470e-005}, {336,4.5736065229838726e-005}, {338,4.3071596833505531e-005}, {340,3.8446810833337881e-005}, {342,3.5306639955011391e-005}, {344,3.1883663810482730e-005}, {346,2.8007068356542978e-005}, {348,2.3259777011404270e-005}, {350,2.1755898892842516e-005}, {352,1.8920813373310675e-005}, {354,1.6960212110889949e-005}, {356,1.4465868537729697e-005}, {358,1.3072546939229070e-005}, {360,1.1484452696267915e-005}, {362,1.0474675014946269e-005}, {364,9.1225026657381114e-006}, {366,8.3339599274022231e-006}, {368,7.1854380331183661e-006}, {370,6.5535217201074114e-006}, {372,5.4479026009219124e-006}, {374,5.3009440103877358e-006}, {376,4.2224834426209866e-006}, {378,3.4654010202142830e-006}, {380,3.1119014703190928e-006}, {382,2.7869271904854754e-006}, {384,2.3172823430943483e-006}, {386,2.0773493762746699e-006}, {388,1.5262757603440354e-006}, {390,1.4020098567095970e-006}, {392,1.2315333906611448e-006}, {394,1.0909606347462743e-006}, {396,8.1689721042935497e-007}, {398,7.1984377678790958e-007}, {400,5.8931394139767580e-007}, {402,4.9241991919312889e-007}, {404,4.1737932955876471e-007}, {406,3.6812119555697592e-007}, {408,2.6873285322212727e-007}, {410,2.4822504072223921e-007}, {412,1.7576550979413673e-007}, {414,1.5834277745541146e-007}, {416,1.2597756719324245e-007}, {418,1.0859234342790527e-007}, {420,8.0484356245273996e-008}, {422,7.6095853158878200e-008}, {424,5.9371717999504512e-008}, {426,4.3252408586012254e-008}, {428,3.4545730988323129e-008}, {430,2.9425810720861352e-008}, {432,1.9312561621122313e-008}, {434,1.8468618719892354e-008}, {436,1.1731141225073149e-008}, {438,9.5181353951812475e-009}, {440,9.1102296595867650e-009}, {442,7.2254238468398521e-009}, {444,4.6420208547414683e-009}, {446,4.0512608238804948e-009}, {448,2.3633750214205718e-009}, {450,1.9976664308875890e-009}, {452,1.3858078274958665e-009}, {454,1.1888878172088753e-009}, {458,4.7153635116340739e-010}, {464,1.7615633573292064e-010}, {466,1.3395919067142254e-010}, {470,3.7843471364676870e-011}, {478,9.7120413236781325e-012}, {490,3.3489797667855632e-013}}; FriedmanValues FriedmanData5_8[307]={ {306,0.0}, {0,9.9999999999363476e-001}, {2,9.9987513149337737e-001}, {4,9.9748775066415840e-001}, {6,9.9406231802221023e-001}, {8,9.8750833687566841e-001}, {10,9.8123828268218294e-001}, {12,9.6924607548757902e-001}, {14,9.6542261037459542e-001}, {16,9.4896567194502357e-001}, {18,9.3584942303285579e-001}, {20,9.2414148923221351e-001}, {22,9.1374997971447913e-001}, {24,8.9540726957013439e-001}, {26,8.8225200815957427e-001}, {28,8.5710695162761630e-001}, {30,8.4909689275394251e-001}, {32,8.3250378469363417e-001}, {34,8.1907899296325481e-001}, {36,7.9111452153424910e-001}, {38,7.7942941873024496e-001}, {40,7.5814810858716919e-001}, {42,7.3986225545965112e-001}, {44,7.2820410699007498e-001}, {46,7.1150027573098262e-001}, {48,6.8225682093292905e-001}, {50,6.7380937670733843e-001}, {52,6.4879387279709477e-001}, {54,6.3954177391732037e-001}, {56,6.1746156857838352e-001}, {58,5.9847872430704574e-001}, {60,5.7832298152087658e-001}, {62,5.7059843432263757e-001}, {64,5.5105918074640869e-001}, {66,5.3270236670368676e-001}, {68,5.1268557663720093e-001}, {70,5.0420141739023061e-001}, {72,4.8444031704992135e-001}, {74,4.7429525085552554e-001}, {76,4.4935509155909520e-001}, {78,4.3617069728271957e-001}, {80,4.2610105095996337e-001}, {82,4.1311602188371249e-001}, {84,3.9710705623072762e-001}, {86,3.9058801129272969e-001}, {88,3.6876606257137501e-001}, {90,3.5687361193733258e-001}, {92,3.4368307250322444e-001}, {94,3.3705884769098821e-001}, {96,3.1736775473986739e-001}, {98,3.0833035145958260e-001}, {100,2.9719712507938262e-001}, {102,2.8943203611695489e-001}, {104,2.8188462158305583e-001}, {106,2.6978293594168262e-001}, {108,2.5315177628199126e-001}, {110,2.4910499875367118e-001}, {112,2.3515854077068524e-001}, {114,2.2964311291212056e-001}, {116,2.1912379532080059e-001}, {118,2.1168326820956171e-001}, {120,2.0213710550520078e-001}, {122,1.9625612293596342e-001}, {124,1.8734306938288653e-001}, {126,1.8073375358217408e-001}, {128,1.7253611335776420e-001}, {130,1.6721261481189997e-001}, {132,1.5804569009191069e-001}, {134,1.5538509599363379e-001}, {136,1.4490690317444885e-001}, {138,1.3762850817846264e-001}, {140,1.3343581119149947e-001}, {142,1.3013189264263783e-001}, {144,1.2392140507453681e-001}, {146,1.1961394502695512e-001}, {148,1.1111750176736683e-001}, {150,1.0839575581902457e-001}, {152,1.0393323484175816e-001}, {154,9.9914674117055610e-002}, {156,9.3052916627887464e-002}, {158,9.0887903743438372e-002}, {160,8.6322217913759949e-002}, {162,8.2774262682704033e-002}, {164,7.9600124688437177e-002}, {166,7.6513797550691431e-002}, {168,7.0825098346623899e-002}, {170,6.9241813175224265e-002}, {172,6.4887690260282113e-002}, {174,6.3226158035248434e-002}, {176,5.9794359115963737e-002}, {178,5.6575816817923251e-002}, {180,5.3533161690632276e-002}, {182,5.2069809336666058e-002}, {184,4.9885901947848248e-002}, {186,4.7050810388813501e-002}, {188,4.4474915667893682e-002}, {190,4.3302345551249490e-002}, {192,4.0377196032538830e-002}, {194,3.9392645737399500e-002}, {196,3.6265916351416877e-002}, {198,3.4912222535696182e-002}, {200,3.3262225412882172e-002}, {202,3.1531034843285316e-002}, {204,2.9726114730128081e-002}, {206,2.8945668813119871e-002}, {208,2.6533675321587152e-002}, {210,2.5643782487829024e-002}, {212,2.4646691131864719e-002}, {214,2.3960303581723692e-002}, {216,2.1955421572991601e-002}, {218,2.0887204003982619e-002}, {220,1.9657211911690776e-002}, {222,1.8839105736623823e-002}, {224,1.8142408947272832e-002}, {226,1.7201225796303014e-002}, {228,1.5696976502121235e-002}, {230,1.5359300952265559e-002}, {232,1.4231303114195465e-002}, {234,1.3563539884010489e-002}, {236,1.2674066368283986e-002}, {238,1.2089643975401470e-002}, {240,1.1485696246460122e-002}, {242,1.1119525597814194e-002}, {244,1.0372822946520975e-002}, {246,9.8870852304478972e-003}, {248,9.2631916255743185e-003}, {250,8.8124178500088440e-003}, {252,8.1214186623417717e-003}, {254,7.9457367227209769e-003}, {256,7.2153600319820269e-003}, {258,6.7581007941424033e-003}, {260,6.4685290797613171e-003}, {262,6.2323838937202941e-003}, {264,5.8365986610267690e-003}, {266,5.5250474994909373e-003}, {268,5.0397978115296364e-003}, {270,4.8795650412724540e-003}, {272,4.5687157725130016e-003}, {274,4.3926255383177366e-003}, {276,3.9678345604272792e-003}, {278,3.8292190268776364e-003}, {280,3.5635110486271554e-003}, {282,3.3605631964854586e-003}, {284,3.2077859184657413e-003}, {286,3.0353857464632391e-003}, {288,2.7268153448376901e-003}, {290,2.6262059252355019e-003}, {292,2.4079883583421361e-003}, {294,2.3173931780604349e-003}, {296,2.1789738281027533e-003}, {298,2.0132622499216524e-003}, {300,1.8686178570970712e-003}, {302,1.8186005470693842e-003}, {304,1.6886316298891425e-003}, {306,1.5702617095331006e-003}, {308,1.4447706558644894e-003}, {310,1.3958854120947964e-003}, {312,1.2670812617719704e-003}, {314,1.2235684538000680e-003}, {316,1.0883502736633249e-003}, {318,1.0224707911213060e-003}, {320,9.7029799591130412e-004}, {322,9.0690867571329640e-004}, {324,8.5090232301160656e-004}, {326,8.1735721274554438e-004}, {328,7.2770522898911406e-004}, {330,6.8458858367804944e-004}, {332,6.3404694505382836e-004}, {334,6.1065549843760780e-004}, {336,5.4103197886572034e-004}, {338,5.1845482024746598e-004}, {340,4.8143203711602174e-004}, {342,4.5847100075428510e-004}, {344,4.2912127161995545e-004}, {346,3.9264947677243676e-004}, {348,3.4758478127089478e-004}, {350,3.3548730675894044e-004}, {352,3.0625695928684736e-004}, {354,2.8626092528835542e-004}, {356,2.6088398140670113e-004}, {358,2.4444940336932589e-004}, {360,2.2469989607135476e-004}, {362,2.1122032047201790e-004}, {364,1.9352331419212368e-004}, {366,1.8361223755324069e-004}, {368,1.6784502549415612e-004}, {370,1.5887191637284272e-004}, {372,1.4245888966773603e-004}, {374,1.3914067871954045e-004}, {376,1.2163095953383800e-004}, {378,1.0956345593487787e-004}, {380,1.0308973247670012e-004}, {382,9.6718097978141040e-005}, {384,8.8353029087447836e-005}, {386,8.2862120077253676e-005}, {388,7.1276461926893058e-005}, {390,6.8369789821501762e-005}, {392,6.3890559122370500e-005}, {394,6.0115564938456024e-005}, {396,5.2249587000691707e-005}, {398,4.9240287285776009e-005}, {400,4.4491214283405674e-005}, {402,4.1208489883920982e-005}, {404,3.8500953384524085e-005}, {406,3.6105095134796560e-005}, {408,3.1586177239306353e-005}, {410,3.0112847040627457e-005}, {412,2.6559392322428780e-005}, {414,2.5192368609874607e-005}, {416,2.2595166838772025e-005}, {418,2.0491180341648578e-005}, {420,1.8203903473021736e-005}, {422,1.7493473589052780e-005}, {424,1.5709674613584021e-005}, {426,1.3913222589740006e-005}, {428,1.2610997438285100e-005}, {430,1.1874821044399750e-005}, {432,1.0336357074073476e-005}, {434,9.8421503625425582e-006}, {436,8.5408126014197259e-006}, {438,7.9146547921387272e-006}, {440,7.4428388234917509e-006}, {442,6.7277478741364509e-006}, {444,6.1386194662183897e-006}, {446,5.7125963752288770e-006}, {448,4.8462252225423455e-006}, {450,4.5370857339647798e-006}, {452,4.0120943296828595e-006}, {454,3.7844444829336217e-006}, {456,3.1457572472838238e-006}, {458,2.8434972217799187e-006}, {460,2.5185686666836788e-006}, {462,2.3907169434334640e-006}, {464,2.1960668269795129e-006}, {466,1.9645679754577804e-006}, {468,1.6345886453630019e-006}, {470,1.5651605885933248e-006}, {472,1.3313671500945843e-006}, {474,1.2032599220146950e-006}, {476,1.0657672451179937e-006}, {478,9.8379850940749569e-007}, {480,8.6075851098006724e-007}, {482,8.0177045768433251e-007}, {484,7.0844412595195930e-007}, {486,6.4753114048423988e-007}, {488,5.4860049205094163e-007}, {490,4.8860818577417426e-007}, {492,4.1667736944518546e-007}, {494,3.9777304845765162e-007}, {496,3.2330415199607730e-007}, {498,2.7181738359219852e-007}, {500,2.4420107129241986e-007}, {502,2.2122193498998267e-007}, {504,1.9139136657453483e-007}, {506,1.7204100613512880e-007}, {508,1.3063904282949384e-007}, {510,1.1849064105202202e-007}, {512,1.0486752719751345e-007}, {514,9.4839317066511613e-008}, {516,7.3161170097342347e-008}, {518,6.7312958363268908e-008}, {520,5.8007706448604780e-008}, {522,4.8256571367791227e-008}, {524,4.2141423619773451e-008}, {526,3.5435515840895249e-008}, {528,2.8075708599286854e-008}, {530,2.5913517955724941e-008}, {532,2.0703108254969366e-008}, {534,1.9076486455711320e-008}, {536,1.5915764004885523e-008}, {538,1.2995408995187608e-008}, {540,1.0197894563335278e-008}, {542,9.1651585093866658e-009}, {544,7.1966728555354561e-009}, {546,5.6215862732552468e-009}, {548,5.0092588126967312e-009}, {550,4.6432376507191809e-009}, {552,3.7267781742732541e-009}, {554,3.3335632965894293e-009}, {556,2.3239575295633937e-009}, {558,1.9631607760220233e-009}, {560,1.6299596157589416e-009}, {562,1.2354944522955176e-009}, {564,9.8184272475941000e-010}, {566,9.2182900733866730e-010}, {568,6.4426556426773204e-010}, {570,5.0517127128736465e-010}, {572,4.1282873585128141e-010}, {574,3.7281959090411947e-010}, {576,2.7279672853621492e-010}, {578,2.3253361929007208e-010}, {580,1.8111561660407102e-010}, {582,1.3110418542011872e-010}, {584,1.1735104184453188e-010}, {586,8.0702039930041786e-011}, {590,3.8192323423682320e-011}, {592,3.2566037415487701e-011}, {594,2.6002037072593959e-011}, {596,1.9125465284800510e-011}, {598,9.1231790480100488e-012}, {602,6.1760768532414319e-012}, {608,2.4252195144450091e-012}, {610,2.0345052083203812e-012}, {612,9.4050515117142469e-013}, {616,4.0466838848622124e-013}, {626,9.2096943586519340e-014}, {640,2.7908164723187676e-015}}; FriedmanValues FriedmanData6_2[37]={ {36,0.0}, {0,9.9999999999909051e-001}, {8,9.9861111111020284e-001}, {16,9.9166666666576475e-001}, {24,9.8333333333243900e-001}, {32,9.7083333333245025e-001}, {40,9.4861111111024821e-001}, {48,9.3194444444359670e-001}, {56,9.1249999999916986e-001}, {64,8.7916666666586685e-001}, {72,8.5138888888811437e-001}, {80,8.2222222222147412e-001}, {88,7.9027777777705888e-001}, {96,7.5138888888820532e-001}, {104,7.1805555555490252e-001}, {112,6.7083333333272332e-001}, {120,6.4305555555497074e-001}, {128,5.9861111111056686e-001}, {136,5.4027777777728647e-001}, {144,4.9999999999954536e-001}, {152,4.5972222222180420e-001}, {160,4.0138888888852386e-001}, {168,3.5694444444411993e-001}, {176,3.2916666666636729e-001}, {184,2.8194444444418815e-001}, {192,2.4861111111088502e-001}, {200,2.0972222222203149e-001}, {208,1.7777777777761608e-001}, {216,1.4861111111097597e-001}, {224,1.2083333333322349e-001}, {232,8.7499999999920419e-002}, {240,6.8055555555493641e-002}, {248,5.1388888888842132e-002}, {256,2.9166666666640122e-002}, {264,1.6666666666651501e-002}, {272,8.3333333333257525e-003}, {280,1.3888888888876254e-003}}; FriedmanValues FriedmanData7_2[58]={ {57,0.0}, {0,9.9999999999979539e-001}, {2,9.9980158730138269e-001}, {4,9.9861111111090672e-001}, {6,9.9662698412678019e-001}, {8,9.9384920634900298e-001}, {10,9.8809523809503585e-001}, {12,9.8293650793630671e-001}, {14,9.7599206349186363e-001}, {16,9.6686507936488131e-001}, {18,9.5595238095218527e-001}, {20,9.4523809523790181e-001}, {22,9.3055555555536529e-001}, {24,9.1666666666647922e-001}, {26,8.9999999999981628e-001}, {28,8.8214285714267704e-001}, {30,8.6666666666648973e-001}, {32,8.4880952380935049e-001}, {34,8.2321428571411770e-001}, {36,8.0218253968237596e-001}, {38,7.7777777777761903e-001}, {40,7.5119047619032286e-001}, {42,7.2202380952366196e-001}, {44,7.0257936507922136e-001}, {46,6.6924603174589525e-001}, {48,6.4345238095224944e-001}, {50,6.0873015873003411e-001}, {52,5.8015873015861108e-001}, {54,5.4682539682528453e-001}, {56,5.1825396825386172e-001}, {58,4.8174603174593211e-001}, {60,4.5317460317450942e-001}, {62,4.1984126984118297e-001}, {64,3.9126984126975994e-001}, {66,3.5654761904754473e-001}, {68,3.3075396825389908e-001}, {70,2.9742063492057252e-001}, {72,2.7797619047613192e-001}, {74,2.4880952380947111e-001}, {76,2.2222222222217516e-001}, {78,1.9781746031741834e-001}, {80,1.7678571428567666e-001}, {82,1.5119047619044398e-001}, {84,1.3333333333330494e-001}, {86,1.1785714285711772e-001}, {88,9.9999999999978675e-002}, {90,8.3333333333315565e-002}, {92,6.9444444444429640e-002}, {94,5.4761904761893090e-002}, {96,4.4047619047609662e-002}, {98,3.3134920634913578e-002}, {100,2.4007936507931399e-002}, {102,1.7063492063488436e-002}, {104,1.1904761904759378e-002}, {106,6.1507936507923496e-003}, {108,3.3730158730151602e-003}, {110,1.3888888888885951e-003}, {112,1.9841269841265643e-004}}; FriedmanValues FriedmanData8_2[86]={ {85,0.0}, {0,9.9999999999994704e-001}, {8,9.9997519841264548e-001}, {16,9.9980158730153434e-001}, {24,9.9942956349201051e-001}, {32,9.9888392857137576e-001}, {40,9.9771825396820124e-001}, {48,9.9637896825391559e-001}, {56,9.9464285714280476e-001}, {64,9.9231150793645562e-001}, {72,9.8911210317455078e-001}, {80,9.8603670634915419e-001}, {88,9.8162202380947194e-001}, {96,9.7708333333328190e-001}, {104,9.7120535714280620e-001}, {112,9.6530257936502906e-001}, {120,9.5845734126979132e-001}, {128,9.5190972222217296e-001}, {136,9.4250992063487204e-001}, {144,9.3385416666661847e-001}, {152,9.2442956349201622e-001}, {160,9.1450892857138188e-001}, {168,9.0168650793646221e-001}, {176,8.9191468253963768e-001}, {184,8.7847222222217825e-001}, {192,8.6626984126979834e-001}, {200,8.5039682539678385e-001}, {208,8.3658234126979991e-001}, {216,8.2006448412694399e-001}, {224,8.0530753968250102e-001}, {232,7.8606150793647056e-001}, {240,7.6909722222218613e-001}, {248,7.4960317460313952e-001}, {256,7.3179563492060140e-001}, {264,7.0892857142853971e-001}, {272,6.9045138888885782e-001}, {280,6.6770833333330404e-001}, {288,6.4833829365076601e-001}, {296,6.2398313492060964e-001}, {304,6.0349702380950088e-001}, {312,5.7993551587299452e-001}, {320,5.5900297619045702e-001}, {328,5.3256448412696722e-001}, {336,5.1160714285712772e-001}, {344,4.8839285714284353e-001}, {352,4.6743551587300292e-001}, {360,4.4099702380951133e-001}, {368,4.2006448412697217e-001}, {376,3.9650297619046471e-001}, {384,3.7601686507935389e-001}, {392,3.5166170634919575e-001}, {400,3.3229166666665660e-001}, {408,3.0954861111110177e-001}, {416,2.9107142857141971e-001}, {424,2.6820436507935647e-001}, {432,2.5039682539681696e-001}, {440,2.3090277777777005e-001}, {448,2.1393849206348467e-001}, {456,1.9469246031745341e-001}, {464,1.7993551587300921e-001}, {472,1.6341765873015235e-001}, {480,1.4960317460316833e-001}, {488,1.3373015873015273e-001}, {496,1.2152777777777204e-001}, {504,1.0808531746031241e-001}, {512,9.8313492063487329e-002}, {520,8.5491071428567184e-002}, {528,7.5570436507932617e-002}, {536,6.6145833333329712e-002}, {544,5.7490079365076038e-002}, {552,4.8090277777774949e-002}, {560,4.1542658730156223e-002}, {568,3.4697420634918472e-002}, {576,2.8794642857141006e-002}, {584,2.2916666666665211e-002}, {592,1.8377976190475043e-002}, {600,1.3963293650792784e-002}, {608,1.0887896825396166e-002}, {616,7.6884920634916259e-003}, {624,5.3571428571425501e-003}, {632,3.6210317460315415e-003}, {640,2.2817460317459022e-003}, {648,1.1160714285713645e-003}, {656,5.7043650793647512e-004}, {664,1.9841269841268706e-004}, {672,2.4801587301585879e-005}}; FriedmanValues FriedmanData9_2[122]={ {121,0.0}, {0,9.9999999999998090e-001}, {2,9.9999724426805847e-001}, {4,9.9997519841267923e-001}, {6,9.9991732804230882e-001}, {8,9.9982363315694722e-001}, {10,9.9962522045853452e-001}, {12,9.9934413580244985e-001}, {14,9.9898589065253807e-001}, {16,9.9846230158728233e-001}, {18,9.9774581128745876e-001}, {20,9.9696318342149759e-001}, {22,9.9586640211638300e-001}, {24,9.9461529982361407e-001}, {26,9.9308586860668291e-001}, {28,9.9138833774248536e-001}, {30,9.8930500440915203e-001}, {32,9.8725473985888756e-001}, {34,9.8443838183419630e-001}, {36,9.8156690917105704e-001}, {38,9.7837301587299719e-001}, {40,9.7484016754848224e-001}, {42,9.7055500440915254e-001}, {44,9.6671902557317380e-001}, {46,9.6198192239857072e-001}, {48,9.5713734567899411e-001}, {50,9.5160108024689549e-001}, {52,9.4600143298058170e-001}, {54,9.3971285273366822e-001}, {56,9.3361166225747783e-001}, {58,9.2623732363313938e-001}, {60,9.1909997795412712e-001}, {62,9.1116898148146408e-001}, {64,9.0310019841268119e-001}, {66,8.9373897707229333e-001}, {68,8.8509149029980672e-001}, {70,8.7504133597881928e-001}, {72,8.6520888447970135e-001}, {74,8.5440365961197673e-001}, {76,8.4374999999998401e-001}, {78,8.3187003968252393e-001}, {80,8.2070932539680985e-001}, {82,8.0733851410933211e-001}, {84,7.9495976631391785e-001}, {86,7.8168816137564645e-001}, {88,7.6850473985889189e-001}, {90,7.5333443562608793e-001}, {92,7.3968253968252562e-001}, {94,7.2414572310404268e-001}, {96,7.0952932098764088e-001}, {98,6.9329805996471350e-001}, {100,6.7818011463843508e-001}, {102,6.6112764550263292e-001}, {104,6.4596560846559614e-001}, {106,6.2822971781303916e-001}, {108,6.1218584656083486e-001}, {110,5.9500936948852479e-001}, {112,5.7840884038799600e-001}, {114,5.5995370370369302e-001}, {116,5.4419091710757339e-001}, {118,5.2580467372133033e-001}, {120,5.0921516754849117e-001}, {122,4.9078483245148974e-001}, {124,4.7419532627865058e-001}, {126,4.5580908289240751e-001}, {128,4.4004629629628789e-001}, {130,4.2159115961198490e-001}, {132,4.0499063051145612e-001}, {134,3.8781415343914605e-001}, {136,3.7177028218694175e-001}, {138,3.5403439153438476e-001}, {140,3.3887235449734804e-001}, {142,3.2181988536154588e-001}, {144,3.0670194003526752e-001}, {146,2.9047067901234014e-001}, {148,2.7585427689593828e-001}, {150,2.6031746031745534e-001}, {152,2.4666556437389300e-001}, {154,2.3149526014108907e-001}, {156,2.1831183862433445e-001}, {158,2.0504023368606311e-001}, {160,1.9266148589064888e-001}, {162,1.7929067460317119e-001}, {164,1.6812996031745711e-001}, {166,1.5624999999999703e-001}, {168,1.4559634038800429e-001}, {170,1.3479111552027961e-001}, {172,1.2495866402116164e-001}, {174,1.1490850970017417e-001}, {176,1.0626102292768756e-001}, {178,9.6899801587299730e-002}, {180,8.8831018518516811e-002}, {182,8.0900022045853823e-002}, {184,7.3762676366841612e-002}, {186,6.6388337742503134e-002}, {188,6.0287147266312777e-002}, {190,5.3998567019399320e-002}, {192,4.8398919753085495e-002}, {194,4.2862654320986834e-002}, {196,3.8018077601410204e-002}, {198,3.3280974426807122e-002}, {200,2.9444995590828360e-002}, {202,2.5159832451498637e-002}, {204,2.1626984126983714e-002}, {206,1.8433090828923811e-002}, {208,1.5561618165784535e-002}, {210,1.2745260141093230e-002}, {212,1.0694995590828720e-002}, {214,8.6116622574954269e-003}, {216,6.9141313932979285e-003}, {218,5.3847001763667407e-003}, {220,4.1335978835978053e-003}, {222,3.0368165784831875e-003}, {224,2.2541887125220031e-003}, {226,1.5376984126983834e-003}, {228,1.0141093474426615e-003}, {230,6.5586419753085163e-004}, {232,3.7477954144620097e-004}, {234,1.7636684303350635e-004}, {236,8.2671957671956095e-005}, {238,2.4801587301586827e-005}, {240,2.7557319223985363e-006}}; FriedmanValues FriedmanData10_2[167]={ {166,0.0}, {0,9.9999999999999611e-001}, {8,9.9999972442680385e-001}, {16,9.9999724426807368e-001}, {24,9.9998952821869092e-001}, {32,9.9997547398588671e-001}, {40,9.9994598765431708e-001}, {48,9.9989721119929065e-001}, {56,9.9983272707230653e-001}, {64,9.9973352072310018e-001}, {72,9.9959628527336475e-001}, {80,9.9942570546736831e-001}, {88,9.9920001102292388e-001}, {96,9.9891341490299446e-001}, {104,9.9856839726631019e-001}, {112,9.9814732142856766e-001}, {120,9.9764467592592221e-001}, {128,9.9709077380952005e-001}, {136,9.9639274691357649e-001}, {144,9.9561094576719200e-001}, {152,9.9473462301586923e-001}, {160,9.9372161596119557e-001}, {168,9.9253527336860303e-001}, {176,9.9129712301586936e-001}, {184,9.8988343253967892e-001}, {192,9.8832038139329448e-001}, {200,9.8662395282186588e-001}, {208,9.8472001763668071e-001}, {216,9.8267416225749205e-001}, {224,9.8051642416225393e-001}, {232,9.7809882054673369e-001}, {240,9.7551063712521691e-001}, {248,9.7278466710758027e-001}, {256,9.6984209656084308e-001}, {264,9.6663249559082542e-001}, {272,9.6328676146384129e-001}, {280,9.5969714506172488e-001}, {288,9.5586171737213055e-001}, {296,9.5186067019400000e-001}, {304,9.4755869708994356e-001}, {312,9.4307291666666315e-001}, {320,9.3844879850087837e-001}, {328,9.3329943783068436e-001}, {336,9.2798638668429989e-001}, {344,9.2258901014109007e-001}, {352,9.1685846560846218e-001}, {360,9.1068975970017296e-001}, {368,9.0438023589064920e-001}, {376,8.9778080908288904e-001}, {384,8.9089974647265979e-001}, {392,8.8373153659611658e-001}, {400,8.7626460537918538e-001}, {408,8.6841986331569332e-001}, {416,8.6058614417989088e-001}, {424,8.5217013888888560e-001}, {432,8.4355241402116077e-001}, {440,8.3479635141093156e-001}, {448,8.2562968474426490e-001}, {456,8.1605406746031428e-001}, {464,8.0654706790123143e-001}, {472,7.9654403659611683e-001}, {480,7.8645916005290695e-001}, {488,7.7586171737213094e-001}, {496,7.6513475529100228e-001}, {504,7.5411623677248385e-001}, {512,7.4326251102292484e-001}, {520,7.3166969797177850e-001}, {528,7.1986193783068508e-001}, {536,7.0817102072310134e-001}, {544,6.9634204144620548e-001}, {552,6.8392912257495331e-001}, {560,6.7164296737213147e-001}, {568,6.5895557760140844e-001}, {576,6.4641809964726382e-001}, {584,6.3349647266313691e-001}, {592,6.2053461199294291e-001}, {600,6.0748870149911582e-001}, {608,5.9435874118165555e-001}, {616,5.8088679453262559e-001}, {624,5.6742779982363090e-001}, {632,5.5418816137565918e-001}, {640,5.4081183862433646e-001}, {648,5.2701499118165573e-001}, {656,5.1352017195766986e-001}, {664,4.9999999999999800e-001}, {672,4.8647982804232609e-001}, {680,4.7298500881834027e-001}, {688,4.5918816137565954e-001}, {696,4.4581183862433682e-001}, {704,4.3257220017636511e-001}, {712,4.1911320546737046e-001}, {720,4.0564125881834051e-001}, {728,3.9251129850088023e-001}, {736,3.7946538800705315e-001}, {744,3.6650352733685920e-001}, {752,3.5358190035273229e-001}, {760,3.4104442239858773e-001}, {768,3.2835703262786470e-001}, {776,3.1607087742504286e-001}, {784,3.0365795855379069e-001}, {792,2.9182897927689477e-001}, {800,2.8013806216931103e-001}, {808,2.6833030202821762e-001}, {816,2.5673748897707127e-001}, {824,2.4588376322751221e-001}, {832,2.3486524470899373e-001}, {840,2.2413828262786503e-001}, {848,2.1354083994708906e-001}, {856,2.0345596340387923e-001}, {864,1.9345293209876463e-001}, {872,1.8394593253968178e-001}, {880,1.7437031525573121e-001}, {888,1.6520364858906458e-001}, {896,1.5644758597883535e-001}, {904,1.4782986111111052e-001}, {912,1.3941385582010526e-001}, {920,1.3158013668430282e-001}, {928,1.2373539462081079e-001}, {936,1.1626846340387960e-001}, {944,1.0910025352733642e-001}, {952,1.0221919091710717e-001}, {960,9.5619764109347055e-002}, {968,8.9310240299823276e-002}, {976,8.3141534391534058e-002}, {984,7.7410989858906210e-002}, {992,7.2013613315696362e-002}, {1000,6.6700562169311903e-002}, {1008,6.1551201499117920e-002}, {1016,5.6927083333333107e-002}, {1024,5.2441302910052702e-002}, {1032,4.8139329805996285e-002}, {1040,4.4138282627865788e-002}, {1048,4.0302854938271446e-002}, {1056,3.6713238536155060e-002}, {1064,3.3367504409170946e-002}, {1072,3.0157903439153321e-002}, {1080,2.7215332892416118e-002}, {1088,2.4489362874779444e-002}, {1096,2.1901179453262698e-002}, {1104,1.9483575837742427e-002}, {1112,1.7325837742504339e-002}, {1120,1.5279982363315634e-002}, {1128,1.3376047178130457e-002}, {1136,1.1679618606701893e-002}, {1144,1.0116567460317420e-002}, {1152,8.7028769841269484e-003}, {1160,7.4647266313932672e-003}, {1168,6.2783840388006794e-003}, {1176,5.2653769841269626e-003}, {1184,4.3890542328042150e-003}, {1192,3.6072530864197385e-003}, {1200,2.9092261904761787e-003}, {1208,2.3553240740740644e-003}, {1216,1.8526785714285639e-003}, {1224,1.4316027336860613e-003}, {1232,1.0865850970017592e-003}, {1240,7.9998897707230713e-004}, {1248,5.7429453262786362e-004}, {1256,4.0371472663139162e-004}, {1264,2.6647927689594245e-004}, {1272,1.6727292768959365e-004}, {1280,1.0278880070546694e-004}, {1288,5.4012345679012118e-005}, {1296,2.4526014109347339e-005}, {1304,1.0471781305114595e-005}, {1312,2.7557319223985778e-006}, {1320,2.7557319223985777e-007}}; FriedmanValues FriedmanData11_2[222]={ {221,0.0}, {0,9.9999999999999611e-001}, {2,9.9999997494788773e-001}, {4,9.9999972442680385e-001}, {6,9.9999882255090200e-001}, {8,9.9999696869488153e-001}, {10,9.9999306056597337e-001}, {12,9.9998584555875836e-001}, {14,9.9997559924642876e-001}, {16,9.9995946568862848e-001}, {18,9.9993616722782996e-001}, {20,9.9990495230078169e-001}, {22,9.9986396705146308e-001}, {24,9.9980790043289647e-001}, {26,9.9973990901073839e-001}, {28,9.9965282788199061e-001}, {30,9.9954765913098853e-001}, {32,9.9942109587942529e-001}, {34,9.9927010682218620e-001}, {36,9.9908707611832215e-001}, {38,9.9888147346480283e-001}, {40,9.9863556196889136e-001}, {42,9.9835036876703154e-001}, {44,9.9802960157126430e-001}, {46,9.9767403699694968e-001}, {48,9.9725436407727674e-001}, {50,9.9680144700977635e-001}, {52,9.9627865961198891e-001}, {54,9.9571298300464561e-001}, {56,9.9507701018117278e-001}, {58,9.9439226090267352e-001}, {60,9.9361283970658565e-001}, {62,9.9279994889369483e-001}, {64,9.9188324214365475e-001}, {66,9.9090270262144853e-001}, {68,9.8982280643738563e-001}, {70,9.8870102312810237e-001}, {72,9.8743519019560277e-001}, {74,9.8613338243546167e-001}, {76,9.8469433922558514e-001}, {78,9.8320754669712596e-001}, {80,9.8157595298219891e-001}, {82,9.7987566638607904e-001}, {84,9.7800682920474191e-001}, {86,9.7612130731922009e-001}, {88,9.7404338524129797e-001}, {90,9.7188582251081856e-001}, {92,9.6955452340868609e-001}, {94,9.6719411375660980e-001}, {96,9.6459215167548107e-001}, {98,9.6195383898508502e-001}, {100,9.5909298841590118e-001}, {102,9.5618160774410388e-001}, {104,9.5304177689593972e-001}, {106,9.4984455166746451e-001}, {108,9.4637558621933238e-001}, {110,9.4291045374378324e-001}, {112,9.3913424923841204e-001}, {114,9.3531748536956483e-001}, {116,9.3123549482924095e-001}, {118,9.2714370891453834e-001}, {120,9.2271199094115375e-001}, {122,9.1825221460637740e-001}, {124,9.1347983806316757e-001}, {126,9.0871612954945913e-001}, {128,9.0361166225749190e-001}, {130,8.9847931196889164e-001}, {132,8.9296153499278130e-001}, {134,8.8752410012826310e-001}, {136,8.8168906325155960e-001}, {138,8.7584104938271246e-001}, {140,8.6962491983324963e-001}, {142,8.6347492784992430e-001}, {144,8.5688907928490909e-001}, {146,8.5035140592431913e-001}, {148,8.4340691137565793e-001}, {150,8.3657159391534053e-001}, {152,8.2924139710597711e-001}, {154,8.2201664462080803e-001}, {156,8.1433226110309120e-001}, {158,8.0683150953983962e-001}, {160,7.9882525653358660e-001}, {162,7.9093569624819304e-001}, {164,7.8258748196247874e-001}, {166,7.7446165524290200e-001}, {168,7.6579823532948210e-001}, {170,7.5732323232322918e-001}, {172,7.4830221861471546e-001}, {174,7.3961139169472190e-001}, {176,7.3034311367644389e-001}, {178,7.2129391634599660e-001}, {180,7.1173247855539223e-001}, {182,7.0247705226871604e-001}, {184,6.9267185746352122e-001}, {186,6.8316891634599686e-001}, {188,6.7309481220939271e-001}, {190,6.6344213464004853e-001}, {192,6.5314356361231085e-001}, {194,6.4320909992784725e-001}, {196,6.3273506393297796e-001}, {198,6.2274130190796595e-001}, {200,6.1207301186467600e-001}, {202,6.0180347623055708e-001}, {204,5.9103527837902592e-001}, {206,5.8075371773288198e-001}, {208,5.6983355379188472e-001}, {210,5.5939947590989025e-001}, {212,5.4837439373897479e-001}, {214,5.3793029501362610e-001}, {216,5.2689784752284530e-001}, {218,5.1634620009619792e-001}, {220,5.0526695526695309e-001}, {222,4.9473304473304264e-001}, {224,4.8365379990379787e-001}, {226,4.7310215247715048e-001}, {228,4.6206970498636973e-001}, {230,4.5162560626102105e-001}, {232,4.4060052409010558e-001}, {234,4.3016644620811106e-001}, {236,4.1924628226711386e-001}, {238,4.0896472162096992e-001}, {240,3.9819652376943876e-001}, {242,3.8792698813531984e-001}, {244,3.7725869809202983e-001}, {246,3.6726493606701788e-001}, {248,3.5679090007214859e-001}, {250,3.4685643638768493e-001}, {252,3.3655786535994731e-001}, {254,3.2690518779060312e-001}, {256,3.1683108365399903e-001}, {258,3.0732814253647461e-001}, {260,2.9752294773127985e-001}, {262,2.8826752144460360e-001}, {264,2.7870608365399918e-001}, {266,2.6965688632355189e-001}, {268,2.6038860830527394e-001}, {270,2.5169778138528037e-001}, {272,2.4267676767676669e-001}, {274,2.3420176467051371e-001}, {276,2.2553834475709383e-001}, {278,2.1741251803751716e-001}, {280,2.0906430375180290e-001}, {282,2.0117474346640932e-001}, {284,1.9316849046015636e-001}, {286,1.8566773889690483e-001}, {288,1.7798335537918800e-001}, {290,1.7075860289401887e-001}, {292,1.6342840608465542e-001}, {294,1.5659308862433799e-001}, {296,1.4964859407567679e-001}, {298,1.4311092071508680e-001}, {300,1.3652507215007159e-001}, {302,1.3037508016674629e-001}, {304,1.2415895061728344e-001}, {306,1.1831093674843626e-001}, {308,1.1247589987173275e-001}, {310,1.0703846500721458e-001}, {312,1.0152068803110428e-001}, {314,9.6388337742504021e-002}, {316,9.1283870450536750e-002}, {318,8.6520161936828252e-002}, {320,8.1747785393618391e-002}, {322,7.7288009058842075e-002}, {324,7.2856291085457450e-002}, {326,6.8764505170754886e-002}, {328,6.4682514630431023e-002}, {330,6.0865750761583834e-002}, {332,5.7089546256212681e-002}, {334,5.3624413780663550e-002}, {336,5.0155448332531452e-002}, {338,4.6958223104056236e-002}, {340,4.3818392255892069e-002}, {342,4.0907011584094745e-002}, {344,3.8046161014910852e-002}, {346,3.5407848324514837e-002}, {348,3.2805886243386102e-002}, {350,3.0445476591309795e-002}, {352,2.8114177489177369e-002}, {354,2.5956614758697982e-002}, {356,2.3878692680775915e-002}, {358,2.1993170795254036e-002}, {360,2.0124333613916863e-002}, {362,1.8424047017796940e-002}, {364,1.6792453302869898e-002}, {366,1.5305660774410708e-002}, {368,1.3866617564534171e-002}, {370,1.2564809804393083e-002}, {372,1.1298976871893490e-002}, {374,1.0177193562610185e-002}, {376,9.0972973785473400e-003}, {378,8.1167578563411547e-003}, {380,7.2000511063010754e-003}, {382,6.3871602934102659e-003}, {384,5.6077390973224067e-003}, {386,4.9229898188231308e-003}, {388,4.2870169953503103e-003}, {390,3.7213403880070389e-003}, {392,3.1985529902196436e-003}, {394,2.7456359227192449e-003}, {396,2.3259630030463270e-003}, {398,1.9703984287317540e-003}, {400,1.6496312329645595e-003}, {402,1.3644380311046921e-003}, {404,1.1185265351931972e-003}, {406,9.1292388167387784e-004}, {408,7.2989317780984141e-004}, {410,5.7890412057078479e-004}, {412,4.5234086900753371e-004}, {414,3.4717211800544984e-004}, {416,2.6009098925765478e-004}, {418,1.9209956709956627e-004}, {420,1.3603294853294795e-004}, {422,9.5047699214365484e-005}, {424,6.3832772166105234e-005}, {426,4.0534311367644533e-005}, {428,2.4400753567420131e-005}, {430,1.4154441237774510e-005}, {432,6.9394340227673263e-006}, {434,3.0313051146384348e-006}, {436,1.1774490941157557e-006}, {438,2.7557319223985772e-007}, {440,2.5052108385441611e-008}}; #endif // End Sentry SuppDists/src/dists.cpp0000644000176200001440000037303514665665700014663 0ustar liggesusers#define R_NO_REMAP #include #include #include // for Solaris using namespace std; #if defined(__SUNPRO_CC) && (__cplusplus < 201103L) // This is not C++98 and Solaris CC's headers do not include it extern "C" int snprintf(char *str, size_t size, const char *format, ...); #endif #include #include #include "wheeler.h" #include // for memset #include "dists.h" #include "datatabs.h" // SuppDists by Robert E. Wheeler, March 2001 bool DllMain(void) { return true; } static const double LOG10=2.3025850929940456840179915; static const double MAXEXP=LOG10*DBL_MAX_10_EXP; // Maximum argument for exp() static const double TWOPI=2*M_PI; static const double SQRT2=1.414135623730950488; static const double LNGAMMAHALF=1.144729885849400174143427/2; // log of gamma(1/2)=log(sqrt(PI)) static const double LOG2=0.6931471805599453094172321; static const double TOLNEWTON=3e-8; static const double LOGSQRT2PI=0.9189385332046727417803296; //static const double NA=-1e-12; /* random normal deviates */ void rgauss( double* normArray, int n, double mean, double sd ) { int i; GetRNGstate(); for (i=0;i0 double finvGauss( double x, double mu, double lambda ) { double delta=x/mu-1.0; double ratio=lambda/x; if (x<=0 || mu<=0 || lambda<=0) return NA_REAL; return sqrt(ratio/(TWOPI*x*x))*exp(-0.5*ratio*delta*delta); } // Probability function for R DISTS_API void pinvGaussR( double *xp, double *nup, double *lambdap, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i=MAXEXP) return NA_REAL; return p1+exp(c)*p2; } } // Upper tail Probability function for R DISTS_API void uinvGaussR( double *xp, double *nup, double *lambdap, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i=MAXEXP) return NA_REAL; return q-exp(c)*p; } } // Quantile function for R DISTS_API void qinvGaussR( double *pp, double *nup, double *lambdap, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i 2 perhaps Whitmore, G.A. and Yalovsky, M. (1978). A normalizing logarithmic transformation for inverse Gaussian random variables, Technometrics 20-2, 207-208 For small t, with x<0.5 mu, use gamma approx to 1/x -- alpha=1/2 and beta =2/lambda and 1-p When x>0.5mu, approx x with gamma for p, and exponentiate -- don't know why this works. */ double xinvGauss( double p, double mu, double lambda ) { gMu=mu; gLambda=lambda; gP=p; if (0>p || p>1 || mu<=0 || lambda<=0) return NA_REAL; // double mode=-1.5*(mu*mu)/lambda+mu*sqrt(1.0+2.25*(mu*mu)/(lambda*lambda)); double z; if (lambda/mu>2.0) { z=(qnorm(p,0,1,true,false)-0.5*sqrt(mu/lambda))/sqrt(lambda/mu); z=mu*exp(z); } else { z=lambda/(qgamma(1.0-p,0.5,1.0,true,false)*2.0); if (z>mu/2.0) { // too large for the gamma approx z=mu*exp(qgamma(p,0.5,1.0,true,false)*0.1); // this seems to work for the upper tail ??? } } z=NewtonRoot(z,true,dinvGaussP,finvGaussP,3e-8); return z; } // Random function for R DISTS_API void rinvGaussR( double *nup, double *lambdap, int *Np, int *Mp, // length of nup and lambdap double *valuep ) { int N=*Np; int M=*Mp; int D; int j; int k; int loc; int cloc; double *tArray; if (M==1) rinvGauss(valuep,N,*nup,*lambdap); else { // Allow for random values for each element of nu and lambda D=(N/M)+((N%M)?1:0); tArray=(double *)S_alloc((long)D,sizeof(double)); loc=0; for (j=0;j=7.0) { f=0.0; } else { for (f=1.0;x<7.0;x+=1.0) { f*=x; } f=-log(f); } double z=1.0/(x*x); f+=(x-0.5)*log(x)-x+LOGSQRT2PI; double t=(T9*z-T7)*z+T5; f+=((t*z-T3)*z+T1)/x; return (f); } /* normdrv -- derivatives of normal */ /* normal density */ double phi0(double x) { double constant=.398942280401433; return (constant*exp(-0.5*x*x)); } /* third derivative z=phi0(x)*/ double phi3(double x,double z) { return (z*x*(3.0-x*x)); } /* fifth derivative z=phi0(x)*/ double phi5(double x,double z) { double s; s=x*x; return (-z*x*((s-10.0)*s+15.0)); } /* seventh derivative z=phi0(x)*/ double phi7(double x,double z) { double s; s=x*x; return(z*x*(((-s+21.0)*s-105.0)*s+105.0)); } /* Permute *************************************************************** | Randomly pemutes the n integers in a[] using the Fike | algorithm. See Fike, "A permutation generation method" The Computer | Journal, 18-1, Feb 75, 21-22. */ void Permute( int* a, int n ) { int i; int j; int temp; GetRNGstate(); for (i=1;iKruskalWallisMaxU(c,n)) return NA_REAL; double V=(doNormalScore)?varNormalScores(N,C,U):varKruskal_Wallis(N,C,U); double d=((N-C)*(C-1.0)-V)/((N-1.0)*V); double f1=(C-1.0)*d; double f2=(N-C)*d; return pbeta(H/(N-1.0),f1,f2,true,false); } DISTS_API void uKruskalWallisR( double *Hp, int *cp, int *np, double *Up, int *doNormalScorep, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;iKruskalWallisMaxU(c,n)) return NA_REAL; return 1.0-pKruskal_Wallis(H,c,n,U,doNormalScore); } DISTS_API void qKruskalWallisR( double *pp, int *cp, int *np, double *Up, int *doNormalScorep, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;iP || P>1 || U<=0 || U>KruskalWallisMaxU(c,n)) return NA_REAL; double V=(doNormalScore)?varNormalScores(N,C,U):varKruskal_Wallis(N,C,U); double d=((N-C)*(C-1.0)-V)/((N-1.0)*V); double f1=(C-1.0)*d; double f2=(N-C)*d; return (N-1.0)*qbeta(P,f1,f2,true,false); } // Statistics for Kruskal_Wallis and Normal Scores DISTS_API void sKruskalWallisR( int *cp, int *np, double *Up, int *doNormalScorep, int *Np, double *varp, double *modep, double *thirdp, double *fourthp ) { int N=*Np; int i; for (i=0;iKruskalWallisMaxU(cp[i],np[i])){ varp[i]=NA_REAL; } else { varp[i]=(doNormalScorep[i])?varNormalScores(np[i],cp[i],Up[i]):varKruskal_Wallis(np[i],cp[i],Up[i]); } } } void sKruskal_Wallis( int c, int n, double U, bool doNormalScore, double *mode, double *third, // Central moments double *fourth ) { int nPoints=128; if (U<=0) { *mode=NA_REAL; *third=NA_REAL; *fourth=NA_REAL; } else { double minH=xKruskal_Wallis(0.01,c,n,U,doNormalScore); double maxH=xKruskal_Wallis(0.99,c,n,U,doNormalScore); double md=0.0; double maxValue=0.0; double m3=0.0; double m4=0.0; double sum=0.0; double mean=(double)(c-1); double delta=(maxH-minH)/(double)(nPoints-1); double H=minH; while (nPoints--) { double val=fKruskal_Wallis(H,c,n,U,doNormalScore); if (maxValue1 || tau <-1 || ni<2) return NA_REAL; if (k<0L) { return 0.0; } if (t>M) { return 1.0; } if (ni<=MAXKENDALEXACT) { return kendexact(ni,k,false); } double s=n*(n+1)*(2.0*n+1.0)/6.0; double f=((n+1)*3.0*n-1)/5.0; double g=(((n*n+2.0)*n-1.0)*3.0*n+1)/7.0; double sd=s-n; double l4=-1.2*(s*f-n)/(sd*sd); double l6=(48.0/7.0)*(s*g-n)/(sd*sd*sd); sd=sqrt(sd/12.0); double x=(t+CONTCORRK-mean)/sd; double z=phi0(x); double P=pnorm(x,0,1,true,false); P+=((35*l4*l4*phi7(x,z)/56.0+l6*phi5(x,z))/30.0+l4*phi3(x,z))/24.0; return P; } DISTS_API void fourthKendallR( int *nip, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || tau <-1) return NA_REAL; if (k<0L) { return 0.0; } if (t>M) { return 0.0; } if (ni<=MAXKENDALEXACT) { return kendexact(ni,k,true); } double s=n*(n+1)*(2.0*n+1.0)/6.0; double f=((n+1)*3.0*n-1)/5.0; double g=(((n*n+2.0)*n-1.0)*3.0*n+1)/7.0; double sd=s-n; double l4=-1.2*(s*f-n)/(sd*sd); double l6=(48.0/7.0)*(s*g-n)/(sd*sd*sd); sd=sqrt(sd/12.0); double x=(t+CONTCORRK-mean)/sd; double z=phi0(x); double P1=pnorm(x,0,1,true,false); P1+=((35*l4*l4*phi7(x,z)/56.0+l6*phi5(x,z))/30.0+l4*phi3(x,z))/24.0; t-=1.0; double P0=0; if (t>=0.0) { x=(t+CONTCORRK-mean)/sd; z=phi0(x); P0=pnorm(x,0,1,true,false); P0+=((35*l4*l4*phi7(x,z)/56.0+l6*phi5(x,z))/30.0+l4*phi3(x,z))/24.0; } return P1-P0; } /* qkendall -- Upper tail of Kendall's tau Retruns Pr(T>=tau|n).*/ DISTS_API void uKendallR( int *nip, double *taup, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || tau <-1 || n<2) return NA_REAL; return (1.0-pkendall(n,tau)); } /* xkendall -- returns smallest tau such that pr<=Pr(T<=tau|n). */ DISTS_API void qKendallR( int *nip, double *pp, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i=pr || pr>=1 || ni<2) return NA_REAL; while (larger) { if (! k) { goto theExit; } tau=4.0*(double)(--k)/(n*(n-1.0))-1.0; larger=(pr<=pkendall(ni,tau)); if (! larger) { ++k; goto theExit; } } while (! larger) { tau=4.0*(double)(++k)/(n*(n-1.0))-1.0; larger=(pr<=pkendall(ni,tau)); if (larger) { goto theExit; } } theExit: return 4.0*(double)k/(n*(n-1.0))-1.0; // Tau } /* Kendall tau random numbers */ DISTS_API void rKendallR( int *nip, int *Np, int *Mp, double *valuep ) { int N=*Np; int M=*Mp; int D; int j; int k; int loc; int cloc; double *tArray; if (M==1) rkendall(valuep,N,*nip); else { // Allow for random values for each element of nu and lambda D=(N/M)+((N%M)?1:0); tArray=(double *)S_alloc((long)D,sizeof(double)); loc=0; for (j=0;j1) { n*=2; // Number of new ordinates } twoPower*=2.0; double sum=0.0; double z=upperLimit-delta; // Start with this value int m=n; while (m--) { double value=pmaxFRatioIntegrand(z,F,df,N,logC); sum+=value; z-=2.0*delta; // Every other ordinate is a new one } A[0][k]=A[0][k-1]/2.0 + h*sum/twoPower; // Pool old and new ordinate sum // Fill out the Romberg triangle double fourPower=1.0; for (int i=1;i<=k;i++) { fourPower*=4.0; A[i][k-i]=(fourPower*A[i-1][k-i+1]-A[i-1][k-i])/(fourPower-1.0); } // Check for convergence value=A[k][0]; if (fabs((value - A[k-1][0])/value)=maxiterate-1); return value; } /* Upper tail of maximum F ratio */ DISTS_API void umaxFratioR( double *Fp, int *dfp, int *np, // Number of mean squares int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1) { n*=2; // Number of new ordinates } twoPower*=2.0; double sum=0.0; double z=upperLimit-delta; // Start with this value int m=n; while (m--) { double value=fmaxFRatioIntegrand(z,F,dgf,N,logC); sum+=value; z-=2.0*delta; // Every other ordinate is a new one } A[0][k]=A[0][k-1]/2.0 + h*sum/twoPower; // Pool old and new ordinate sum // Fill out the Romberg triangle double fourPower=1.0; for (int i=1;i<=k;i++) { fourPower*=4.0; A[i][k-i]=(fourPower*A[i-1][k-i+1]-A[i-1][k-i])/(fourPower-1.0); } // Check for convergence value=A[k][0]; if (fabs((value - A[k-1][0])/value)=maxiterate-1); return value; } /* Inverse maximum F ratio Uses Newton iterations */ static const int MAXFITER=20; // Parameters for Johnson fit for df=2,4,8,16,32,64 and K=3,6,9,12 static JohnsonParms parmArray[7][4]={ {{-1.019,0.510,2.750,0.915,SU},{-1.000,0.512,7.904,2.941,SU},{-0.996,0.512,14.124,5.302,SU},{-0.995,0.512,21.008,7.887,SU}}, {{-1.542,0.834,1.425,0.616,SU},{-1.403,0.857,2.919,1.519,SU},{-1.372,0.862,4.317,2.235,SU},{-1.358,0.865,5.612,2.858,SU}}, {{-2.892,1.252,0.927,0.271,SU},{-2.043,1.302,1.625,0.872,SU},{-1.931,1.314,2.184,1.175,SU},{-1.883,1.319,2.649,1.395,SU}}, {{4.014,1.447,0.862,15.467,SB},{-3.054,1.848,1.127,0.523,SU},{-2.712,1.860,1.439,0.705,SU},{-2.571,1.862,1.681,0.814,SU}}, {{2.995,1.509,0.896,4.930,SB},{-5.061,2.518,0.884,0.268,SU},{-3.699,2.480,1.126,0.457,SU},{-3.524,2.497,1.261,0.514,SU}}, {{2.439,1.528,0.927,2.357,SB},{8.346,2.888,0.832,13.668,SB},{-6.664,3.306,0.907,0.209,SU},{-4.496,3.145,1.083,0.348,SU}}, {{2.326,1.620,0.937,1.515,SB},{8.411,3.231,0.851,7.635,SB},{-7.810,3.947,0.880,0.163,SU},{-4.428,3.497,1.062,0.277,SU}}}; static const double ln2=0.69314718055994172321; JohnsonParms GetClosestJohnsonParms( int df, int N ) { int row; int col; double ddf=(double)df; double dN=(double)N; dN/=3; col=int(floor(0.5+dN))-1; col=maxm(0,col); col=minm(3,col); ddf=log(ddf)/ln2; // log base 2 of ddf row=int(floor(0.5+ddf))-1; row=maxm(0,row); row=minm(6,row); return parmArray[row][col]; } DISTS_API void qmaxFratioR( double *pp, int *dfp, int *np, // Number of mean squares int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || dgf<1 || N<1) return NA_REAL; // This dist is a folded F if (N equals 2) { return qf(1.0-0.5*(1.0-p),(double)dgf,(double)dgf,true,false); } // Can actually do a little better, especiall for larger df, but this is safe if (dgf>160 || N>24) return NA_REAL; JohnsonParms parms=GetClosestJohnsonParms(dgf,N); double x=xjohnson(p,parms); x=maxm(1.000001,x); // Johnson sometimes comes up with a value less than 1 bool more=true; double h; double ho=1e6; int m=0; repeat h=(p-pmaxfratio(x,dgf,N))/fmaxfratio(x,dgf,N); x+=h; more=(fabs(h/x)>TOLNEWTON); if (hoMAXFITER || ! more); // The max F Ratio must be at least 1 if (x<1.0) { x=1.000001; } return x; } void rmaxFratio( double *randomArray, int N, int df, int n, double *tArray ) { int i; int j; double maxV; double minV; for (i=0;imaxV)?tArray[j]:maxV; minV=(tArray[j]np[j])?n:np[j]; pArray=(double *)S_alloc((long)n,sizeof(double)); D=(N/M)+((N%M)?1:0); tArray=(double *)S_alloc((long)D,sizeof(double)); loc=0; for (j=0;j=r-1) { return false; } else if (key[k]) { --key[k]; for (int i=0;iS!=workingType->S) { return false; } // No need to check further in this case, since only one set of permutations // are used -- the second generation types are the final generation if (n equals 2) { return true; } for (i=0;iR[i])!=abs(workingType->R[i])) { return false; } } // The absolute values in the two arrays are the same, but // must check to see that the signs match. So will sort them // in increasing order and compare them. If this doesn't give // agreement, will reverse the signs of one array and try again. int *R1=(int *)S_alloc((long)r,sizeof(int)); int *R2=(int *)S_alloc((long)r,sizeof(int)); for (i=0;iR[i]; R2[i]=workingType->R[i]; } qsort((void*)R1,(size_t)r,sizeof(int),IncreasingIntcmpf); qsort((void*)R2,(size_t)r,sizeof(int),IncreasingIntcmpf); bool sameType=true; for (i=0;iR; delete aType; } static int InsertTypeInList( int nWorkingTypes, Ftype** workingTypes, int r, int n, Ftype* aType ) { for (int i=0;ifrequency+=aType->frequency; DeleteFtype(aType); return nWorkingTypes; } } // A new type has been found if (nWorkingTypes+1>=MAXTYPE) { DeleteFtype(aType); for (int i=0;iR=new int[r]; // This pointer is either added to the workingType list // or deleted by InsertTypeInList(); int S=0; for (int j=0;jR[j]=currentType->R[j]+temp[j]; S+=R*R; } aType->S=S; aType->frequency=currentType->frequency; // Keep R in increasing absolute order so IsSameType will work qsort((void*)aType->R,(size_t)r,sizeof(int),AbsIntcmpf); nWorkingTypes=InsertTypeInList(nWorkingTypes,workingTypes,r,n,aType); solongas(UpdateTheKey(0,r,key)); // Cycles key through all possible permutations return nWorkingTypes; } static FriedmanStrc* MakeFriedmanStrc( int nCurrentTypes, Ftype** currentTypes, double totalFrequency // Double because totalFrequency is (r!)^(n-1) which gets big. ) { FriedmanStrc* theStrc=new FriedmanStrc; int i; // Set up orderS for sorting int (*orderS)[2]; orderS=new int[nCurrentTypes][2]; for (i=0;iS; } // Sort in increasing S order, carrying index along qsort((void*)orderS,(size_t)nCurrentTypes,2*sizeof(int),IntPairCompare); // Temp arrays, because after pooling nS may be smaller than nCurrenTypes int* ST=new int[nCurrentTypes]; double* qdistT=new double[nCurrentTypes]; double sum=0.0; // Sum from max S to min S and form qdist for (i=nCurrentTypes-1;i>=0;i--) { int j=orderS[i][0]; // Index of ith largest S in currentTypes ST[i]=currentTypes[j]->S; sum+=(currentTypes[j]->frequency)/totalFrequency; qdistT[i]=sum; } delete [] orderS; // Pool types with same S // Since qdist is cumulative, this means skipping some S int j=0; int skipped=0; double qdist=qdistT[0]; int S=ST[0]; for (i=1;inS=nCurrentTypes-skipped; // Either assign arrays to theStrc or create new ones and copy if nSS=ST; theStrc->qdist=qdistT; } else { theStrc->S=new int[nS]; theStrc->qdist=new double[nS]; for (int i=0;iS[i]=ST[i]; theStrc->qdist[i]=qdistT[i]; } delete [] ST; delete [] qdistT; } return theStrc; } // Creates a FriedmanStrc from data in datatabs.h // NOTE: r==2 is always calcualted because it takes little time // The same could be done for small n's static bool GetFriedmanStatic( int r, int n, FriedmanStrc** theStrc ) { FriedmanValues* theValues=0L; bool isInTables=true; if (n equals 2) { switch (r) { case 3: theValues=(FriedmanValues*)FriedmanData3_2; break; case 4: theValues=(FriedmanValues*)FriedmanData4_2; break; case 5: theValues=(FriedmanValues*)FriedmanData5_2; break; case 6: theValues=(FriedmanValues*)FriedmanData6_2; break; case 7: theValues=(FriedmanValues*)FriedmanData7_2; break; case 8: theValues=(FriedmanValues*)FriedmanData8_2; break; case 9: theValues=(FriedmanValues*)FriedmanData9_2; break; case 10: theValues=(FriedmanValues*)FriedmanData10_2; break; case 11: theValues=(FriedmanValues*)FriedmanData11_2; break; // Tried r==12, but it took 18 hrs and then bombed?? default: theValues=0L; isInTables=false; break; } } else if (r equals 3) { switch (n) { case 3: theValues=(FriedmanValues*)FriedmanData3_3; break; case 4: theValues=(FriedmanValues*)FriedmanData3_4; break; case 5: theValues=(FriedmanValues*)FriedmanData3_5; break; case 6: theValues=(FriedmanValues*)FriedmanData3_6; break; case 7: theValues=(FriedmanValues*)FriedmanData3_7; break; case 8: theValues=(FriedmanValues*)FriedmanData3_8; break; case 9: theValues=(FriedmanValues*)FriedmanData3_9; break; case 10: theValues=(FriedmanValues*)FriedmanData3_10; break; case 11: theValues=(FriedmanValues*)FriedmanData3_11; break; case 12: theValues=(FriedmanValues*)FriedmanData3_12; break; case 13: theValues=(FriedmanValues*)FriedmanData3_13; break; case 14: theValues=(FriedmanValues*)FriedmanData3_14; break; case 15: theValues=(FriedmanValues*)FriedmanData3_15; break; case 16: theValues=(FriedmanValues*)FriedmanData3_16; break; case 17: theValues=(FriedmanValues*)FriedmanData3_17; break; case 18: theValues=(FriedmanValues*)FriedmanData3_18; break; case 19: theValues=(FriedmanValues*)FriedmanData3_19; break; case 20: theValues=(FriedmanValues*)FriedmanData3_20; break; case 21: theValues=(FriedmanValues*)FriedmanData3_21; break; case 22: theValues=(FriedmanValues*)FriedmanData3_22; break; case 23: theValues=(FriedmanValues*)FriedmanData3_23; break; case 24: theValues=(FriedmanValues*)FriedmanData3_24; break; case 25: theValues=(FriedmanValues*)FriedmanData3_25; break; case 26: theValues=(FriedmanValues*)FriedmanData3_26; break; case 27: theValues=(FriedmanValues*)FriedmanData3_27; break; case 28: theValues=(FriedmanValues*)FriedmanData3_28; break; case 29: theValues=(FriedmanValues*)FriedmanData3_29; break; case 30: theValues=(FriedmanValues*)FriedmanData3_30; break; default: theValues=0L; isInTables=false; break; } } else if (r equals 4) { switch (n) { case 3: theValues=(FriedmanValues*)FriedmanData4_3; break; case 4: theValues=(FriedmanValues*)FriedmanData4_4; break; case 5: theValues=(FriedmanValues*)FriedmanData4_5; break; case 6: theValues=(FriedmanValues*)FriedmanData4_6; break; case 7: theValues=(FriedmanValues*)FriedmanData4_7; break; case 8: theValues=(FriedmanValues*)FriedmanData4_8; break; case 9: theValues=(FriedmanValues*)FriedmanData4_9; break; case 10: theValues=(FriedmanValues*)FriedmanData4_10; break; case 11: theValues=(FriedmanValues*)FriedmanData4_11; break; case 12: theValues=(FriedmanValues*)FriedmanData4_12; break; case 13: theValues=(FriedmanValues*)FriedmanData4_13; break; case 14: theValues=(FriedmanValues*)FriedmanData4_14; break; case 15: theValues=(FriedmanValues*)FriedmanData4_15; break; default: theValues=0L; isInTables=false; break; } } else if (r equals 5) { switch (n) { case 3: theValues=(FriedmanValues*)FriedmanData5_3; break; case 4: theValues=(FriedmanValues*)FriedmanData5_4; break; case 5: theValues=(FriedmanValues*)FriedmanData5_5; break; case 6: theValues=(FriedmanValues*)FriedmanData5_6; break; case 7: theValues=(FriedmanValues*)FriedmanData5_7; break; case 8: theValues=(FriedmanValues*)FriedmanData5_8; break; default: theValues=0L; isInTables=false; break; } } else { isInTables=false; } if (isInTables) { (*theStrc)=new FriedmanStrc; int nS=theValues[0].S; (*theStrc)->nS=nS; (*theStrc)->S=new int[nS]; (*theStrc)->qdist=new double[nS]; for (int i=0;iS[i]=theValues[i+1].S; (*theStrc)->qdist[i]=theValues[i+1].qdist; } return true; } return false; } void freeStoreException() { Rf_error("\nOut of user-controlled memory"); } /* Calculates Friedmans Chi exactly Starts with a single Ftype type with unpermuted centered ranks and frequency 1 Adds all possible permutations, collates by type with frequencies cumulated per type. Increments n by repeating the above for all possible types, etc. This is the Kendall-Babington-Smith algorithm. */ FriedmanStrc* FriedmanExact( int r, int n ) { std::set_new_handler(freeStoreException); // if a static array exists, copies it into a FriedmanStrc and returns FriedmanStrc* aStrc; if (GetFriedmanStatic(r,n,&aStrc)) { return aStrc; } // Otherwise calculate the FriedmanStrc int i; Ftype** currentTypes=new Ftype*[MAXTYPE]; Ftype** workingTypes=new Ftype*[MAXTYPE]; // The base is an array of unpermuted centered ranks // (1-r)/2,(3-r)/2,...,(r-1)/2 for odd r // (1-r),(3-r),...,(r-1) for even r int *base=new int[r]; bool even=(0 equals r%2); int step=even?2:1; int x=even?1-r:(1-r)/2; for (i=0;iR=new int[r]; currentTypes[0]->S=0; currentTypes[0]->frequency=1.0; for (i=0;iR[i]=base[i]; currentTypes[0]->S+=R*R; } // Successively add levels of rankings til n have been added int m=n; while (--m) { int nWorkingTypes=0; int j; // Add all permutations to each of the current types // Allocate the results to elements in the workingTypes list, adding // frequencies or inserting new types as needed. for (j=0;jSS -- thus qdist[k] is area above SS and 1-qdist[k] is area up to and including SS If lower is false: Finds largest k such that S[k]<=SS -- thus qdist[k] is are above and including SS. */ static int FriedmanFindS( int SS, int maxS, int *S, int nS, bool lower ) { double guess=(double)SS/(double)maxS; int k=(int)((double)(nS-1)*guess); bool larger=(lower)?S[k]>SS:S[k]>=SS; while (larger) { if (k equals 0) { return k; } else if (! lower && SS equals S[k]) { return k; } else { larger=S[--k]>SS; if (! larger) { return (lower)?++k:k; } } } while (! larger) { if (k equals nS-1) { return k; } else { larger=(lower)?S[++k]>SS:S[++k]>=SS; if (larger) { if (lower || S[k] equals SS) { return k; } else { return --k; } } } } return 0; } // deletes S and qdist for the current global // Also deletes the global struct if deleteAll it true void ClearFriedmanGlobal( bool deleteAll ) { delete [] FriedmanCurrentGlobal->theDist->S; delete [] FriedmanCurrentGlobal->theDist->qdist; delete [] FriedmanCurrentGlobal->theDist; if (deleteAll) { delete FriedmanCurrentGlobal; FriedmanCurrentGlobal=0L; } } // Check for existence and feasible of the exact calculation. // Return true if it exists or it is feasible, // and then set Q for a given s. static bool CheckFriedmanExactQ( int r, int n, double s, double* Q, bool lower, bool doRho // When true s is Spearman's rho ) { if (DoExactFriedman(r,n,doRho)) { if (! FriedmanCurrentGlobal || FriedmanCurrentGlobal->r!=r || FriedmanCurrentGlobal->n!=n) { if (FriedmanCurrentGlobal) { ClearFriedmanGlobal(false); // Delete current S and theDist } else { // Allocate a new global FriedmanCurrentGlobal = new FriedmanGlobal; } FriedmanCurrentGlobal->theDist=FriedmanExact(r,n); FriedmanCurrentGlobal->r=r; FriedmanCurrentGlobal->n=n; } int SS; if (doRho) { SS=int(0.5+((double)(r*(r*r-1))/6.0)*(1.0+s)); } else { SS=(int)(0.5+s*(double)(n*r*(r+1))/12.00); } if (0 equals r%2) { SS*=4; // For even r, the ranks were multiplied by 2 to keep them integer. } FriedmanStrc* theDist=FriedmanCurrentGlobal->theDist; int nS=theDist->nS; int maxS=theDist->S[nS-1]; int k=FriedmanFindS(SS,maxS,theDist->S,nS,lower); *Q=theDist->qdist[k]; return true; } else { if (FriedmanCurrentGlobal) { ClearFriedmanGlobal(true); // Delete and zero the current global } return false; } } // Check for existence and feasible of the exact calculation. // Return true if it exists or it is feasible, // and then set F, the probabilty of exactly X. static bool CheckFriedmanExactF( int r, int n, double X, double* F, bool lower, bool doRho // When true s is Spearman's rho ) { if (DoExactFriedman(r,n,doRho)) { if (! FriedmanCurrentGlobal || FriedmanCurrentGlobal->r!=r || FriedmanCurrentGlobal->n!=n) { if (FriedmanCurrentGlobal) { ClearFriedmanGlobal(false); // Delete current S and theDist } else { // Allocate a new global FriedmanCurrentGlobal = new FriedmanGlobal; } FriedmanCurrentGlobal->theDist=FriedmanExact(r,n); FriedmanCurrentGlobal->r=r; FriedmanCurrentGlobal->n=n; } int SS; if (doRho) { SS=int(0.5+((double)(r*(r*r-1))/6.0)*(1.0+X)); } else { SS=(int)(0.5+X*(double)(n*r*(r+1))/12.00); } if (0 equals r%2) { SS*=4; // For even r, the ranks were multiplied by 2 to keep them integer. } FriedmanStrc* theDist=FriedmanCurrentGlobal->theDist; int nS=theDist->nS; int maxS=theDist->S[nS-1]; int k=FriedmanFindS(SS,maxS,theDist->S,nS,lower); // Includes prob for x *F=theDist->qdist[k]; if (kqdist[k+1]; } return true; } else { if (FriedmanCurrentGlobal) { ClearFriedmanGlobal(true); // Delete and zero the current global } return false; } } // Exact or approximation to Friedman's chisquared // Continuous approx follows Walsh vol III, p403 // Gives lower tial up to an including X DISTS_API void pFriedmanR( double *Xp, int *rp, int *np, int *Np, bool *doRhop, double *valuep ) { int N=*Np; int i; for (i=0;iM || S<0) return NA_REAL; long iS=(long)ceil(S); // Round up to even, because S values must be even iS=2*(iS/2); S=maxm(1L,iS); if (CheckFriedmanExactQ(r,n,X,&Q,true,doRho)) { return 1.0-Q; // Lower tail including X exactly } else { double W=(S-1.0)/(M+2.0); // Corrected for continuity double a=(double)(r-1)-2.0/(double)n; double b=a*(double)(n-1); return 1.0-pbeta(1.0-W,b/2.0,a/2.0,true,false); } } DISTS_API void uFriedmanR( double *Xp, int *rp, int *np, int *Np, bool *doRhop, double *valuep ) { int N=*Np; int i; for (i=0;iM || S<0) return NA_REAL; // Changed to conform to R usage // S-=2.0; // Because upper tail, including X, is wanted long iS=(long)floor(S); // Round down to even, because S values must be even iS=2*(iS/2); S=iS; S=maxm(1L,iS); // if (CheckFriedmanExactQ(r,n,X,&Q,false,doRho)) { // return Q; // Upper tail area including X exactly // Changed to conform to R usage if (CheckFriedmanExactQ(r,n,X,&Q,true,doRho)) { return Q; // Upper tail area excluding X exactly } else { double W=(S-1.0)/(M+2.0); // Corrected for continuity double a=(double)(r-1)-2.0/(double)n; double b=a*(double)(n-1); return pbeta(1.0-W,b/2.0,a/2.0,true,false); } } // Mode of Friedman dist double modefrie( int r, int n ) { double maxX=(double)(n*(r-1)); // Max value of X double mode=0.0; double modeVal=0.0; int nPoints=128; double delta=maxX/(double)(nPoints-1); double X=0.0; while (nPoints--){ double curVal=ffrie(X,r,n,false); if (modeValM || S<0) return NA_REAL; S-=2.0; // Because upper tail, including X, is wanted long iS=(long)floor(S); // Round down to even, because S values must be even iS=2*(iS/2); S=iS; S=maxm(1L,iS); if (CheckFriedmanExactF(r,n,X,&F,false,doRho)) { return F; // Exact probabilty at X } else { double W=(S-1.0)/(M+2.0); // Corrected for continuity double a=(double)(r-1)-2.0/(double)n; double b=a*(double)(n-1); // difference in densities at X return pbeta(1.0-W,b/2.0,a/2.0,true,false)-pbeta(1.0-W-2.0/(M+2.0),b/2.0,a/2.0,true,false); } } DISTS_API void qFriedmanR( double *pp, int *rp, int *np, int *Np, bool *doRhop, double *valuep ) { int N=*Np; int i; for (i=0;iP || P>1) return NA_REAL; iS=2*(iS/2); // Round up to even, because S values must be even S=iS; S=maxm(1L,iS); double X; double step; step=12.0/(double)(n*r*(r+1)); double MX=M*step; // Max vlaue of X X=S*step; X=maxm(0,X); X=minm(MX,X); // X must be such that P<=pfrie() bool larger=(P<=pfrie(X,r,n,false)); while (larger) { if (X <= 0.0) { X=0.0; goto theEnd; } X-=step; if (X<0.0) { larger=false; } else larger=(P<=pfrie(X,r,n,false)); if (! larger) { X+=step; goto theEnd; } } while (! larger) { if (X+step >= MX) { X=MX; goto theEnd; } X+=step; larger=(P<=pfrie(X,r,n,false)); if (larger) { goto theEnd; } } X=0.0; theEnd: if (doRho) { return (X/(double)(r-1)-1.0); } else return X; } /* Friedman random numbers */ DISTS_API void rFriedmanR( int *rp, int *np, bool *doRhop, int *Np, int *Mp, double *valuep ) { int N=*Np; int M=*Mp; int D; int j; int k; int loc; int cloc; double *tArray; if (M==1) rfrie(valuep,*Np,*rp,*np,*doRhop); else { // Allow for random values for each element of nu and lambda D=(N/M)+((N%M)?1:0); tArray=(double *)S_alloc((long)D,sizeof(double)); loc=0; for (j=0;jTOLSU) { // Johnson Iteration int count=0; repeat double wPlus1=w+1.0; double wMinus1=w-1.0; z=wPlus1*B2Minus3; double v=w*(6.0+w*(3.0+w)); double a=8.0*(wMinus1*(3.0+w*(7.0+v))-z); double b=16.0*(wMinus1*(6.0+v)-B2Minus3); m=(sqrt(a*a-2.0*b*(wMinus1*(3.0+w*(9.0+w*(10.0+v)))-2.0*wPlus1*z))-a)/b; z=(4.0*(w+2.0)*m+3.0*wPlus1*wPlus1); double h=(2.0*m+wPlus1); z=m*wMinus1*(z*z)/(2.0*h*h*h); v=w*w; w=sqrt(1.0-2.0*(1.5-B2+(B1*(B2-1.5-v*(1.0+0.5*v)))/z)); w=sqrt(w-1.0); until(fabs(B1-z)<=TOLSU || count++>100); if (count>100) { Rf_error("\nToo many iterations"); return; } m/=w; m=log(sqrt(m)+sqrt(1.0+m)); m=(sqrtB1>0.0)?-m:m; } parms.delta=sqrt(1.0/log(w)); double omega=m; parms.gamma=omega*parms.delta; parms.lambda=sd/(sqrt(0.5*(w-1.0)*(w*cosh(2.0*omega)+1.0))); parms.xi=mean+(0.5*sqrt(w)*sinh(omega))*parms.lambda; parms.type=SU; } // Finds first N moments of Johnson SB, puts them in moments[] bool JohnsonMOM( double gamma, double delta, double* moments ) { const int N=6; const int iterLimit=500; const double innerTol=1e-8; const double outerTol=1e-5; const double ln10=2.3025850929940456840179915; const double recipSqrtPi=0.5641895835477562869480795; const double expA=ln10*DBL_MAX_10_EXP; const double expB=-log(DBL_EPSILON); bool howExit=true; double oldMoments[N]; memset(oldMoments,0,N*sizeof(double)); double w=gamma/delta; if (w>expA) { return false; } double h=0.75; double expW=exp(w)+1.0; if (delta<3.0) { h=delta/4.0; } int count=0; bool more=false; // The outer loop repeat // Skip this the first time if (count) { for (int i=0;i-expB) { z+=exp(u); } t+=f; bool bL=t>expB; double s=0; if (! bL) { s=exp(t)+1.0; } double p=exp(-v); double q=p; for (i=0;i innerTol) { more=true; } } until(! more || countInner++>iterLimit); if (more) { goto errExit; } for (i=0;iouterTol) { more=true; } } until(! more || count++>iterLimit); if (! more) { goto theExit; } errExit: howExit=false; theExit: return howExit; } // Fits the Johnson Sb bool JohnsonMomentSb( JohnsonParms& parms, double mean, double sd, double sqrtB1, double B2 ) { const double TOLSB=0.01; const double tTol=1e-2; const int iterLimit=50; const int N=6; // Number of moments bool howExit=true; double absSqrtB1=fabs(sqrtB1); double B1=sqrtB1*sqrtB1; bool negativeB1=(sqrtB1<0.0); // Get first estimate of delta double delta; double x=1.0+0.5*B1; double y=absSqrtB1*sqrt(1.0+B1/4.0); double w=pow(x+y,1.0/3.0)+pow(x-y,1.0/3.0)-1.0; double f=w*w*(3.0+w*(2.0+w))-3.0; double e=1.0+B1; e=(B2-e)/(f-e); if (absSqrtB1<=TOLSB) { f=2.0; } else { delta=1.0/sqrt(log(w)); if (delta<0.64) { f=1.25*delta; } else { f=2.0-8.5245/(delta*(delta*(delta-2.163)+11.346)); } } f=1.0+e*f; if (f<1.8) { delta=0.8*(f-1.0); } else { delta=(0.626*f-0.408)*pow((3.0-f),-0.479); } // Get first estimate of gamma double gamma=0.0; if (B1>=tTol) { if (delta<=1.0) { gamma=(0.7466*pow(delta,1.7973)+0.5955)*pow(B1,0.485); } else { if (delta<=2.5) { gamma=pow(B1,0.0623*delta+0.4043); } else { gamma=pow(B1,0.0124*delta+0.5291); } gamma*=(0.9281+delta*(1.0614*delta-0.7077)); } } int count=0; bool more=false; bool errorSet=false; double moments[N]; double h2=0; double oldDeltaGamma=100.0; double oldDeltaDelta=100.0; repeat // Get first N moments for latest delta and gamma if (JohnsonMOM(gamma,delta,moments)) { h2=moments[1]-moments[0]*moments[0]; if (h2>0.0) { double h2a=sqrt(h2)*h2; double h2b=h2*h2; double h3=moments[2]-moments[0]*(3.0*moments[1]-2.0*moments[0]*moments[0]); double rbet=h3/h2a; double h4=moments[3]-moments[0]*(4.0*moments[2]-moments[0]* (6.0*moments[1]-3.0*moments[0]*moments[0])); double bet2=h4/h2b; double w=gamma*delta; double u=delta*delta; // Get derivatives double dd[N]; double deriv[N]; for (int j=0;j<2;j++) { for (int k=0;k<4;k++) { double t=(double)k; double s; if (! j) { s=moments[k+1]-moments[k]; } else { s=((w-t)*(moments[k]-moments[k+1])+(1.0+t)* (moments[k+1]-moments[k+2]))/u; } dd[k]=t*s/delta; } double t=2.0*moments[0]*dd[0]; double s=moments[0]*dd[1]; double y=dd[1]-t; deriv[j]=(dd[2]-3.0*(s+moments[1]*dd[0]-t*moments[0])- 1.5*h3*y/h2)/h2a; deriv[j+2]=(dd[3]-4.0*(dd[2]*moments[0]+dd[0]*moments[2])+ 6.0*(moments[1]*t+moments[0]*(s-t*moments[0]))- 2.0*h4*y/h2)/h2b; } double t=1.0/(deriv[0]*deriv[3]-deriv[1]*deriv[2]); double deltaGamma=(deriv[3]*(rbet-absSqrtB1)-deriv[1]*(bet2-B2))*t; double deltaDelta=(deriv[0]*(bet2-B2)-deriv[2]*(rbet-absSqrtB1))*t; // New estimates of gamma and delta gamma-=deltaGamma; if (B1 equals 0.0 || gamma<0.0) { gamma=0.0; } delta-=deltaDelta; deltaGamma=fabs(deltaGamma); deltaDelta=fabs(deltaDelta); more=(deltaGamma>tTol || deltaDelta>tTol); // error if iterates increase errorSet=(deltaGamma>oldDeltaGamma || deltaDelta>oldDeltaDelta); oldDeltaGamma=deltaGamma; oldDeltaDelta=deltaDelta; } } until(! more || errorSet || count++>iterLimit); if (! errorSet && ! more) { parms.delta=delta; parms.lambda=sd/sqrt(h2); if (negativeB1) { gamma=-gamma; moments[0]=1.0-moments[0]; } parms.gamma=gamma; parms.xi=mean-parms.lambda*moments[0]; parms.type=SB; goto theExit; } howExit=false; theExit: return howExit; } #ifdef NOTUSED // Surprisingly the third and fourth moments are not as accurate as by simple summation // of powers // Finds first four moments // Uses updating. See Welford, B.P. (1962) Note on a method for calculating corrected // sums of squares and products. Technometrics 4-3. 419-420 DISTS_API momentsR( double *data, int *Np, double *meanp, double *variancep, // n ! (n-1) divisor used double *thirdp, double *fourthp ) { int N=*Np; int i; int n=1; double mean=data[0]; double variance=0; double third=0; double fourth=0; double delta; double scale; for (i=1;i1.0) { solution=SB; tb*=0.5; double b=tb+sqrt(tb*tb-1.0); delta=zn/(2.0*log(b)); b*=b; if (t>b || t<1.0/b) { Rf_error("\nBounded solution intermediate values out of range"); } double a=(t-b)/(1-t*b); gamma=-delta*log(a); } // Unbounded solution else { solution=SU; tu*=0.5; double b=tu+sqrt(tu*tu-1.0); delta=zn/(2.0*log(b)); b*=b; if (t>b || t<1.0/b) { Rf_error("\nUnbounded solution intermediate values out of range"); } double a=(1-t*b)/(t-b); gamma=-0.5*delta*log(a); } // Find xi and lambda by least squares array[0][1]=zn; array[0][2]=xn; array[1][1]=zn/2.0; array[1][2]=xm; array[2][1]=0.0; array[2][2]=x0; array[3][1]=-zn/2.0; array[3][2]=xk; array[4][1]=-zn; array[4][2]=xp; for (int i=0;i<5;i++) { array[i][0]=1.0; double u=array[i][1]; if (solution != SN) { if (solution equals SL) { u=exp(u/delta); } else { u=exp((u-gamma)/delta); if (solution equals SB) { u=u/(1.0+u); } else { u=(u*u-1.0)/(2.0*u); } } } array[i][1]=u; Rotate3(array[i],matrix); } lambda=matrix[1][2]; xi=matrix[0][2]-lambda*matrix[0][1]; JohnsonParms output; output.gamma=gamma; output.delta=delta; output.xi=xi; output.lambda=lambda; output.type=solution; return output; } /* Johnson lower probability */ DISTS_API void pJohnsonR( double *xp, double *gammap, double *deltap, double *xip, double *lambdap, int *typep, int *Np, double *valuep ) { int N=*Np; int i; JohnsonParms parms; for (i=0;i=1.0) { Rf_error("\nSb values out of range."); return 0.0; } u/=(1-u); u=log(u); break; default: Rf_error("\nNo type"); break; } double z=parms.gamma+parms.delta*u; return pnorm(z,0,1,true,false); } /* Johnson upper probability */ DISTS_API void uJohnsonR( double *xp, double *gammap, double *deltap, double *xip, double *lambdap, int *typep, int *Np, double *valuep ) { int N=*Np; int i; JohnsonParms parms; for (i=0;ifmode) { fmode=fvalue; mode=X; } X+=StepTheKey; } return mode; } DISTS_API void sJohnsonR( double *gammap, double *deltap, double *xip, double *lambdap, int *typep, int *Np, double *meanp, double *medianp, double *modep, double *variancep, double *thirdp, double *fourthp ) { int N=*Np; int i; JohnsonParms parms; for (i=0;i=0)?-thirdMoment:thirdMoment; fourthMoment=0.125*(w-1.0)*(w-1.0)*(w*w*(((w+2.0)*w+3.0)*w*w-3.0)*cosh(4.0*gd)+ 4.0*w*w*(w+2.0)*cosh(2.0*gd)+3.0*(2.0*w+1.0)); fourthMoment*=lambda*lambda*lambda*lambda; break; case SB: lowX=xjohnson(0.001,parms); highX=xjohnson(0.999,parms); mode=FindDistributionMode(lowX,highX,AJFunction); mean=FindDistributionStatistic(lowX,highX,MeanJFcn); gmean=mean; variance=FindDistributionStatistic(lowX,highX,VarianceJFcn); thirdMoment=FindDistributionStatistic(lowX,highX,ThirdMomentJFcn); fourthMoment=FindDistributionStatistic(lowX,highX,FourthMomentJFcn); median=xjohnson(0.5,parms); break; } *meanp=mean; *medianp=median; *modep=mode; *variancep=variance; *thirdp=thirdMoment; *fourthp=fourthMoment; } /******************************************************************************* Density function of the correlation coefficient From eq 6.5, p223 of Johnson and Kotz, Continuous Univariate Distributions, vol 2, 1st edition. Uses Gaussian hypergeometric function, defined on page 17 (1.104) of Johnson, Kotz, and Kemp, Univariate Discrete Distributions, 2nd Ed. The derivitive is given on page 18. */ DISTS_API void dcorrR( double *pp, double *rhop, int *np, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || rho<-1 || rho>1) return NA_REAL; if (fabs(r)>=1.0) { return 0.0; } double scale=(n-2.0)/(SQRT2*(n-1.0)); double logFactor=0.5*(n-1.0)*log(1.0-rho*rho)+0.5*(n-4.0)*log(1.0-r*r); logFactor+=(1.5-n)*log(1.0-rho*r)+loggamma(n)-loggamma(n-0.5)-LNGAMMAHALF; // Evaluate the hypergometric function F[1/2,1/2;N-1/2,(1+rho*r)/2] by suming // the series double c=n-0.5; double x=0.5*(1.0+rho*r); double sum=0.0; double term=1.0; double value; int j=1; double dj; repeat dj=(double)j; sum+=term; value=(double)(2*j-1); term*=(0.25*(value*value)/(c+dj-1.0))*(x/dj); j++; until(sum+term equals sum || j>MAXITERATES); return scale*exp(logFactor)*sum; } /* Distribution function of the correlation coefficient */ DISTS_API void pcorrR( double *rp, double *rhop, int *np, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || rho<-1 || rho>1) return NA_REAL; P=Integral(-1.0,r,fcorrelationP,3e-8); if (P<-0.0001 || P>1.0001) return NA_REAL; if (P<0) P=0; if (P>1) P=1; return P; } DISTS_API void ucorrR( double *rp, double *rhop, int *np, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || rho<-1 || rho>1) return NA_REAL; return 1.0-pcorrelation(r,rho,N); } DISTS_API void qcorrR( double *pp, double *rhop, int *np, int *Np, double *valuep ) { int N=*Np; int i; for (i=0;i1 || rho<-1 || rho>1) return NA_REAL; // assume arctanh(R) is normal with expectation 0.5*log((1+rho)/(1-rho)) // and variance 1/(N-3) -- See Johnson and Kotz Vol2, first Ed, 229 double z=0.5*log((1.0+rho)/(1.0-rho))+qnorm(p,0,1,true,false)/sqrt((double)(N-3)); z=exp(2.0*z); double guess=(z-1.0)/(z+1.0); return NewtonRoot(guess,false,dcorrelationP,fcorrelationP,3e-8); } /* Calculates the correlation coefficient between two n element arrays x[] and y[] Following a FORTRAN routine by Allan Miller */ static double CorrelationCoefficient( double* x, double* y, int n ) { double sxx=0.0; double syy=0.0; double sxy=0.0; double xMean=0.0; double yMean=0.0; double devX; double devY; double devXu; double di; for (int i=0;i1) { for (int i=0;i1) { meanp[i]=NA_REAL; medianp[i]=NA_REAL; modep[i]=NA_REAL; thirdp[i]=NA_REAL; fourthp[i]=NA_REAL; varp[i]=NA_REAL; } else { grhocorr=rho; gNcorr=n; m=1.0/(n+6.0); m2=m*m; rho2=rho*rho; rho4=rho2*rho2; oneMin=1.0-rho2; oneMin2=oneMin*oneMin; oneMin3=oneMin2*oneMin; oneMin4=oneMin2*oneMin2; meanp[i]=rho-0.5*m*rho*oneMin*(1.0+2.25*m*(3.0+rho2)+ 0.375*m2*(121.0+70.0*rho2+25.0*rho4)); medianp[i]=xcorrelation(0.5,rho,n); modep[i]=FindDistributionMode(-1.0,1.0,fcorrelationP); thirdp[i]=-m2*rho*oneMin3*(6.0+m*(69.0+88.0*rho2)+ 0.75*m2*(797.0+1691.0*rho2+1560*rho4)); fourthp[i]=3.0*m2*oneMin4*(1.0+m*(12.0+35.0*rho2)+ 0.25*m2*(436.0+2028*rho2+3025*rho4)); varp[i]=m*oneMin2*(1.0+0.5*m*(14.0+11.0*rho2)+ 0.5*m2*(98.0+130.0*rho2+75.0*rho4)); } } } /**************************************************************************************** Hypergeometric distribution Given a total of N items, n of which are marked, select a sample of size S, and find the probability that fhypergeometric: that there are x marked items in the sample -- frequency phypergeometric: that there are x or less in the sample -- cdf. */ // Normal approximation to the hypergeometric distribution function due to Peizer // See Ling, R.F. and Pratt, J.W. (1984) The accuracy of Peizer approximations // to the hypergeometric distribution, with comparisons to some other // approximations. JASA 79-385. 49-60. double PeizerHypergeometric( int x, // Number of marked items in sample int S, // Sample size int n, // Total number of marked items int N // Total number of items ) { const double oneSix=1.0/6.0; double dn=(double)n; double dm=(double)(N-n); double dr=(double)S; double ds=(double)(N-S); double dN=(double)N; double dnp=dn+oneSix; double dmp=dm+oneSix; double drp=dr+oneSix; double dsp=ds+oneSix; double dNp=dN-oneSix; double A=(double)x+0.5; double B=maxm(dn-A,0.5); // prevents B or C from going neg when x=n or x=S double C=maxm(dr-A,0.5); double D=(dm-dr)+A; double Ap=A+oneSix+0.02/(A+0.5)+0.01/(dn+1.0)+0.01/(dr+1.0); double Bp=B-oneSix+0.02/(B+0.5)+0.01/(dn+1.0)+0.01/(ds+1.0); double Cp=C-oneSix+0.02/(C+0.5)+0.01/(dm+1.0)+0.01/(dr+1.0); double Dp=D+oneSix+0.02/(D+0.5)+0.01/(dm+1.0)+0.01/(ds+1.0); double L=A*log((A*dN)/(dn*dr))+B*log((B*dN)/(dn*ds))+C*log((C*dN)/(dm*dr))+D*log((D*dN)/(dm*ds)); double z=((Ap*Dp-Bp*Cp)/fabs(A*D-B*C))*sqrt(2.0*L*((dm*dn*dr*ds*dNp)/(dmp*dnp*drp*dsp*dN))); return pnorm(z,0,1,true,false); } char *hyperNames[]= { (char *)"classic", (char *)"IAi", (char *)"IAii", (char *)"IB", (char *)"IIA", (char *)"IIB", (char *)"IIIA", (char *)"IIIB", (char *)"IV", (char *)"no type" }; // Returns true if the double is an int bool isint( double x ) { return x equals floor(x); } // Finds the type of hypergeometric hyperType typeHyper( double a, // Sample size double m, // Total number of marked items double N // Total number of items ) { hyperType variety; if (0.0minm(a,n)) return NA_REAL; // interchange n and a to get the fewest terms to sum if (an-x) { x=n-x-1; a=N-a; xmin=maxm(0,n+a-N); lowerTail=false; } int na_N=n+a-N; double logP=loggamma((double)(a+1))+loggamma((double)(N-a+1))+loggamma((double)(n+1))+ loggamma((double)(N-n+1))-loggamma((double)(N+1))-loggamma((double)(a-xmin+1))- loggamma((double)(n-xmin+1))-loggamma(xmin-na_N+1); if (xmin!=0) { logP-=loggamma((double)(xmin+1)); } // Use normal approximation if can't do it if (! R_FINITE(logP)){ double p=PeizerHypergeometric(x,a,n,N); return lowerTail?p:1.0-p; } double term=1.0; double sum=1.0; // These are the terms of F[-a,-n;N-n-a+1;a], where F is the Gaussian // hypergeometric function -- i.e. coefficients of x^i in the expansion. for (int k=xmin;kp || p>1.) Rf_error("\nProbability must be in the 0 to 1 range"); bool larger=(p<=phypergeometric(x,a,n,N)); while (larger) { if (x equals minX) { return x; } larger=(p<=phypergeometric(--x,a,n,N)); if (! larger) { return ++x; } } while (! larger){ larger=(p<=phypergeometric(++x,a,n,N)); if (larger) { return x; } } return 0; } DISTS_API void rghyperR( double *ap, double *np, double *Np, int *Mp, int *Kp, double *valuep ) { hyperType variety; int M=*Mp; int K=*Kp; int D; int j; int k; int loc; int cloc; double *tArray; if (K==1) { variety=typeHyper(*ap,*np,*Np); if (variety==classic) rhypergeometric(valuep,M,(int)*ap,(int)*np,(int)*Np); else if (variety!=noType) rgenhypergeometric(valuep,M,*ap,*np,*Np,variety); else Rf_error("\nParameters are for no recognized type"); } else { // Allow for random values for each element of nu and lambda D=(M/K)+((M%K)?1:0); tArray=(double *)S_alloc((long)D,sizeof(double)); loc=0; for (j=0;j0 always logP=loggamma(a+1.0)+loggamma(b+1.0)+loggamma(n+1.0)+loggamma(N-n+1.0); logP-=loggamma(x+1.0)+loggamma(a-x+1.0)+loggamma(n-x+1.0)+loggamma(b-n+x+1.0)+loggamma(N+1.0); break; case IV: b=N-a; logP=loggamma(-a+x)+loggamma(b+1.0)+loggamma(-n+x)+loggamma(N-n+1.0); logP-=loggamma(x+1.0)+loggamma(-a)+loggamma(b-n+x+1.0)+loggamma(-n)+loggamma(N+1.0); break; default: break; } if (variety equals IIB) { return P; } else { if (logP<-MAXEXP) { return 0.0; } else { return exp(logP); } } } // returns smallest x such that p<=Pr(X<=x|a,n,N) int xgenhypergeometric( double p, // cumulative probability double a, double m, double N, hyperType variety ) { double b=N-a; double n=m; double m1=(n*a)/N; double m2=(m1*(b*(a+b-n)))/(N*(N-1.0)); if (0>p || p>1) Rf_error("\nProbability must be in the 0 to 1 range"); int x=(int)(0.5+m1+sqrt(m2)*qnorm(p,0,1,true,false)); x=maxm(0,x); bool larger=(p<=pgenhypergeometric(x,a,m,N,variety)); while (larger) { if (x equals 0) { return x; } larger=(p<=pgenhypergeometric(--x,a,m,N,variety)); if (! larger) { return ++x; } } while (! larger){ larger=(p<=pgenhypergeometric(++x,a,m,N,variety)); if (larger) { return x; } } return 0; } /* Random samples from beta negative binomial */ void rgenhypergeometric( double* randArray, int K, double a, double n, double N, hyperType variety ) { GetRNGstate(); for (int i=0;i1) { n*=2; // Number of new evaluations } twoPower*=2.0; double sum=0.0; double z=highX-delta; // Start with this value int m=n; while (m--) { double value=(*function)(z); sum+=value; z-=2.0*delta; // Every other ordinate is a new one } A[0][k]=A[0][k-1]/2.0 + h*sum/twoPower; // Pool old and new ordinate sum // Fill out the Romberg triangle double fourPower=1.0; for (int i=1;i<=k;i++) { fourPower*=4.0; A[i][k-i]=(fourPower*A[i-1][k-i+1]-A[i-1][k-i])/(fourPower-1.0); } // Check for convergence value=A[k][0]; if (fabs((value - A[k-1][0])/value)=maxiterate-1); return value; } /* Root of f(root)=0 by Newton iteration When inverting a distribution, one wants to minimize (p(x)-p)^2, so the Newton step is h=(p(x)-p)^2/[2(p(x)-p)p'(x)] = (p(x)-p)/[2p'(x)] Don't use to find the max or min of a function -- the derivative may go to zero */ double NewtonRoot( double guess, bool useLog, // When true, will iterate on z=log(x), keeping x positive double (*function)(double x), double (*derivative)(double x), double TOLN ) { /* const double TOLN=3e-8;*/ const int MAXITERN=100; double x=guess; double z=(useLog)?log(x):x; bool more; double h; double ho=DBL_MAX; double scale=1.0; int m=0; repeat double fcn=(*function)(x); double deriv=(*derivative)(x); if (useLog) { h=scale*0.5*fcn/(x*deriv+DBL_EPSILON*fabs(fcn)); // no small divisors allowed } // This is likely of no use else { h=scale*0.5*fcn/(deriv+DBL_EPSILON*fabs(fcn)); } if (! R_FINITE(h)) { Rf_error("\nInfinite value in NewtonRoot()"); return x; } z-=h; more=(fabs(h/z)>TOLN); // Iterates increasing if (ho<=fabs(h)) { scale/=2.0; z+=h; // Restore value more=true; continue; // retry } scale=(scale<1.0)?scale*2.0:scale; ho=fabs(h); x=(useLog)?exp(z):z; until(m++>MAXITERN || ! more); if (m>MAXITERN) { Rf_error("\nIteration limit exceeded in NewtonRoot()"); } return x; } /* The Gaussian hypergeometric function, usually denoted as F[a,b;c;x] */ double GaussianHypergometricFcn( double a, double b, double c, double x ) { int const MAXITERATES=100; if (c<0.0 && floor(c) equals c) return NA_REAL; double sum=0.0; double term=1.0; int j=1; double dj; double djm1; repeat dj=(double)j; djm1=dj-1.0; sum+=term; term*=((a+djm1)*(b+djm1))/(c+djm1)*(x/dj); j++; until(sum+term equals sum || j>MAXITERATES); return sum; } // The following was moved to here so that ziggurat can use it // Marsaglia's multiply with cary /* static const double RANDCONST=2.32830643654e-10; ULONG zSeed=362436069, wSeed=521288629; #define zNew ((zSeed=36969*(zSeed&65535)+(zSeed>>16))<<16) #define wNew ((wSeed=18000*(wSeed&65535)+(wSeed>>16))&65535) #define IUNIFORM (zNew+wNew) #define UNIFORM ((zNew+wNew)*RANDCONST) #define setseed(A,B) zSeed=A;wSeed=B; #define getseed(A,B) A=zSeed;B=wSeed; */ /* The ziggurat method for RNOR and REXP Modified very slightly to remove some of the awkwardness of the original C code. In partcular, float has been replaced by double, some implicit coercions made explicit, and the initialization of jsr moved into zigset to guarantee same sequence from same seed. REW Mar 01 REW (Mar 2001) cleaned up the code. Made RNOR and REXP inline instead of defines, etc. Combine the code below with the main program in which you want normal or exponential variates. Then use of RNOR in any expression will provide a standard normal variate with mean zero, variance 1, while use of REXP in any expression will provide an exponential variate with density exp(-x),x>0. Before using RNOR or REXP in your main, insert a command such as zigset(86947731); with your own choice of seed value>0, rather than 86947731. (If you do not invoke zigset(...) you will get all zeros for RNOR and REXP.) For details of the method, see Marsaglia and Tsang, "The ziggurat method for generating random variables", Journ. Statistical Software. */ /* double nfix(void); double efix(void); static bool ziggInitialized=false; // Makes sure zigg is initialized at least once static ULONG jz, jsr; // moved initialization static ULONG jcong; #define SHR3 (jz=jsr, jsr^=(jsr<<13), jsr^=(jsr>>17), jsr^=(jsr<<5),jz+jsr) #define CONG (jcong=69069*jcong+1234567) #define KISS ((IUNIFORM^CONG)+SHR3) */ /*Switched to KISS -- see Leong, et.al. (2005) A comment on the implementtion of the Ziggurat Method Journal of statistical software 12-7, 1-4*/ /*#define UNI (.5 + (signed)(SHR3) * .2328306e-9) #define IUNI SHR3*/ /* #define UNI (.5 + (signed)(KISS) * .2328306e-9) #define IUNI KISS static long hz; static int iz; // was ULONG static long kn[128]; // was ULONG static ULONG ke[256]; static double wn[128], fn[128], we[256], fe[256]; inline double RNOR(void) { double xx; hz=SHR3; iz=hz&127; xx=(abs(hz)0)? r+x : -r-x; } // iz>0, handle the wedges of other strips if( fn[iz]+UNI*(fn[iz-1]-fn[iz]) < exp(-.5*x*x) ) return x; // start all over hz=SHR3; iz=hz&127; if(abs((signed)hz)<(signed)kn[iz]) return (hz*wn[iz]); forever } */ // efix() generates variates from the residue when rejection in REXP occurs. /* double efix(void) { double x; repeat if(iz==0) return (7.69711-log(UNI)); // iz==0 x=jz*we[iz]; if( fe[iz]+UNI*(fe[iz-1]-fe[iz]) < exp(-x) ) return (x); // Start all over again jz=SHR3; iz=(jz&255); if(jz=1;i--) { dn=sqrt(-2.*log(vn/dn+exp(-.5*dn*dn))); kn[i+1]=(ULONG)((dn/tn)*m1); tn=dn; fn[i]=exp(-.5*dn*dn); wn[i]=dn/m1; } // Set up tables for REXP q = ve/exp(-de); ke[0]=(ULONG)((de/q) * m2); ke[1]=0; we[0]=q/m2; we[255]=de/m2; fe[0]=1.0; fe[255]=exp(-de); for(i=254;i>=1;i--) { de=-log(ve/de+exp(-de)); ke[i+1]= (ULONG)((de/te)*m2); te=de; fe[i]=exp(-de); we[i]=de/m2; } } */ /* The following was moved above ziggurat // Marsaglia's multiply with cary static const double RANDCONST=2.32830643654e-10; ULONG zSeed=362436069, wSeed=521288629; #define zNew ((zSeed=36969*(zSeed&65535)+(zSeed>>16))<<16) #define wNew ((wSeed=18000*(wSeed&65535)+(wSeed>>16))&65535) #define IUNIFORM (zNew+wNew) #define UNIFORM ((zNew+wNew)*RANDCONST) #define setseed(A,B) zSeed=A;wSeed=B; #define getseed(A,B) A=zSeed;B=wSeed; */ /* static int nSeed=1020; static ULONG Q[1020]; // using Q[endQ] to hold variable. static int endQ=nSeed-1; static bool QInitialized=FALSE; // Makes sure Q is initialized at least once //static bool QInitialized=false; // Makes sure Q is initialized at least once #ifdef CANTUSE // At present time, R allows only a 625 seed array static double uval; DISTS_API int *user_unif_nseed(void) { return &nSeed; } DISTS_API int *user_unif_seedloc(void) { return (int *)Q; } // R looks for this even when it doesn't use it DISTS_API double *user_unif_rand(void) { GetRNGstate(); setseed(Q[0],Q[1]); uval=UNIFORM; getseed(Q[0],Q[1]); PutRNGstate(); return (double *)&uval; } void user_unif_init() {} #endif void QInit( ULONG seed ) { int i; ULONG mask = 0xFFFF; setseed(seed&mask,seed>>16); Q[endQ]=362436; for (i=0;i>32); if(i>0) return(Q[i--] = t); i = endQ-1; return(Q[0] = t); } DISTS_API void MWC1019R ( double *randomVector, int *Np, bool *initializep, ULONG *seedp ) { int N=*Np; int i; ULONG seed=*seedp; QInitialized=TRUE; // added by Thorsten Pohlert 2020-01-06 if (*initializep) { QInit(seed); QInitialized=TRUE; } else if (QInitialized==FALSE) { // To insure initialization QInit((ULONG)556677); QInitialized=TRUE; } for (i=0;i 2000, in which case the order statistics are still calculated, but may be inaccurate. = 3 if n2 > n/2 (n.b. this differs from the published algorithm which returns an error if n2 is not equal to n/2.) Calls qnorm() [from R] which is an improvement of ppnd = applied statistics algorithm 111. An alternative is ppnd7 in algorithm AS 241. */ /* Initialized data */ const double eps[4] = { .419885,.450536, .456936, .468488 }, dl1[4] = { .112063,.12177, .239299, .215159 }, dl2[4] = { .080122,.111348,-.211867,-.115049 }, gam[4] = { .474798,.469051, .208597, .259784 }, lam[4] = { .282765,.304856,.407708,.414093 }; const double bb = -.283833; const double d = -.106136; const double b1 = .5641896; /* Local variables */ int i, k; double e1, e2, ai, an; /* input parameter checks. */ if (*n2 > *n / 2) { Rf_error("\nn2>n"); } if (*n <= 1) { Rf_error("\nn<=1"); } if (*n > 2000) { Rf_warning("\nValues may be inaccurate because of the size of N"); } s[0] = b1; if (*n == 2) { return; } /* calculate normal tail areas for first 3 order statistics. */ an = (double) (*n); k = 3; if (*n2 < k) k = *n2; /* k := min(3, *n2) */ for (i = 0; i < k; ++i) { ai = (double) i+1; e1 = (ai - eps[i]) / (an + gam[i]); e2 = pow((double) e1, (double) lam[i]); s[i] = e1 + e2 * (dl1[i] + e2 * dl2[i]) / an - correc(i+1, *n); } if (*n2 > k) { /* calculate normal areas for other cases. */ for (i = 4-1; i < *n2; ++i) { ai = (double) i+1; e1 = (ai - eps[3]) / (an + gam[3]); e2 = pow((double) e1, (double) lam[3] + bb / (ai + d)); s[i] = e1 + e2 * (dl1[3] + e2 * dl2[3]) / an - correc(i+1, *n); } } /* convert tail areas to normal deviates. */ for (i = 0; i < *n2; ++i) s[i] = - qnorm(s[i], 0., 1., 1, 0); return; } /* nscor2 */ static double correc(int i, int n) { /* calculates correction for tail area of the i-th largest of n order statistics. */ const double c1[7] = { 9.5,28.7,1.9,0.,-7.,-6.2,-1.6 }, c2[7] = { -6195.,-9569.,-6728.,-17614.,-8278.,-3570., 1075. }, c3[7] = { 93380.,175160.,410400.,2157600.,2.376e6, 2.065e6,2.065e6 }; const double mic = 1e-6; const double c14 = 1.9e-5; double an; if (i * n == 4) return c14; if (i < 1 || i > 7) return 0; if (i != 4 && n > 20) return 0; if (i == 4 && n > 40) return 0; /* else : */ an = (double) n; an = 1. / (an * an); i--; return((c1[i] + an * (c2[i] + an * c3[i])) * mic); } /* correc */ SuppDists/src/dists.h0000644000176200001440000002657213610145750014314 0ustar liggesusers#include "wheeler.h" #define DISTS_API extern "C" enum hyperType { classic, IAi, IAii, IB, IIA, IIB, IIIA, IIIB, IV, noType }; /* Prototypes for dist functions */ // Functions marked with EX may throw exceptions // ziggR and MWC1019R should be defunct //DISTS_API void ziggR(double *randomVector,int *Np,bool *type,bool *initilizep,ULONG *seedp); //DISTS_API void MWC1019R (double *randomVector,int *Np,bool *initializep,ULONG *seedp); #ifdef CANTUSE DISTS_API void user_unif_init(ULONG seed); DISTS_API int *user_unif_nseed(void); DISTS_API int *user_unif_seedloc(void); DISTS_API double *user_unif_rand(void); #endif double gammal(double); double FindDistributionStatistic(double lowX,double highX,double (*function)(double x)); double FindDistributionMode(double lowX,double highX,double (*function)(double x)); void nscor2(double *s, int *n, int *n2); DISTS_API void normOrdR(double *sp,int *np,int *n2p); // normal void rgauss(double* normArray,int n,double mean, double sd); // Inverse Gaussian -- Wald double finvGauss(double x,double mu,double lambda); double pinvGauss(double x,double mu,double lambda); double qinvGauss(double x,double mu,double lambda); double xinvGauss(double p,double mu,double lambda); void rinvGauss(double* normArray,int n,double mu,double lambda); DISTS_API void dinvGaussR(double *xp,double *nup,double *lambdap,int *Np,double *valuep); DISTS_API void pinvGaussR(double *xp,double *nup,double *lambdap,int *Np,double *valuep); DISTS_API void uinvGaussR(double *xp,double *nup,double *lambdap,int *Np,double *valuep); DISTS_API void qinvGaussR(double *xp,double *nup,double *lambdap,int *Np,double *valuep); DISTS_API void rinvGaussR(double *nup,double *lambdap,int *Np,int *Mp,double *valuep); // Kruskal Wallace double pKruskal_Wallis(double H,int c,int n,double U,bool doNormalScore); //EX double qKruskal_Wallis(double H,int c,int n,double U,bool doNormalScore); //EX double xKruskal_Wallis(double P,int c,int n,double U,bool doNormalScore); //EX double varKruskal_Wallis(double N,double C,double U); double varNormalScores(double N,double C,double U); void rKruskal_Wallis(double* randArray,int N,int c,int n,double U, bool doNormalScore); //EX double fKruskal_Wallis(double H,int c,int n,double U,bool doNormalScore); //EX void sKruskal_Wallis(int c,int n,double U,bool doNormalScore,double *mode, double *third,double *fourth); // EX DISTS_API void pKruskalWallisR(double *Hp,int *cp,int *np,double *Up,int *doNormalScorep,int *Np,double *valuep); DISTS_API void uKruskalWallisR(double *Hp,int *cp,int *np,double *Up,int *doNormalScorep,int *Np,double *valuep); DISTS_API void qKruskalWallisR(double *Hp,int *cp,int *np,double *Up,int *doNormalScorep,int *Np,double *valuep); DISTS_API void dKruskalWallisR(double *Hp,int *cp,int *np,double *Up,int *doNormalScorep,int *Np,double *valuep); DISTS_API void rKruskalWallisR(double *randArrayp,int *Np,int *Mp,int *cp,int *np,double *Up,bool *doNormalScorep); DISTS_API void sKruskalWallisR(int *cp,int *np,double *Up,int *doNormalScorep,int *Np,double *varp,double *modep,double *thirdp,double *fourthp); // Runs test double pruns(int mi,int ni,int r); double qruns(int m,int n,int r); int xruns(double pr,int m,int n); // Kendall's Tau const int MAXKENDALEXACT=12; double pkendall(int ni,double tau); // EX double qkendall(int n,double tau); // EX double xkendall(double pr,int ni); // EX void rkendall(double* randArray,int N,int ni); // EX double fkendall(int ni,double tau); // EX double fourthkendall(int ni); // EX DISTS_API void pKendallR(int *nip,double *taup,int *Np,double *valuep); DISTS_API void dKendallR(int *nip,double *taup,int *Np,double *valuep); DISTS_API void qKendallR(int *pp,double *taup,int *Np,double *valuep); DISTS_API void uKendallR(int *nip,double *taup,int *Np,double *valuep); DISTS_API void rKendallR(int *nip,int *Np,int *Mp,double *valuep); DISTS_API void fourthKendallR(int *nip,int *Np,double *valuep); // Friedman This is here, because FriedmanGlobal needs it struct FriedmanStrc { int* S; int nS; double *qdist; }; struct FriedmanGlobal { int r; int n; FriedmanStrc *theDist; }; bool DoExactFriedman(int r,int n,bool doRho); void ClearFriedmanGlobal(bool deleteAll); double pfrie(double X,int r,int n,bool doRho); //EX double qfrie(double X,int r,int n,bool doRho); //EX double xfrie(double P,int r,int n,bool doRho); //EX double medianfrie(int r,int n); //EX double modefrie(int r,int n); // EX void rfrie(double* randArray,int N,int r,int n,bool doRho); // EX double ffrie(double X,int r,int n,bool doRho); // EX DISTS_API void pFriedmanR(double *Xp,int *rp,int *np,int *Np,bool *doRhop,double *valuep); DISTS_API void uFriedmanR(double *Xp,int *rp,int *np,int *Np,bool *doRhop,double *valuep); DISTS_API void dFriedmanR(double *Xp,int *rp,int *np,int *Np,bool *doRhop,double *valuep); DISTS_API void qFriedmanR(double *pp,int *rp,int *np,int *Np,bool *doRhop,double *valuep); DISTS_API void rFriedmanR(int *rp,int *np,bool *doRhop,int *Np,int *Mp,double *valuep); DISTS_API void sFriedmanR(int *rp,int *np,bool *rhop,int *Np,double *meanp,double *medianp,double *modep,double *variancep, double *thirdp,double *fourthp); // Maximum F ratios double pmaxfratio(double F,int df,int N); double qmaxfratio(double F,int df,int N); double xmaxfratio(double p,int df,int N); double fmaxfratio(double F,int df,int N); void smaxFratio(int df,int N,double *mean,double *median,double *mode,double *variance,double *third,double *fourth); DISTS_API void pmaxFratioR(double *Fp,int *dfp,int *np,int *Np,double *valuep); DISTS_API void umaxFratioR(double *Fp,int *dfp,int *np,int *Np,double *valuep); DISTS_API void dmaxFratioR(double *Fp,int *dfp,int *np,int *Np,double *valuep); DISTS_API void qmaxFratioR(double *Fp,int *dfp,int *np,int *Np,double *valuep); DISTS_API void rmaxFratioR(int *dfp,int *np,int *Np,int *Mp,double *valuep); DISTS_API void smaxFratioR(int *dfp,int *np,int *Np,double *mean,double *median,double *mode,double *variance,double *third,double *fourth); // Johnson curves struct JohnsonInput { double xn; // distribution value corresponding to zn double xm; // distribution value corresponding to zn/2 double x0; // distribution value corresponding to 0 double xk; // distribution value corresponding to -zn/2 double xp; // distribution value corresponding to -zn }; enum JohnsonType { SN, SL, SU, SB }; struct JohnsonParms { double gamma; double delta; double xi; double lambda; JohnsonType type; }; struct JohnsonMoments { double mean; double sd; double sqrtB1; double B2; }; JohnsonParms JohnsonFit(JohnsonInput input); JohnsonParms JohnsonMomentFit(JohnsonMoments moments); double pjohnson(double x,JohnsonParms parms); double qjohnson(double x,JohnsonParms parms); double xjohnson(double p,JohnsonParms parms); double xzjohnson(double p,JohnsonParms parms); double fjohnson(double x,JohnsonParms parms); double fpjohnson(double x,JohnsonParms parms); void rjohnson(double* johnsonArray,int n,JohnsonParms parms); void sJohnson(JohnsonParms parms,double *meanp,double *medianp,double *modep, double*variancep,double *thirdp,double *fourthp); DISTS_API void JohnsonFitR(double *xnp,double *xmp,double *x0p,double *xkp,double *xpp, double *gammap,double *deltap,double *xip,double *lambdap,int *typep); DISTS_API void JohnsonMomentFitR(double *meanp,double *sdp,double *sqrtB1p,double *B2p, double *gammap,double *deltap,double *xip,double *lambdap,int *typep); DISTS_API void pJohnsonR(double *xp,double *gammap,double *deltap,double *xip, double *lambdap,int *typep,int *Np,double *valuep); DISTS_API void uJohnsonR(double *xp,double *gammap,double *deltap,double *xip, double *lambdap,int *typep,int *Np,double *valuep); DISTS_API void dJohnsonR(double *xp,double *gammap,double *deltap,double *xip, double *lambdap,int *typep,int *Np,double *valuep); DISTS_API void qJohnsonR(double *pp,double *gammap,double *deltap,double *xip, double *lambdap,int *typep,int *Np,double *valuep); DISTS_API void rJohnsonR(double *gammap,double *deltap,double *xip, double *lambdap,int *typep,int *Np,int *Mp,double *valuep); DISTS_API void sJohnsonR(double *gammap,double *deltap,double *xip,double *lambdap, int *typep,int *Np,double *meanp,double *medianp,double *modep,double *variancep, double *thirdp,double *fourthp); //DISTS_API momentsR(double *data,int *Np,double *meanp,double *variancep, // double *thirdp,double *fourthp); // Correlation coefficient double fpcorrelation(double r,double rho,int N); double fcorrelation(double r,double rho,int N); double pcorrelation(double r,double rho,int N); double qcorrelation(double r,double rho,int N); double tcorrelation(double r,double rho,int N); double xcorrelation(double r,double rho,int N); void rcorrelation(double *randArray,long n,double rho,int N); DISTS_API void pcorrR(double *rp,double *rhop,int *np,int *Np,double *valuep); DISTS_API void ucorrR(double *rp,double *rhop,int *np,int *Np,double *valuep); DISTS_API void qcorrR(double *rp,double *rhop,int *np,int *Np,double *valuep); DISTS_API void dcorrR(double *rp,double *rhop,int *np,int *Np,double *valuep); DISTS_API void rcorrR(double *rhop,int *np,int *Np,int *Mp, double *valuep); DISTS_API void scorrR(double *rhop,int *np,int *Np,double *meanp,double *medianp,double *modep,double *varp,double *thirdp,double *fourthp); // Hypergeometric double qhypergeometric(int x,int a,int n,int N); double phypergeometric(int x,int a,int n,int N); double fhypergeometric(int x,int a,int n,int N); int xhypergeometric(double p,int a,int n,int N); void rhypergeometric(double* randArray,int n,int a,int m,int N); double qgenhypergeometric(int x,double a,double m,double N,hyperType variety); double pgenhypergeometric(int x,double a,double m,double N,hyperType variety); double fgenhypergeometric(int x,double a,double m,double N,hyperType variety); int xgenhypergeometric(double p,double a,double m,double N,hyperType variety); void rgenhypergeometric(double* randArray,int K,double a,double m,double N,hyperType variety); void sghyper(double a,double m,double N,double *mean,double *median,double *mode,double *variance,double *third,double *fourth,hyperType variety); DISTS_API void tghyperR(double *ap,double *mp,double *Np,char **aString); DISTS_API void pghyperR(int *kp,double *ap,double *np,double *Np,int *Mp,double *valuep); DISTS_API void ughyperR(int *kp,double *ap,double *np,double *Np,int *Mp,double *valuep); DISTS_API void qghyperR(double *pp,double *ap,double *np,double *Np,int *Mp,double *valuep); DISTS_API void dghyperR(int *kp,double *ap,double *np,double *Np,int *Mp,double *valuep); DISTS_API void rghyperR(double *ap,double *np,double *Np,int *Mp,int *Kp,double *valuep); DISTS_API void sghyperR(double *ap,double *mp,double *Np,int *Mp,double *meanp,double *medianp,double *modep,double *variancep,double *thirdp,double *fourthp); // Helper functions double Integral(double lowX,double highX,double (*function)(double x)); double NewtonRoot(double guess,bool useLog,double (*function)(double x),double (*derivative)(double x)); double GaussianHypergometricFcn(double a,double b,double c,double x); double Integral(double lowX,double highX,double (*function)(double x),double Tol); double NewtonRoot(double guess,bool useLog,double (*function)(double x),double (*derivative)(double x),double TOLN); double GaussianHypergometricFcn(double a,double b,double c,double x); SuppDists/NAMESPACE0000644000176200001440000000256213610145750013436 0ustar liggesusersuseDynLib('SuppDists', .registration = TRUE) #exportPattern("^[^\\.]") ## this neeps to be fixep ## explicitly export functions export("tghyper") export("dFriedman") export("dghyper") export("dinvGauss") export("dJohnson") export("dKendall") export("dKruskalWallis") export("dmaxFratio") export("dNormScore") export("dPearson") export("dSpearman") export("dJohnson") export("qFriedman") export("qghyper") export("qinvGauss") export("qJohnson") export("qKendall") export("qKruskalWallis") export("qmaxFratio") export("qNormScore") export("qPearson") export("qSpearman") export("qJohnson") export("pFriedman") export("pghyper") export("pinvGauss") export("pJohnson") export("pKendall") export("pKruskalWallis") export("pmaxFratio") export("pNormScore") export("pPearson") export("pSpearman") export("pJohnson") export("sFriedman") export("sghyper") export("sinvGauss") export("sJohnson") export("sKendall") export("sKruskalWallis") export("smaxFratio") export("sNormScore") export("sPearson") export("sSpearman") export("sJohnson") export("rFriedman") export("rghyper") export("rinvGauss") export("rJohnson") export("rKendall") export("rKruskalWallis") export("rmaxFratio") export("rNormScore") export("rPearson") export("rSpearman") export("rJohnson") export("normOrder") export("JohnsonFit") export("moments") export("rMWC1019") export("rziggurat") importFrom("stats", "quantile", "var") SuppDists/inst/0000755000176200001440000000000013610145750013167 5ustar liggesusersSuppDists/inst/NEWS.Rd0000644000176200001440000000356414665666254014264 0ustar liggesusers\name{NEWS} \title{SuppDists News} \encoding{UTF-8} \section{Changes in version 1.1-9.8 (2024-09-03)}{ \itemize{ \item PI was changed to M_PI in C++ files as requested by CRAN check for additional issues \sQuote{Strict}. \item \code{Rf_} was prepended to function call \code{error} and \code{warning} as requested by CRAN check for additional issues \sQuote{noRemap}. \item Specified C++11 was dropped and \code{dists.cpp} revised accordingly. } } \section{Changes in version 1.1-9.7 (2022-01-02)}{ \itemize{ \item The file \sQuote{Makevars} was added with flags \code{CXX_STD = CXX11}. } } \section{Changes in version 1.1-9.6 (2020-01-18)}{ \itemize{ \item Cpp code of \sQuote{MWC1019R} and \sQuote{ziggR} was disabled. } } \section{Changes in version 1.1-9.5 (2020-01-13)}{ \itemize{ \item The package that was written by Robert E. Wheeler has been orphaned since 2013. It was scheduled for archival by the CRAN team, as the package lacked of an active maintenance and \pkg{SuppDists v1.1-9.4} had three issues acording to CRAN CHECK, namely no calls to: \sQuote{R_registerRoutines}, \sQuote{R_useDynamicSymbols}, an explicit self-assignment of the value of variable of type \sQuote{double} to itself and memory leaks due to uninitialised variables that were detected by \code{valgrind}. \item Initial writing of \code{init.cpp} with calls to \code{R_registerRoutines} and \code{R_useDynamicSymbols} \item Change the \code{.C(...)} calls in R from \code{character} to symbols. \item Fix of self-assignment. \item The two RNG functions \code{rziggurat} and \code{rMWC1019} were defunct. \item Explicit exporting of R functions in NAMESPACE. \item Update of DESCRIPTION file. \item Orphant \code{email} in \code{author} sections of Rd files were removed. } } SuppDists/man/0000755000176200001440000000000013610145750012765 5ustar liggesusersSuppDists/man/SuppDists-defunct.Rd0000644000176200001440000000144313610145750016642 0ustar liggesusers\name{SuppDists-defunct} \alias{SuppDists-defunct} \title{Defunct Functions in Package \pkg{SuppDists}} \alias{rziggurat} \alias{rMWC1019} \description{ The functions listed here are no longer part of \pkg{SuppDists} as they do not work on 64bit architectures. } \usage{ # Defunct in version 1.1-9.5 rziggurat(n, normal=TRUE, new.start=FALSE, seed=556677) rMWC1019(n, new.start=FALSE, seed=556677) } \details{ Both RNG functions were developed for 32Bit architecture and do not work correctly on 64Bit machines. Furthermore, the underlying C++ code produces memory leaks as detected by \code{R CMD check --use-valgrind}. \code{rziggurat} can be substituted with \code{zrnorm} of the package \pkg{RcppZiggurat}. } \seealso{ \code{\link{Defunct}}, \code{\link[RcppZiggurat]{zrnorm}} } \keyword{internal} SuppDists/man/ghyperTypes.Rd0000644000176200001440000000576613610145750015615 0ustar liggesusers\name{ghyper.types} \alias{ghyper.types} \title{Kemp and Kemp generalized hypergeometric types} \description{ Generalized hypergeometric types as given by Kemp and Kemp } \section{Two-way table}{ The basic representation is in terms of a two-way table: \tabular{ccc}{ x \tab k-x \tab k \cr a-x \tab b-k+x \tab N-k \cr a \tab b \tab N } and the associated hypergeometric probability \eqn{P(x)=C_x^a C_{k-x}^b / C_k^N}{P(x)=choose(a, x) choose(b, k-x) / choose(N, k)}. The types are classified according to ranges of a, k, and N. } \section{Kemp and Kemp types}{ Minor modifications in the definition of three of the types have been made to avoid numerical difficulties. Note, J denotes a nonnegative integer. \tabular{ll}{ [Classic] \tab \cr \tab \eqn{0 x]}} } \value{ The output values conform to the output from other such functions in \R. \code{dJohnson()} gives the density, \code{pJohnson()} the distribution function and \code{qJohnson()} its inverse. \code{rJohnson()} generates random numbers. \code{sJohnson()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. \cr \code{moments()} calculates the moment statistics of x as a vector with elements (mu, sigma, skew, kurt), where mu is the mean of x, sigma the SD of x with divisor \code{length(x)}, skew is the skewness and kurt the kurtosis. \cr \code{JohnsonFit()} outputs a list containing the Johnson parameters (gamma, delta, xi, lambda, type), where type is one of the Johnson types: "SN", "SL", "SB", or "SU". \code{JohnsonFit()} does this using 5 order statistics when moment="quant", when moment="find" it does this by using the first four moments of t calculated by the function \code{moments()}, when moment="use" it assumes that the vector t is [mean,m2,m3,m4], where mi is the ith moment about the mean. \cr Fitting by moments is difficult numerically and often \code{JohnsonFit()} will report an error. } \details{ The Johnson system (Johnson 1949) is a very flexible system for describing statistical distributions. It is defined by \deqn{z=\gamma+\delta \log{f(u)}, u=(x-\xi)/\lambda}{z=gamma+delta log(f(u)), with u=(x-xi)/lambda} and where \eqn{f( )} has four possible forms: \tabular{ll}{ SL:\tab \eqn{f(u)=u} the log normal \cr SU:\tab \eqn{f(u)=u+\sqrt{1+u^2}}{f(u)=u+sqrt(1+u^2)} an unbounded distribution\cr SB:\tab \eqn{f(u)=u/(1-u)} a bounded distribution\cr SN:\tab \eqn{\exp(u)} the normal } Estimation of the Johnson parameters may be done from quantiles. The procedure of Wheeler (1980) is used. They may also be estimated from the moments. Applied Statistics algorithm 99, due to Hill, Hill, and Holder (1976) has been translated into C for this implementation. } \references{ Hill, I.D., Hill, R., and Holder, R.L. (1976). Fitting Johnson curves by moments. \emph{Applied Statistics.} AS99. Johnson, N.L. (1949). Systems of frequency curves generated by methods of translation. \emph{Biometrika,} \bold{36.} 149-176. Wheeler, R.E. (1980). Quantile estimators of Johnson curve parameters. \emph{Biometrika.} \bold{67-3} 725-728 } \author{ Bob Wheeler } \examples{ xx<-rnorm(500) parms<-JohnsonFit(xx) sJohnson(parms) plot(function(xx)dJohnson(xx,parms),-2,2) pJohnson(1,parms) parms2<-JohnsonFit(rexp(50)) qJohnson(p=0.5,list(parms,parms2)) ## JohnsonFit with moment="find" and moment="use" is not always possible, ## and even when possible, may produce odd results. ## parms<-JohnsonFit(x,moment="find") parms<-JohnsonFit(c(0,1,-.5,4),moment="use") sJohnson(parms) # Fit illustration data(cars) xx<-cars$speed parms<-JohnsonFit(xx) hist(xx,freq=FALSE) plot(function(x)dJohnson(x,parms),0,25,add=TRUE) } \keyword{distribution}SuppDists/man/invGauss.Rd0000644000176200001440000001240213610145750015052 0ustar liggesusers\name{invGauss} \alias{inverse Gaussian} \alias{Wald distribution} \alias{dinvGauss} \alias{pinvGauss} \alias{qinvGauss} \alias{rinvGauss} \alias{sinvGauss} \title{The inverse Gaussian and Wald distributions} \description{ Density, distribution function, quantile function, random generator and summary function for the inverse Gaussian and Wald distributions. } \usage{ dinvGauss(x, nu, lambda, log=FALSE) pinvGauss(q, nu, lambda, lower.tail=TRUE, log.p=FALSE) qinvGauss(p, nu, lambda, lower.tail=TRUE, log.p=FALSE) rinvGauss(n, nu, lambda) sinvGauss(nu, lambda) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{vector of numbers of observations} \item{nu}{vector real and non-negative parameter -- the Wald distribution results when nu=1} \item{lambda}{vector real and non-negative parameter} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \value{ The output values conform to the output from other such functions in R. \code{dinvGauss()} gives the density, \code{pinvGauss()} the distribution function and \code{qinvGauss()} its inverse. \code{rinvGauss()} generates random numbers. \code{sinvGauss()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \details{ Probability functions: \deqn{f(x,\nu,\lambda)=\sqrt{\frac{\lambda}{2\pi x^3}}\exp\left[-\lambda\frac{(x-\nu)^2}{2\nu^2 x}\right] \mbox{-- the density}}{f(x,nu,lambda)=sqrt[lambda/(2 pi x^3)]exp[-lambda(x-nu)^2/(2 x nu^2)] -- the density } \deqn{F(x,\nu,\lambda)=\Phi\left[\sqrt{\frac{\lambda}{x}}\left(\frac{x}{\nu}-1\right)\right]+e^{2\lambda/\nu}\Phi\left[\sqrt{\frac{\lambda}{x}}\left(\frac{x}{\nu}+1\right)\right] \mbox{-- the distribution function}}{F(x,nu,lambda)=Phi[sqrt(lambda/x)((x/nu)-1)]+exp(2*lambda/nu)*Phi[sqrt(lambda/x)((x/nu)+1)] -- the distribution function} where \eqn{\Phi[]}{Phi[]} is the standard normal distribution function. The calculations are accurate to at least seven significant figures over an extended range - much larger than that of any existing tables. We have tested them for \eqn{\lambda / \nu = 10e-20}{(lambda/nu)=10e-20}, and \eqn{\lambda/\nu=10e4}{lambda / nu = 10e4}. Accessible tables are those of Wassan and Roy (1969), which unfortunately, are sometimes good to only two significant digits. Much better tables are available in an expensive CRC Handbook (1989), which are accurate to at least 7 significant digits for \eqn{\lambda/\nu \ge 0.02}{lambda / nu >= 0.02} to \eqn{\lambda/\nu \le 4000}{lambda / nu <= 4000}. These are first passage time distributions of Brownian motion with positive drift. See Whitmore and Seshadri (1987) for a heuristic derivation. The Wald (1947) form represents the average sample number in sequential analysis. The distribution has a non-monotonic failure rate, and is of considerable interest in lifetime studies: Ckhhikara and Folks (1977). A general reference is Seshadri (1993). This is an extremely difficult distribution to treat numerically, and it would not have been possible without some extraordinary contributions. An elegant derivation of the distribution function is to be found in Shuster (1968). The first such derivation seems to be that of Zigangirov (1962), which because of its inaccessibility, the author has not read. The method of generating random numbers is due to Michael, Schucany, and Haas (1976). The approximation of Whitmore and Yalovsky (1978) makes it possible to find starting values for inverting the distribution. All three papers are short, elegant, and non- trivial. } \references{ Ckhhikara, R.S. and Folks, J.L. (1977) The inverse Gaussian distribution as a lifetime model. \emph{Technometrics.} \bold{19-4.} 461-468. CRC Handbook. (1989). \emph{Percentile points of the inverse Gaussian distribution.} J.A. Koziol (ed.) Boca Raton, FL. Michael, J.R., Schucany, W.R. and Haas, R.W. (1976). Generating random variates using transformations with multiple roots. \emph{American Statistician.} \bold{30-2.} 88-90. Seshadri, V. (1993). \emph{The inverse Gaussian distribution.} Clarendon, Oxford Shuster, J. (1968). On the inverse Gaussian distribution function. Jour. \emph{Am. Stat. Assoc.} \bold{63.} 1514-1516. Wasan, M.T. and Roy, L.K. (1969). Tables of inverse Gaussian percentage points. \emph{Technometrics.} \bold{11-3.} 591-604. Wald, A. (1947). \emph{Sequential analysis.} Wiley, NY Whitmore, G.A. and Seshadri, V. (1987). A heuristic derivation of the inverse Gaussian distribution. \emph{American Statistician.} \bold{41-4.} 280-281. Whitmore, G.A. and Yalovsky, M. (1978). A normalizing logarithmic transformation for inverse Gaussian random variables. \emph{Technometrics.} \bold{20-2.} 207-208. Zigangirov, K.S. (1962). Expression for the Wald distribution in terms of normal distribution. \emph{Radiotech.Electron.} \bold{7.} 164-166. } \author{ Bob Wheeler } \examples{ pinvGauss(1, 1, 16) pinvGauss(c(.65,1,1.45), 1, 16) ## approximately 5\% 50\% and 95\% pars<-sinvGauss(1, 16) plot(function(x)dinvGauss(x,1, 16),pars$Mean-3*pars$SD,pars$Mean+3*pars$SD) } \keyword{distribution} SuppDists/man/SuppDists-internal.Rd0000644000176200001440000000044213610145750017024 0ustar liggesusers\name{SuppDists-internal} \alias{makeStatList} \title{Internal SuppDists function} \description{ Internal SuppDists function } \usage{ makeStatList(head, mn, med, var, mod, third, fourth, dig) } \details{ This is not to be called by the user. } \keyword{distribution} \keyword{internal}SuppDists/man/Friedman.Rd0000644000176200001440000000700713610145750015005 0ustar liggesusers\name{Friedman} \alias{dFriedman} \alias{pFriedman} \alias{qFriedman} \alias{rFriedman} \alias{sFriedman} \title{Friedman's chi-square} \description{ Density, distribution function, quantile function, random generator and summary function for Friedman's chi square. } \usage{ dFriedman(x, r, N, log=FALSE) pFriedman(q, r, N, lower.tail=TRUE, log.p=FALSE) qFriedman(p, r, N, lower.tail=TRUE, log.p=FALSE) rFriedman(n, r, N) sFriedman(r, N) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{r}{vector of number of treatments} \item{N}{(N >= 2) vector of number of replications of each treatment} \item{log, log.p}{ logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{ logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \details{ The Freidman chi-squared is used for nonparametric ANOVA. The data in N rows of an \eqn{N \times r}{N x r} table are ranked separately such that the ranks take the values from 1 to r in the N different rows. The distributions are obtained on the assumption that there is no relationship between the N rows. Formulae: Let \eqn{R_j}{Rj} be the sum of ranks for treatment \eqn{j (j=1\dots r)}{j (j=1 \ldots r)}, then the Friedman statistic is \deqn{ x=\frac{12}{N r (r+1)}\sum_{j=1}^{r}R_j^2 -3N(r+1)}{x=[12/(N r (r+1))]Sum(1 \ldots r)(Rj^2) - 3 N (r+1)} this is asymptotically equivalent to a \eqn{\chi^2}{chi squared} random variable. One may also calculate the chi squared statistic for the usual analysis of variance which gives \deqn{ F=\frac{(N-1)x}{N(r-1)-x}}{F=((N-1) x)/(N (r-1)-x)} which may be used with the F distribution functions in R for degrees of freedom \eqn{(r-1)} and \eqn{(N-1)(r-1)}. } \value{ The output values conform to the output from other such functions in \R. \code{dFriedman()} gives the density, \code{pFriedman()} the distribution function and \code{qFriedman()} its inverse. \code{rFriedman()} generates random numbers. \code{sFriedman()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \note{ Exact calculations are made for the following values of the parameters: \tabular{ll}{ r \tab N \cr 2 \tab 100 \cr 3 \tab 30 \cr 4 \tab 15 \cr 5 \tab 8 } These exact calculations are made using the algorithm of Kendall and Smith (1939). The incomplete beta, with continuity correction, is used for calculations outside these ranges. Some appreciation for the accuracy of the approximation may be obtained by comparing the calculated values with exact tables such as Odeh (1977). Iman and Davenport (1980) have studied the accuracy of various approximations. } \references{ Kendall, M. and Smith, B.B. (1939). The problem of m rankings. \emph{Ann. Math. Stat.} \bold{10.} 275-287. Iman, R.L. and Davenport, J.M. (1980). Approximations of the critical region of the Friedman statistic. \emph{Comm. Stat. Theor. Meth.} \bold{A9(6).} 571-595. Odeh, R.E. (1977). Extended tables of the distribution of Friedman's S-statistic in the two-way layout. \emph{Commun. Statist.-Simula. Computa.} \bold{B6(1).} 29-48. } \author{ Bob Wheeler } \examples{ pFriedman(2, r=5, N=10) pFriedman(c(.8,3.5,9.3), r=5, N=10) ## approximately 5\% 50\% and 95\% sFriedman(r=5, N=10) plot(function(x)dFriedman(x, r=5, N=10),0,10) } \keyword{distribution}SuppDists/man/maxFratio.Rd0000644000176200001440000000657013610145750015216 0ustar liggesusers\name{maxFratio} \alias{maxFratio} \alias{dmaxFratio} \alias{pmaxFratio} \alias{qmaxFratio} \alias{rmaxFratio} \alias{smaxFratio} \title{The maximum F-ratio distribution} \description{ Density, distribution function, quantile function, random generator and summary function for the maximum F-ratio. } \usage{ dmaxFratio(x, df, k, log=FALSE) pmaxFratio(q, df, k, lower.tail=TRUE, log.p=FALSE) qmaxFratio(p, df, k, lower.tail=TRUE, log.p=FALSE) rmaxFratio(n, df, k) smaxFratio(df, k) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{df}{vector non-negative, integer degrees of freedom} \item{k}{vector non-negative, integer number of mean squares} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \details{ The maximum F-ratio is the ratio of the largest to the smallest of k independent mean squares, all with the same df. The usual use is to test for homogeneity of normal variances. } \value{ The output values conform to the output from other such functions in \R. \code{dmaxFratio()} gives the density, \code{pmaxFratio()} the distribution function and qmaxFratio its inverse. \code{rmaxFratio()} generates random numbers. \code{smaxFratio()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \note{ The maximum F-ratio was introduced by Hartley (1950) as a shortcut test of the homogeneity of variances from normal data. Given a set of k mean squares, each based on the same number of degrees of freedom, df, the test statistic is the ratio of the largest to the smallest. Several tables have been constructed. The first by David, H.A. (1952). Currently the most extensive are those by Nelson (1987). It is important to note that tests of this sort are substantially dependent on the assumption of normality, and can not be used robustly as can variance ratios in the analysis of variance. } \section{Limitations}{ The literature contains no information on numerical procedures for this distribution, with the result that all calculations are slow. Finding p from x should give results for almost any values of df and k -- of course absolutely enormous values will take a while. Finding x from p is an iterative calculation dependent on a good starting guess. Such good guesses have been made for \eqn{df \le 24}{df <= 24} and \eqn{k \le 160}{df <= 160}. NA will be returned if larger values are attempted. } \references{ Hartley, H.O. (1950) The maximum F-ratio as a short cut test for heterogeneity of variance. \emph{Biometrika.} \bold{37.} 308-312. David, H.A. (1952). Upper 5 and 1\% points of the maximum F-ratio. \emph{Biometrika.} \bold{38.} 422-424. Nelson, L.S. (1987). Upper 10\%, 5\% and 1\% points of the maximum F-ratio, \emph{Jour. Qual. Tech.} \bold{19-3.} 165-167. } \author{ Bob Wheeler } \examples{ pmaxFratio(4, 10, 10) pmaxFratio(c(2.3, 4, 8.5), 10, 10) ## approximately 5\% 50\% and 95\% qmaxFratio(p=.95,df=c(10,20), k=10) smaxFratio(10, 10) ## Wait for this, it may take a while plot(function(x)dmaxFratio(x, 10, 10),1,10) } \keyword{distribution}SuppDists/man/Spearman.Rd0000644000176200001440000000472313610145750015030 0ustar liggesusers\name{Spearman} \alias{dSpearman} \alias{pSpearman} \alias{qSpearman} \alias{rSpearman} \alias{sSpearman} \title{Spearman's rho} \description{ Density, distribution function, quantile function, random generator and summary function for Spearman's rho. } \usage{ dSpearman(x, r, log=FALSE) pSpearman(q, r, lower.tail=TRUE, log.p=FALSE) qSpearman(p, r, lower.tail=TRUE, log.p=FALSE) rSpearman(n, r) sSpearman(r) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{r}{(r >= 3) vector of number of observations} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \details{ Spearman's rho is the rank correlation coefficient between r pairs of items. It ranges from -1 to 1. Denote by d, the sum of squares of the differences between the matched ranks, then x is given by: \deqn{1-\frac{6d}{r(r^2-1)}}{1-6 d /(r(r^2-1))} This is, in fact, the product-moment correlation coefficient of rank differences. See Kendall (1975), Chapter 2. It is identical to Friedman's chi-squared for two treatments scaled to the -1, 1 range -- if X is the Friedman statistic, then \eqn{\rho=frac{X}{r-1)-1}}{rho = X/(r-1) -1}. Exact calculations are made for \eqn{r \le 100}{r <= 100} These exact calculations are made using the algorithm of Kendall and Smith (1939). The incomplete beta, with continuity correction, is used for calculations outside this range. } \value{ The output values conform to the output from other such functions in \R. \code{dSpearman()} gives the density, \code{pSpearman()} the distribution function and \code{qSpearman()} its inverse. \code{rSpearman()} generates random numbers. \code{sSpearman()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \references{ Kendall, M. (1975). \emph{Rank Correlation Methods.} Griffin, London. Kendall, M. and Smith, B.B. (1939). The problem of m rankings. \emph{Ann. Math. Stat.} \bold{10.} 275-287. } \author{ Bob Wheeler } \examples{ pSpearman(.95, 10) pSpearman(c(-0.55,0,0.55), 10) ## approximately 5\% 50\% and 95\% sSpearman(10) plot(function(x)dSpearman(x, 10),-.9,.9) } \keyword{distribution}SuppDists/man/NormalScore.Rd0000644000176200001440000000752513610145750015511 0ustar liggesusers\name{NormalScore} \alias{NormScore} \alias{dNormScore} \alias{pNormScore} \alias{qNormScore} \alias{rNormScore} \alias{sNormScore} \alias{normOrder} \title{Normal Scores distribution} \description{ Density, distribution function, quantile function, random generator and summary function for the normal scores test. A function to calculate expected values of normal order statistics is included. } \usage{ dNormScore(x, c, N, U, log=FALSE) pNormScore(q, c, N, U, lower.tail=TRUE, log.p=FALSE) qNormScore(p, c, N, U, lower.tail=TRUE, log.p=FALSE) rNormScore(n, c, N, U) sNormScore(c, N, U) normOrder(N) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{c}{vector number of treatments} \item{N}{vector total number of observations} \item{U}{vector sum of reciprocals of the number of the c sample sizes} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \value{ The output values conform to the output from other such functions in \R. \code{dNormScore()} gives the density, \code{pNormScore()} the distribution function and \code{qNormScore()} its inverse. \code{rNormScore()} generates random numbers. \code{sNormScore()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. \code{normOrder()} gives the expected values of the normal order statistics for a sample of size N. } \details{ This is the Kruskal-Wallis statistic with ranks replaced by the expected values of normal order statistics. There are c treatments with sample sizes \eqn{n_j, j=1 \dots c}{nj, j=1 \ldots c}. The total sample size is \eqn{N=\sum_1^c n_j}{N=Sum nj}. The distribution depends on c, N, and U, where \eqn{U=\sum_1^c (1/n_j)}{U=Sum (1/nj)}. Let \eqn{e_N(k)}{eN(k)} be the expected value of the \eqn{k_{th}}{kth} smallest observation in a sample of N independent normal variates. Rank all observations together, and let \eqn{R_{ij}}{Rij} denote the rank of observation \eqn{X_{ij}}{Xij}, \eqn{i=1 \dots n_j}{i=1 \ldots nj} for treatment \eqn{j=1 \dots c}{j=1 \ldots c}, then the normal scores test statistic is \deqn{x=(N-1)\frac{1}{\sum_{k=1}^{N} e_N(k)^2} \sum_{j=1}^{c}\frac{S_j^2}{n_j}}{x=(N-1)[1/Sum(1 \ldots N)(eN(k)^2)]Sum(1 \ldots c)[(Sj^2)/nj]} where \eqn{S_j=\sum_{i=1}^{n_j}(e_N(R_{ij}))}{Sj=Sum(1 \ldots nj)(eN(Rij))}. See Lu and Smith (1979) for a thorough discussion and some exact tables for small r and n. The calculations made here use an incomplete beta approximation -- the same one used for Kruskal-Wallis, only differing in the calculation of the variance of the statistic. The expected values of the normal order statistics use a modification of M.Maechler's C version of the Fortran algorithm given by Royston (1982). Spot checking the values against Harter (1969) confirms the accuracy to 4 decimal places as claimed by Royston. } \references{ Harter, H.L. (1969). \emph{Order statistics and their use in testing and estimation, volume 2.} U.S. Supp. of Doc. Lu, H.T. and Smith, P.J. (1979) Distribution of normal scores statistic for nonparametric one-way analysis of variance. \emph{Jour. Am Stat. Assoc.} \bold{74.} 715-722. Royston, J.P. (1982). Expected normal order statistics (exact and approximate) AS 177. \emph{Applied Statistics.} \bold{31.} 161-165. } \author{ Bob Wheeler } \examples{ #Assuming three treatments, each with a sample size of 5 pNormScore(2, 3, 15, 0.6) pNormScore(c(0.11,1.5,5.6), 3, 15, 0.6) ## approximately 5\% 50\% and 95\% sNormScore(3, 15, 0.6) plot(function(x)dNormScore(x,c=5, N=15, U=0.6),0,5) } \keyword{distribution}SuppDists/man/Kendall.Rd0000644000176200001440000000472013610145750014631 0ustar liggesusers\name{Kendall} \alias{dKendall} \alias{pKendall} \alias{qKendall} \alias{rKendall} \alias{sKendall} \title{The distribution of Kendall's tau} \description{ Density, distribution function, quantile function, random generator and summary function for Kendall's tau. } \usage{ dKendall(x, N, log=FALSE) pKendall(q, N, lower.tail=TRUE, log.p=FALSE) qKendall(p, N, lower.tail=TRUE, log.p=FALSE) rKendall(n, N) sKendall(N) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{N}{vector number of treatments} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \value{ The output values conform to the output from other such functions in \R. \code{dKendall()} gives the density, \code{pKendall()} the distribution function and \code{qKendall()} its inverse. \code{rKendall()} generates random numbers. \code{sKendall()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \details{ There are two categories with N treatments each. The treatments are ranked for each category, and then sorted according to the ranks for the first category. This produces a 2 by N array in which the numbers in the first row are increasing from 1 to N. The array is scanned, and every time two adjacent ranks in the second row are not in order, they are exchanged. The scanning is repeated until the second row is in increasing order. Let s denote the number of exchanges, then Kendall's tau is given by \deqn{\tau=1-\frac{4s}{N(N-1)}}{tau=1-4 s/(N (N-1))} This too is a product-moment correlation coefficient. See Kendall (1975), Chapter 2. Other methods for calculating the statistic are also discussed there. The calculated values are exact for \eqn{N < 13}, thereafter an Edgeworth expansion is used. } \references{ Kendall, M. (1975). \emph{Rank Correlation Methods.} Griffin, London. } \author{ Bob Wheeler } \examples{ pKendall(0, N=10) pKendall(c(-.42,0.02,.42), N=10) ## approximately 5\% 50\% and 95\% qKendall(.95,N=c(10,20)) sKendall(N=10) plot(function(x)dKendall(x, N=10),-0.5,0.5) } \keyword{distribution}SuppDists/man/ghyper.Rd0000644000176200001440000001563713610145750014566 0ustar liggesusers\name{ghyper} \alias{dghyper} \alias{pghyper} \alias{qghyper} \alias{rghyper} \alias{sghyper} \alias{tghyper} \alias{Generalized hypergeometric} \alias{Negative hypergeometric} \alias{Inverse hypergeometric} \alias{Hypergeometric waiting time} \alias{Beta-binomial} \alias{Beta-negative-binomial} \alias{Beta-Pascal} \alias{Generalized Waring} \title{Generalized hypergeometric distributions} \description{ Density, distribution function, quantile function, random generator and summary function for generalized hypergeometric distributions. } \usage{ dghyper(x, a, k, N, log=FALSE) pghyper(q, a, k, N, lower.tail=TRUE, log.p=FALSE) qghyper(p, a, k, N, lower.tail=TRUE, log.p=FALSE) rghyper(n, a, k, N) sghyper(a, k, N) tghyper(a, k, N) ## scalar arguments only } \arguments{ \item{x,q,n}{vector of non-negative \bold{integer} quantities} \item{p}{vector of probabilities} \item{a}{vector of real values giving the first column total} \item{k}{vector of real values giving the first row total} \item{N}{vector of real values giving the grand total} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \value{ The output values conform to the output from other such functions in R. \code{dghyper()} gives the density, \code{pghyper()} the distribution function and \code{qghyper()} its inverse. \code{rghyper()} generates random numbers. \code{sghyper()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third central moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. \cr The function \code{tghyper()} returns the hypergeometric type and the range of values for x. } \details{ The basic representation is in terms of a two-way table: \tabular{ccc}{ x \tab k-x \tab k\cr a-x \tab b-k+x \tab N-k\cr a \tab b \tab N} and the associated hypergeometric probability \eqn{P(x)=C_x^a C_{k-x}^b / C_k^N}{P(x)=choose(a, x) choose(b, k-x) / choose(N, k)}. The table is constrained so that rows and columns add to the margins. In all cases x is an integer or zero, but meaningful probability distributions occur when the other parameters are real. Johnson, Kotz and Kemp (1992) give a general discussion. Kemp and Kemp (1956) classify the possible probability distributions that can occur when real values are allowed, into eight types. The \emph{classic} hypergeometric with integer values forms a ninth type. Five of the eight types correspond to known distributions used in various contexts. Three of the eight types, appear to have no practical applications, but for completeness they have been implemented. The Kemp and Kemp types are defined in terms of the ranges of the a, k, and N parameters and are given in \code{\link{ghyper.types}}. The function \code{tghyper()} will give details for specific values of a, k, and N. These distributions apply to many important problems, which has lead to a variety of names: The Kemp and Kemp types IIA and IIIA are known as: \itemize{ \item Negative hypergeometric \item Inverse hypergeometric \item Hypergeometric waiting time \item Beta-binomial } The advantages of the conditional argument are considerable. Consider a few examples: \enumerate{ \item Future event: Consider two events which have occurred u and v times respectively. The distribution function of x occurrences of the first event in a sample of k new trials is calculated. Here a = -u-1, and N = -u-v-2. Example: Suppose Toronto has won 3 games and Atlanta 1 in the World Series. What is the probability that Toronto will win the series by taking 2 or more of the remaining 3 games? \item Exceedance: Consider two samples of size m and k, then the distribution function of x, the number of elements out of k which exceed the r th largest element in the size m sample is calculated. Here a = -r, and N = -m-1. Example: Suppose that only once in the last century has the high-water mark at the St. Joe bridge exceeded 12 feet, what is the probability that it will not do so in the next ten years? \item Waiting time: Consider an urn with T balls, m of which are white, and that drawing without replacement is continued until w white balls are obtained, then the distribution function of x, the number of balls in excess of w that must be drawn is desired. Here a = -w , N = -m-1, and k = T - m. Example: Suppose a lot of 100 contains 5 defectives. What is the mean number of items that must be inspected before a defective item is found? \item Mixture: Suppose x has a binomial distribution with parameter p, and number of trials k. Suppose that p is not fixed, but itself distributed like a beta variable with parameters A and B, then the distribution of x is calculated with a = -A and N = -A -B. } Names for Kemp and Kemp type IV are: \itemize{ \item Beta-negative-binomial \item Beta-Pascal \item Generalized Waring } One application is accidents: Suppose accidents follow a Poisson distribution with mean L, and suppose L varies with individuals according to accident proneness, m. In particular, suppose L follows a gamma distribution with parameter r and scale factor m , and that the scale factor n itself follows a beta distribution with parameters A and B, then the distribution of accidents, x, is beta-negative-binomial with a = -B, k = -r , and N = A -1. See Xekalki (1983) for a discussion of this as well as a discussion of accident models for proneness, contagion and spells. } \note{The parameters of these functions differ from those of the hypergeometric functions of R. To translate between the two use the following as a model: phyper(x,m,n,k) = pghyper(x,k,m,m+n). } \references{ Johnson, N.L., Kotz, S. and Kemp, A. (1992) \emph{Univariate discrete distributions}. Wiley, N.Y. Kemp, C.D., and Kemp, A.W. (1956). Generalized hypergeometric distributions. \emph{Jour. Roy. Statist. Soc. B.} \bold{18.} 202-211. Xekalaki, E. (1983). The univariate generalized Waring distribution in relation to accident theory: proneness, spells or contagion. \emph{Biometrics.} \bold{39.} 887-895. } \author{ Bob Wheeler } \examples{ tghyper(a=4, k=4, N=10) ## classic tghyper(a=4.1, k=5, N=10) ## type IA(i) Real classic tghyper(a=5, k=4.1, N=10) ## type IA(ii) Real classic tghyper(a=4.2, k=4.6, N=12.2) ## type IB tghyper(a=-5.1, k=10, N=-7) ## type IIA tghyper(a=-0.5, k=5.9, N=-0.7) ## type IIB tghyper(a=10, k=-5.1, N=-7) ## type IIIA Negative hypergeometric tghyper(a=5.9, k=-0.5, N=-0.7) ## type IIIB tghyper(a=-1, k=-1, N=5) ## type IV Generalized Waring sghyper(a=-1, k=-1, N=5) plot(function(x)dghyper(x,a=-1,k=-1,N=5),0,5) #Fisher's exact test: contingency table with rows (1,3),(3,1) pghyper(1,4,4,8) pghyper(3,4,4,8,lower.tail=FALSE) #Beta-binomial applications: #Application examples: tghyper(-4,3,-6) pghyper(2,-4,3,-6,lower=FALSE) pghyper(0,-2,10,-101) sghyper(-1,95,-6)$Mean+1 } \keyword{distribution}SuppDists/man/KruskalWallis.Rd0000644000176200001440000000626513610145750016055 0ustar liggesusers\name{KruskalWallis} \alias{Kruskal} \alias{KruskalWallis} \alias{dKruskalWallis} \alias{pKruskalWallis} \alias{qKruskalWallis} \alias{rKruskalWallis} \alias{sKruskalWallis} \title{Kruskall-Wallis distribution} \description{ Density, distribution function, quantile function, random generator and summary function for the Kruskal-Wallis test. } \usage{ dKruskalWallis(x, c, N, U, log=FALSE) pKruskalWallis(q, c, N, U, lower.tail=TRUE, log.p=FALSE) qKruskalWallis(p, c, N, U, lower.tail=TRUE, log.p=FALSE) rKruskalWallis(n, c, N, U) sKruskalWallis(c, N, U) } \arguments{ \item{x,q}{vector of non-negative quantities} \item{p}{vector of probabilities} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{c}{vector number of treatments} \item{N}{vector total number of observations} \item{U}{vector sum of reciprocals of the number of the c sample sizes} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[X <= x]}, otherwise, \eqn{P[X > x]}} } \value{ The output values conform to the output from other such functions in \R. \code{dKruskalWallis()} gives the density, \code{pKruskalWallis()} the distribution function and \code{qKruskalWallis()} its inverse. \code{rKruskalWallis()} generates random numbers. \code{sKruskalWallis()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \details{ This is a one-way layout with, perhaps, unequal sample sizes for each treatment. There are c treatments with sample sizes \eqn{n_j, j=1 \dots c}{nj, j=1 \ldots c}. The total sample size is \eqn{N=\sum_1^c n_j}{N=Sum(1 \ldots c)nj}. The distribution depends on c, N, and U, where \eqn{U=\sum_1^c (1/n_j)}{U=Sum(1 \ldots c)(1/nj)}. Let \eqn{R_j}{Rj} be the sum of the ranks for treatment \eqn{j (j=1\dots c)}{j (j=1 \ldots c)} then the Kruskal-Wallis statistic is \deqn{x=\frac{12}{N(N+1)}\sum_{j=1}^{c}\frac{R_j^2}{n_j} - 3(N+1)}{x=(12/(N (N-1))Sum(1 \ldots c)(Rj/nj) - 3 (N+1)} This is asymptotically equivalent to a chi-squared variable with c-1 degrees of freedom. The original paper is Kruskal and Wallis (1952) with errata appearing in Kruskal and Wallis (1953). No attempt is made to calculate exact values, rather an incomplete beta approximation is used following Wallace (1959). } \references{ Kruskal, W.H. and Wallis, W.A. (1952) Use of ranks in one-criterion variance analysis. \emph{Jour. Am. Stat. Assoc.} \bold{47.} 583-634 Kruskal, W.H. and Wallis, W.A. (1953) Errata to Use of ranks in one-criterion variance analysis. \emph{Jour. Am. Stat. Assoc.} \bold{48.} 907-911. Wallace, D.L. (1959). Simplified beta-approximations to the Kruskal-Wallis H test. \emph{Jour. Am. Stat. Assoc.} \bold{54.} 225-230. } \author{ Bob Wheeler } \examples{ # Assuming three treatments, each with a sample size of 5. pKruskalWallis(1, 3, 15, 0.6) pKruskalWallis(c(.1,1.5,5.7), 3, 15, 0.6) ## approximately 5\% 50\% and 95\% sKruskalWallis(3, 15, 0.6) plot(function(x)dKruskalWallis(x, 3, 15, 0.6),0.5,8) } \keyword{distribution}SuppDists/man/Pearson.Rd0000644000176200001440000000320613610145750014664 0ustar liggesusers\name{Pearson} \alias{Pearson} \alias{dPearson} \alias{pPearson} \alias{qPearson} \alias{rPearson} \alias{sPearson} \title{The Pearson product moment correlation coefficient} \description{ Density, distribution function, quantile function, random generator and summary function for the distribution of Pearson's product moment correlation. } \usage{ dPearson(x, N, rho=0.0, log=FALSE) pPearson(q, N, rho=0.0, lower.tail=TRUE, log.p=FALSE) qPearson(p, N, rho=0.0, lower.tail=TRUE, log.p=FALSE) rPearson(n, N, rho=0.0) sPearson(N, rho=0.0) } \arguments{ \item{x,q}{vector of sample correlations} \item{p}{vector of probabilities} \item{rho}{vector of population correlations} \item{N}{vector of numbers of observations, \eqn{(N > 3)}} \item{n}{number of values to generate. If n is a vector, length(n) values will be generated} \item{log, log.p}{logical vector; if TRUE, probabilities p are given as log(p)} \item{lower.tail}{logical vector; if TRUE (default), probabilities are \eqn{P[R <= r]}, otherwise, \eqn{P[R > r]}} } \value{ The output values conform to the output from other such functions in \R. \code{dPearson()} gives the density, \code{pPearson()} the distribution function and \code{qPearson()} its inverse. \code{rPearson()} generates random numbers. \code{sPearson()} produces a list containing parameters corresponding to the arguments -- mean, median, mode, variance, sd, third cental moment, fourth central moment, Pearson's skewness, skewness, and kurtosis. } \author{ Bob Wheeler } \examples{ pPearson(0.5, N=10) pPearson(q=0.5, N=10, rho=0.3) sPearson(N=10) plot(function(x)dPearson(x,N=10,rho=0.7),-1,1) } \keyword{distribution}SuppDists/DESCRIPTION0000644000176200001440000000206614665673172013743 0ustar liggesusersPackage: SuppDists Type: Package Title: Supplementary Distributions Version: 1.1-9.8 Date: 2024-09-03 Authors@R: c(person(given = "Bob", family = "Wheeler", role = "aut"), person(given = "Thorsten", family = "Pohlert", email = "thorsten.pohlert@gmx.de", comment = c(ORCID = "0000-0003-3855-3025"), role = c("ctb", "cre")) ) Description: Ten distributions supplementing those built into R. Inverse Gauss, Kruskal-Wallis, Kendall's Tau, Friedman's chi squared, Spearman's rho, maximum F ratio, the Pearson product moment correlation coefficient, Johnson distributions, normal scores and generalized hypergeometric distributions. License: GPL (>= 2) NeedsCompilation: yes Depends: R (>= 3.3.0) Suggests: RcppZiggurat Packaged: 2024-09-03 20:09:22 UTC; thorsten Author: Bob Wheeler [aut], Thorsten Pohlert [ctb, cre] () Maintainer: Thorsten Pohlert Repository: CRAN Date/Publication: 2024-09-03 20:50:02 UTC