Это старая версия (1.159) МетодНаименьшихКвадратов.

Содержание

Метод наименьших квадратов

Оцениваем y sub i = beta sub 0 + beta sub 1 x sub i + epsilon sub i с помощью y accent size +3 \\\"^\\\" sub i = b sub 0 + b sub 1 x sub i , здесь nothing accent size +3 { \\\"^\\\" } — знак оценки, поэтому b sub 0 = beta accent size +3 \\\"^\\\" sub 0 и b sub 1 = beta accent size +3 \\\"^\\\" sub 1 .

Функция суммы квадратов невязок:

 size +2
SSE =
size +2 sum from i=1 to n e sub i sup 2 = 
size +2 sum from i=1 to n (y sub i - y accent size +3 \\\"^\\\" sub i ) sup 2 = 
size +2 sum from i=1 to n (y sub i - (b sub 0 + b sub 1 x sub i )) sup 2 = 
size +2 sum from i=1 to n (y sub i - b sub 0 - b sub 1 x sub i ) sup 2
 size +3
SSE =
size +3 sum from i=1 to n e sub i sup 2 = 
size +3 sum from i=1 to n (y sub i - y accent size +3 \\\"^\\\" sub i ) sup 2 = 
size +3 sum from i=1 to n (y sub i - (b sub 0 + b sub 1 x sub i )) sup 2 = 
size +3 sum from i=1 to n (y sub i - b sub 0 - b sub 1 x sub i ) sup 2
 size +4
SSE =
size +4 sum from i=1 to n e sub i sup 2 = 
size +4 sum from i=1 to n (y sub i - y accent size +3 \\\"^\\\" sub i ) sup 2 = 
size +4 sum from i=1 to n (y sub i - (b sub 0 + b sub 1 x sub i )) sup 2 = 
size +4 sum from i=1 to n (y sub i - b sub 0 - b sub 1 x sub i ) sup 2

Задача безусловной оптимизации — минимизация суммы квадратов невязок: size +3 sum from i=1 to n (y sub i - b sub 0 - b sub 1 x sub i ) sup 2 -> min from {b sub 0 , b sub 1}

Условие первого порядка: left {
lpile {
\[1\]: ~ {partial SSE} over {partial b sub 0} = 0 ~ , above
\[2\]: ~ {partial SSE} over {partial b sub 1} = 0
}
right nothing

Рассмотрим \[1\]: ~ {partial SSE} over {partial b sub 0} = 0 {partial SSE} over {partial b sub 0} =
{partial size +3 sum from i=1 to n (y sub i - b sub 0 - b sub 1 x sub i ) sup 2} over {partial b sub 0} = 
{-2} size +3 sum from i=1 to n ( y sub i - b sub 0 - b sub 1 x sub i ) = 0

Откуда: lpile {
size +3 sum from i=1 to n ( y sub i - b sub 0 - b sub 1 x sub i ) = 0 ~ , above
size +3 sum from i=1 to n 
y sub i - size +3 sum from i=1 to n b sub 0 - size +3 sum from i=1 to n b sub 1 x sub i = 0 ~ , above
size +3 sum from i=1 to n 
y sub i - n b sub 0 - b sub 1 size +3 sum from i=1 to n x sub i = 0 ~ , above
n b sub 0 = size +3 sum from i=1 to n y sub i - b sub 1 size +3 sum from i=1 to n x sub i ~ , above 
b sub 0 = size -2 1 over size -2 n 
left ( 
size +3 sum from i=1 to n y sub i - b sub 1 size +3 sum from i=1 to n x sub i 
right ) = 
{size +3 sum from i=1 to n y sub i} over n - b sub 1 {size +3 sum from i=1 to n x sub i} over n
}


КатегорияПрикладнаяМатематика