Checking if error in data is normally distributed or not

I have two datasets (x) and (y). How could I know if the error in both data is normally distributed or not? Thank you, Amb

 채택된 답변

Star Strider
Star Strider 2016년 4월 11일

0 개 추천

One option is the Anderson-Darling test. See the documentation for the adtest function for details. Tare links to others in and at the end of that page.

댓글 수: 4

Thank you star you are always helpful and first in response I appreciate this very much. I'm infect interested to know how could we get an idea if all the data errors are normally distributed ? does this means if data is from a normal distribution data error will also be from a normally distributed?
My pleasure.
As I understand your Question, in your example the argument to the adtest function would be the errors (vector of residuals) from a regression or similar procedure. The original data can have any distribution.
Thank you again star. I was reading a paper where the author mentioned "if all the data errors are normally distributed" so now I understand it completely (correct me if I'm still wrong) first, I need to run regression then estimate residual and then have to use adtest on residual to see if errors are normally distributed or not if they are a linear fit is good approximation. I was really confused that how could we know the error in only observations. Thanks again
My pleasure.
You are correct. The fit does not have to be linear (you can do a nonlinear fit to your data if that is appropriate). That aside, you would be checking to see if the residuals — the difference between the regression at every value of your independent variable and your dependent variable at those points — are normally distributed.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2016년 4월 11일

0 개 추천

kstest() each of them individually.
If you want to know whether they come from the same normal distribution, see kstest2()

댓글 수: 1

thank you Walter... In my understanding, real observations can rarely be from a normal distribution.

댓글을 달려면 로그인하십시오.

태그

질문:

2016년 4월 11일

댓글:

2016년 4월 11일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by