10 likes | 255 Views
Example: Testing whether month of birth of randomly chosen child born 2008 in Stockholm can be uniformly distrubuted : Input data for 2008 Evaluate Q statistic Find 0.05 quantile for Chi2(f) and compare it with Q. Matlab code:.
E N D
Example: Testing whether month of birth of randomly chosen child born 2008 in Stockholm can be uniformly distrubuted: • Input data for 2008 • Evaluate Q statistic • Find 0.05 quantile for Chi2(f) and compare it with Q. • Matlab code: cd c:\D'ocuments and Settings\'Administrator\Desktop\wafo_new initwafo x=[1044 1020 1090 1177 1201 1157 1132 1040 1030 1088 938 950]; n=sum(x) Q=n*sum((x/n-1/12).^2)/(1/12) f=12-1; wchi2inv(0.95,f)