필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Kelley Kehoe
Kelley Kehoe 2020년 10월 19일
댓글: Kelley Kehoe 2020년 10월 19일
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!

답변 (1개)

Alan Stevens
Alan Stevens 2020년 10월 19일
As long as y, m and err_y have the same number of elements then your expression should work ok.
  댓글 수: 3
Alan Stevens
Alan Stevens 2020년 10월 19일
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 2020년 10월 19일
yes it is somewhat irregular, this is an assignment for class the equation differs slightly.

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

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by