KS TEST fails at 0.05 but passes at 0.01
Mostra commenti meno recenti
Hello, I need some help in verifying the KSTEST method, which i implemented in the code. I have attached the data file and compared the theoretical CDF with ECDF using beta distribution. the KSTEST fails at 95% of significance while it passes at 99% (tight range). Can any one please check whether my method of implementing KS test is correct or wrong? and if my way interpretation is wrong then?
R = load('R.txt')
figure
h1 = histogram(R(1:end),20,'Normalization','cdf');
[f,x] = ecdf(R);
pd_12 = betacdf(x,a_mle,b_mle); % theoretical
[h2,p,ksstat] = kstest(R,'CDF', makedist('Beta','a',a_mle,'b',b_mle),'Alpha',0.01)
J = plot(x,pd_12,'b','Linewidth',2); grid on;
hold on
plot(x,f,'LineStyle', '-', 'Color', 'r','Linewidth',2)
legend('Histogram of data','Theoretical Beta CDF','ECDF of data','Location','best')
2 Commenti
the cyclist
il 15 Ott 2024
Modificato: the cyclist
il 15 Ott 2024
We need a_mle and b_mle to test your code. Is it the coefficients from
betafit(R)
?
Muhammad Abdullah
il 16 Ott 2024
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Descriptive Statistics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!