DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Random Variable Distributions in R


library(car)
set.seed(42)
x <- rnorm(100)
qqPlot(x)
y <- rgamma(100, 1)
qqPlot(y)
plot(density(rf(10,2,2)))   # F distribution
plot(density(rt(10,2,2)))   # t distribution
plot(density(rchisq(10,2,2)))   # chi-square distribution

Ref:

  • Probability Plots

  • QQPlot: how to see whether data are normally distributed



Published

Feb 7, 2018

Last Updated

Feb 7, 2018

Category

Tech

Tags

  • distribution 1
  • rlang 17

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor