Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #Nama: Farah Ghita
  2. #NIM: G64150071
  3.  
  4. N<-100
  5. n<-20
  6.  
  7. populasi=2*(1:100)
  8. populasi
  9.  
  10. id.sample=sample(1:100,20,replace=FALSE)
  11. id.sample
  12.  
  13. hasilSample=populasi[id.sample]
  14. hasilSample
  15.  
  16. rataanPopulasi=mean(sample)
  17. rataanPopulasi
  18.  
  19. totalPopulasi=rataanPopulasi*N
  20. totalPopulasi
  21.  
  22. h=0
  23. for (i in 1:n)
  24. h=(h+((sample[i]-rataanPopulasi)^2))
  25. h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement