Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. MB18<- read.csv("2018MLB_batter.csv")
  2. MB18$H
  3. hist(MB18$H) #distorted, not simillar with normal distribution
  4.  
  5. MB18lim<- MB18[MB18$H>20,] #linit the player: under 20Hits are deleted
  6. hist(MB18lim$H)
  7. MB18O<- MB18[order(MB18$H),] # aort by ascending order as hit number
  8.  
  9. MMM<- MB18lim[order(MB18lim$H),] #〃
  10.  
  11. plot(MB18O$H) #index,so didn't use,so
  12. x<- ecdf(MB18$H)
  13. plot(x) #make cumlative function
  14.  
  15. plot(MMM$H) #index,didn't use,so
  16. y<- ecdf(MB18lim$H)
  17. plot(y) #make cumlative function (limited ver)
  18.  
  19. par(mfrow=c(1,3))
  20. plot(x)
  21. curve(pnorm(x,0,1),xlim=c(-3,3))
  22. qqnorm(MB18$H)
  23.  
  24. par(mfrow=c(1,3))
  25. plot(y)
  26. curve(pnorm(x,0,1),xlim=c(-3,3))
  27. qqnorm(MB18lim$H)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement