Y
|
13
|
15
|
16
|
19
|
20
|
X1
|
11
|
12
|
12
|
13
|
15
|
X2
|
8
|
9
|
11
|
13
|
14
|
Bir omilli ekonometrik model tuzish uchun berilgan ma'lumotlar asosida, Y ni X1 va X2 ga bog'liq ifodalaymiz. Uchun:
Y: 13, 15, 16, 19, 20
X1: 11, 12, 12, 13, 15
X2: 8, 9, 11, 13, 14
Modelning umumiy shakli: Y = β0 + β1 * X1 + β2 * X2 + ε
Fisher mezoni qiymatini hisoblash uchun modelni tuzish va an'anaviy kvadratlar yig'indisini hisoblashimiz:
Modelni tuzamiz:
Y = β0 + β1 * X1 + β2 * X2 + ε
An'anaviy kvadratlar yig'indisini hisoblaymiz:
SSR = Σ(Y_pred - Y_mean)^2
= Σ((β0 + β1 * X1 + β2 * X2) - Y_mean)^2
Modelni stimovchi ma'lumotlar orqali hisoblaymiz. Buning uchun stimovchi ma'lumotlar matrisini tuzamiz:
X = [1, X1, X2] # 1 orqa boshi uchun
Y = [Y1, Y2, Y3, Y4, Y5] # berilgan Y qiymatlar
Stimovchi ma'lumotlar usulini qo'llab, β ko'efitsiyentlarini hisoblaymiz:
β = (X^T * X)^-1 * X^T * Y
β0, β1, va β2 ni hisoblash uchun stimovchi ma'lumotlar matrisining qiymatlarini kiritamiz:
X = [[1, 11, 8],
[1, 12, 9],
[1, 12, 11],
[1, 13, 13],
[1, 15, 14]]
Y = [[13],
[15],
[16],
[19],
[20]]
β = (X^T * X)^-1 * X^T * Y
β larni hisoblaymiz:
X^T = Transpose(X)
X^T * X = [[5, 63, 55],
[63, 823, 695],
[55, 695, 616]]
(X^T * X)^-1 = Inverse(X^T * X)
X^T * Y = [[83],
[107],
[107],
[130],
[148]]
β = [[β0],
[β1],
[β2]]
β = (X^T * X)^-1 * X^T * Y
β larni hisoblaymiz:
(X^T * X)^-1 = [[0.301, -0.047, -0.108],
[-0.047, 0.015, 0.020],
[-0.108, 0.020, 0.048]]
β = [[β0],
[β1],
[β2]]
β = [[0.301, -0.047, -0.108],
[-0.047, 0.015, 0.020],
[-0.108, 0.020, 0.048]] * [[83],
[107],
[107],
[130],
[148]]
β = [[14.428],
[0.719],
[0.350]]
SSR ni hisoblaymiz:
Y_mean = (13 + 15 + 16 + 19 + 20) / 5 = 16.6
SSR = Σ(Y_pred - Y_mean)^2
= ((β0 + β1 * X1 + β2 * X2) - Y_mean)^2
SSR = ((14.428 + 0.719 * 11 + 0.350 * 8 - 16.6)^2
+ (14.428 + 0.719 * 12 + 0.350 * 9 - 16.6)^2
+ (14.428 + 0.719 * 12 + 0.350 * 11 - 16.6)^2
+ (14.428 + 0.719 * 13 + 0.350 * 13 - 16Kechirasiz, men xato qilganman. SSR ni hisoblash uchun beta ko'efitsiyentlarini to'g'ri hisoblashim kerak edi.
β = [[14.428],
[0.719],
[0.350]]
SSR = Σ(Y_pred - Y_mean)^2
= ((β0 + β1 * X1 + β2 * X2) - Y_mean)^2
SSR = ((14.428 + 0.719 * 11 + 0.350 * 8 - 16.6)^2
+ (14.428 + 0.719 * 12 + 0.350 * 9 - 16.6)^2
+ (14.428 + 0.719 * 12 + 0.350 * 11 - 16.6)^2
+ (14.428 + 0.719 * 13 + 0.350 * 13 - 16.6)^2
+ (14.428 + 0.719 * 15 + 0.350 * 14 - 16.6)^2)
SSR = (0.782^2 + 0.733^2 + 0.611^2 + 1.022^2 + 1.159^2)
SSR = 0.610 + 0.537 + 0.374 + 1.045 + 1.341
SSR = 3.907
Fisher mezoni qiymatini hisoblash uchun, SSR va qoldiq kvadratlar yig'indisini hisoblashimiz:
Qoldiq kvadratlar yig'indisini hisoblaymiz:
SSE = Σ(Y - Y_pred)^2
= Σ(Y - (β0 + β1 * X1 + β2 * X2))^2
SSE = (13 - (14.428 + 0.719 * 11 + 0.350 * 8))^2
+ (15 - (14.428 + 0.719 * 12 + 0.350 * 9))^2
+ (16 - (14.428 + 0.719 * 12 + 0.350 * 11))^2
+ (19 - (14.428 + 0.719 * 13 + 0.350 * 13))^2
+ (20 - (14.428 + 0.719 * 15 + 0.350 * 14))^2
SSE = (0.782^2 + 0.733^2 + 0.611^2 + 1.022^2 + 1.159^2)
SSE = 0.610 + 0.537 + 0.374 + 1.045 + 1.341
SSE = 3.907
Do'konchalar darajasi:
k = 2 # β1 va β2 uchun
To'liq darajalar:
n = 5 # ma'lumotlar soni
SSR va SSE orqali qoldiq kvadratlar yig'indisini hisoblaymiz:
SST = SSR + SSE
SST = 3.907 + 3.907
SST = 7.814
Fisher mezoni qiymatini hisoblaymiz:
F = (SSR / k) / (SSE / (n - k - 1))
F = (3.907 / 2) / (3.907 / (5 - 2 - 1))
F = 1.9535 / 1.3023
F = 1.498
Iqtisodiy tahlil:
Fisher mezoni qiymati 1.498 ga tengdir. Bu qiymatni kritik qiymatlari bilan solishtirish kerak. Agar Fisher mezoni kritik qiymatdan katta bo'lsa (bizning holatimizda, 1.498 > kritik qiymat), bu degani uchun kritik qiymatni o'tib ketganligi, modelimiz statistik ravishda ma'noiy tarzda muhim hisoblanadi. Bu esa, kamida bitta o'zgaruvchan (X1 yoki X2) tomonidan tasvirlangan ma'lumotlarimizning Y ga ta'siri bo'lishi mumkinligini ko'rsatadi.
X1 va X2 o'zgaruvchanlarning Y ga ta'siri statistik muhimlig
Dostları ilə paylaş: |