Guest User

Untitled

a guest
Jan 15th, 2020
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. hours=[28 23 29 21 24 28 30 19 8 11 4 15 13 20];
  2. grades=[5 4.5 5 5 4 4.5 5 3.5 3 3 3 3 3.5 3.5];
  3. [R,P] = corrcoef(hours, grades)
  4. t_s=0.8755*sqrt((14-2)/(1-0.8755^2))
  5.  
  6. % H0 = p=0 HA = p=/=0
  7. if(t_s> 1.761)
  8. msgbox('We reject the null hypothesis and accept the alternative one – there is dependence between the grades and hours spent')
  9. end
  10. scatter(hours,grades,'filled')
  11. ylim([2 6])
  12. title('Correlation betwen grades and time spend on lecture')
  13. xlabel('Hours spent')
  14. ylabel('Grades')
RAW Paste Data