How to run a chi-square test?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all,
I am trying to run a chi-square test on my data.
I have a vector of eigenvalues from PCA and they are ordering in descending order. I want to test the linear trend in the eigenvalue vector. However, the Matlab help says that the chi2gof just test the data is from the normal distribution.
So, my question is, is there any way to adapt chi2gof function in my test of linear trend? Or I should look for other functions?
Thank you very much.
Best wishes
Wenlong
0 Kommentare
Antworten (1)
Ilya
am 24 Okt. 2012
chi2gof tells you how closely the observed distribution resembles your theoretical guess. You don't have a distribution yet. To test for a linear trend, you can fit your data to a straight line by least squares.
Start by inspecting the fit visually. A formal test is often not necessary. If you need a formal test, you can assume, as is often done, that the residuals are normally distributed.
Here is doc on linear models:
http://www.mathworks.com/help/stats/parametric-regression-basics.html http://www.mathworks.com/help/stats/linear-regression-1.html
Here is a section showing how to examine the model quality:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Hypothesis Tests finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!