Advertisement
Guest User

Untitled

a guest
Mar 24th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #cofidence interval for mean (p.2, ex.9)
  2.  
  3. #Data
  4. vctr =c(11.1,12.5,13.6,9.1,8.7,10.6,12.5,15.6,13.8,8.0,10.9,7.6,5.2,1.2,12.8,16.7,13.9,10.1,9.6,10.8,11.6,12.3,12.9,11.6)
  5.  
  6. #Test for normality
  7. shapiro.test(vctr)
  8.  
  9. #p value > 15 % and if p > 10%, then data from normal distributed(t-test)
  10.  
  11. #Find the mean
  12. #m = mean(vctr)
  13.  
  14. #Construct the conf.interval (is usloviya 90% confidence interval)
  15. t.test(vctr,conf.level=0.9)
  16.  
  17. #Hypothesis testing : H0:mu<=9 against Ha:mu>9
  18. t.test(vctr,alternative="greater",mu=9)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement