Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MB18<- read.csv("2018MLB_batter.csv")
- MB18$H
- hist(MB18$H) #distorted, not simillar with normal distribution
- MB18lim<- MB18[MB18$H>20,] #linit the player: under 20Hits are deleted
- hist(MB18lim$H)
- MB18O<- MB18[order(MB18$H),] # aort by ascending order as hit number
- MMM<- MB18lim[order(MB18lim$H),] #〃
- plot(MB18O$H) #index,so didn't use,so
- x<- ecdf(MB18$H)
- plot(x) #make cumlative function
- plot(MMM$H) #index,didn't use,so
- y<- ecdf(MB18lim$H)
- plot(y) #make cumlative function (limited ver)
- par(mfrow=c(1,3))
- plot(x)
- curve(pnorm(x,0,1),xlim=c(-3,3))
- qqnorm(MB18$H)
- par(mfrow=c(1,3))
- plot(y)
- curve(pnorm(x,0,1),xlim=c(-3,3))
- qqnorm(MB18lim$H)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement