Guest User

Untitled

a guest
Apr 26th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. set.seed(426); x = round(rnorm(250, 75, 7)); median(x)
  2. [1] 75 # overall median
  3. MAT = matrix(x, nrow=5) # 5 x 25 matrix, each row a section
  4. med = apply(MAT, 1, median); med
  5. ## 76.0 75.0 77.0 74.5 74.0 # medians of five sections
  6. max(med); min(med)
  7. [1] 77
  8. [1] 74
  9.  
  10. qnorm(.5, 72.5, 6.96)
  11. [1] 72.5
  12. qnorm(.75, 72.5, 6.96)
  13. [1] 77.19445
  14. qnorm(.9, 72.5, 6.96)
  15. [1] 81.4196
  16.  
  17. quantile(x, c(.5, .75, .9))
  18. 50% 75% 90%
  19. 75.0 80.0 84.1
Add Comment
Please, Sign In to add comment