File:Shapiro-Wilk Simulated CDF for n = 5, 10, 15, ..., 50.svg
Original file (SVG file, nominally 960 × 675 pixels, file size: 499 KB)
Captions
Summary edit
DescriptionShapiro-Wilk Simulated CDF for n = 5, 10, 15, ..., 50.svg |
English: Recreation of Fig. 4 from Shapiro and Wilk (1965). Basically, the emprical CDF of test results (and resultant p-values) for various sample sizes. Generated by repeated resampling from a large number of normal variates. Not truly an empirical CDF for the test because the correspondence displayed was produced w/ Royston's exact test.
plotPvalues <- function() {
l.norm <- rnorm(5000)
shap.n <- function(n) {
replicate(2000, unlist(shapiro.test(sample(l.norm, n, replace = TRUE))[c(1,2)]))
}
shap.l <- mapply(shap.n, seq(5, 50, 5), SIMPLIFY = FALSE)
plot(seq(0,1,length.out = 10), seq(0.7, 1, length.out = 10), type = "n",
xlab = "P",
ylab = "W",
main = "Simulated Empirical CDF for n = 5, 10, 15, ..., 50")
abline(v = seq(0, 1, length.out = 11), lty = 3, col = "grey")
abline(h = seq(0.7, 1, length.out = 7), lty = 3, col = "grey")
text(rep(0.21, 4), c(0.84, 0.88, 0.91, 0.98), labels = c("n = 5", "n = 10", "n = 15", "n = 50"), cex = 0.9)
for (n in 1:10) {
lines(sort(shap.l[[n]][2, ]), sort(shap.l[[n]][1, ]), col = rgb(red = (1 - 5*n/50), green = 0, blue = 5*n/50))
}
}
The above is a copy from the gist on GitHub as of 21:41, 22 April 2012 (UTC). The gist may be updated in the future so always compare the two when attempting to recreate the image.
|
Date | |
Source | Own work |
Author | Protonk |
Licensing edit
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 07:03, 12 February 2012 | 960 × 675 (499 KB) | Protonk (talk | contribs) |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 768pt |
---|---|
Height | 540pt |