Guest User

Untitled

a guest
Sep 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.49 KB | None | 0 0
  1. normal = rnorm(1000)
  2. t.student = rt(1000,5)
  3. curve(dt(x,5),-7,7)
  4. curve(dnorm(x),-7,7,add=T,col="green")
  5.  
  6. qqnorm(normal)
  7. qqline(normal)
  8.  
  9. qqnorm(t.student)
  10. qqline(t.student)
  11.  
  12. ## 5
  13.  
  14. erupcion = faithful[,1]
  15. mean(erupcion)
  16. median(erupcion)
  17. mean(erupcion, trim=0.1)
  18. sd(erupcion)
  19. var(erupcion)
  20.  
  21. hist(erupcion, breaks=20, freq=F, col="grey80")
  22. lines(density(erupcion, bw=0.1), col="red")
  23. plot(ecdf(erupcion))
  24.  
  25. m1 = erupcion[erupcion <= 3]
  26. m2 = erupcion[erupcion > 3]
  27.  
  28. boxplot(m1, m2)
Add Comment
Please, Sign In to add comment