Advertisement
makispaiktis

Tutorial - Test for normality

Aug 11th, 2021 (edited)
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.56 KB | None | 0 0
  1. clc
  2. clear all
  3.  
  4. % I will generate 2 data lists, 1 coming from normal distribution
  5. % and the other 1 from a uniform distribution
  6. X1 = randn(1000, 1);
  7. X2 = rand(1000, 1);
  8.  
  9. % I will run the 2 tests for normality: jbtest and kstest
  10. display('0 means noraml distribution, 1 means the opposite');
  11. display('************************************************');
  12. display('X1 = randn(1000, 1)');
  13. [h1, p1] = jbtest(X1)
  14. [h1, p1] = kstest(X1)
  15. display('************************************************');
  16. display('X2 = rand(1000, 1)');
  17. [h2, p2] = jbtest(X2)
  18. [h2, p2] = kstest(X2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement