MATLAB Answers

How to accurately process an Anderson Darling test?

25 views (last 30 days)
I am conducting a Anderson Darling (Adtest) on a set of data and I am trying to verify if what I am getting is correct. However I am getting conflicting answers. In MATLAB I am getting the following:
[h,p,adstat,cv] = adtest(Build_Array_Final{1},'Distribution','weibull');
% h =
% logical
% 1
% p =
% 5.0000e-04
% adstat =
% 2.1490
% cv =
% 0.7374
This is what I get as my answer however I doubled check my values with "Minitab19" I am recieiving the following data:
If someone could help me identify where I am going wrong I would be greatful.
I am using ver 2020a


Sign in to comment.

Accepted Answer

Jeff Miller
Jeff Miller on 1 Jul 2020
Looks to me like the same problem as in your previous question. MATLAB's 2-parameter Weibull starts from a minimum of 0, but Minitab seems to add a third parameter (Thresh) for the minimum, which it estimates at 212.1. If you subtract that number from all your observations and run your adtest command on the differences, I think MATLAB will give you the same results as Minitab.


Show 3 older comments
Isaac Valdez
Isaac Valdez on 1 Jul 2020
The AD value seems to be exact for each different set of data that I use. I have noticed that the P-value MATLAB outputs is very close to the one that Minitab19 outputs.
I am just wondering what is causing that slight P-value difference between Minitab and Matlab. I know this is minor but I want to make sure everything is consistent.
Jeff Miller
Jeff Miller on 1 Jul 2020
Sorry, other than rounding error, I can't even guess.

Sign in to comment.

More Answers (0)