File:StudentizedRangePDF.svg

Summary

Description
English: Studentized range distribution PDFs, aka dtukey in R.
Date
Source Own work
Author Shiyu Ji
SVG development
InfoField

Source code

The logo of R – programming language for statistical analysis
The logo of R – programming language for statistical analysis
This media was created with R (programming language for statistical analysis)Category:Images with R source code
Here is a listing of the source used to create this file.

Deutsch  English  +/−

# Display the Student's range distributions with various
# degrees of freedom.

svg(filename='StudentizedRangePDF.svg')

x <- seq(0, 5, length=400)
hx <- pnorm(x)

k <- c(2, 2, 2, 3, 10)
df <- c(2, 4, 8, 10, 10)
colors <- c("red", "blue", "grey", "gold", "green", "black")
labels <- c("k=2 df=2", "k=2 df=4", "k=2 df=8", "k=3 df=10", "k=10 df=10", 
            "k=10 df=100")

dtukey <- function(q, nmeans, df) {
    delta = 0.001
    return ((ptukey(q+delta, nmeans, df) - ptukey(q, nmeans, df)) / delta)
}

# standard normal PDF
plot(x, dtukey(q=x, nmeans=10, df=100), lwd=2, col="black", 
     type="l", xlab="x", ylab="PDF f(x)", ylim=c(0, 6e-4))

# studentized range distri.
for (i in 1:5){
  lines(x, dtukey(q=x, nmeans=k[i], df=df[i]), lwd=2, col=colors[i])
}

legend("topright", inset=.05,
  labels, lwd=2, lty=c(1, 1, 1, 1, 1, 1), col=colors)

Licensing

Shiyu Ji, the copyright holder of this work, hereby publishes it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
Attribution:
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.
Category:CC-BY-SA-4.0#StudentizedRangePDF.svgCategory:Self-published work
Category:Probability distributions
Category:CC-BY-SA-4.0 Category:Images with R source code Category:Probability distributions Category:Self-published work Category:Valid SVG created with R