Effacer les filtres
Effacer les filtres

Can someone help me write out this equation for chi-square please

1 vue (au cours des 30 derniers jours)
Kelley Kehoe
Kelley Kehoe le 19 Oct 2020
Commenté : Kelley Kehoe le 19 Oct 2020
I am having trouble writing this equation out in matlab, am a beginner. This is my attempt so far: CS= sum(((y-m)./err_y).^2). Any help would be much appreciated!

Réponses (1)

Alan Stevens
Alan Stevens le 19 Oct 2020
As long as y, m and err_y have the same number of elements then your expression should work ok.
  3 commentaires
Alan Stevens
Alan Stevens le 19 Oct 2020
It is reasonable that the better fitting model produces a smaller value of chi-squared.
Your expression for chi-square looks somewhat unusual to me
(see https://www.statisticshowto.com/probability-and-statistics/chi-square/ for example), however, I'm no statistics expert.
Kelley Kehoe
Kelley Kehoe le 19 Oct 2020
yes it is somewhat irregular, this is an assignment for class the equation differs slightly.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by