You are on page 1of 2

TUGAS IV METODE NUMERIK

LATIHAN BAB 17 BUKU CHAPRA

Oleh:
A. Saverina A.
076

Problem 17.18
Use multiple linear regression to fit
x1 0 1 1 2 2 3 3 4 4
x2 0 1 2 1 2 1 2 1 2
y 15,1 17,9 12,7 25,6 20,5 35,1 29,7 45,4 40,2
Compute the coefficients, the standard error of the estimate, and the correlation coefficient.
Penyelesaian :
∑ 𝑦 = 15,1 + 17,9 + 12,7 + 25,6 + 20,5 + 35,1 + 29,7 + 45,4 + 40,2 = 242.2
∑ 𝑥 1 = 0 + 1 + 1 + 2 + 2 + 3 + 3 + 4 + 4 = 20
∑ 𝑥 2 = 0 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 = 12

∑ 𝑥 12 = 12 + 12 + 22 + 22 + 32 + 32 + 42 + 42 = 60
∑ 𝑥 22 = 12 + 22 + 12 + 22 + 12 + 22 + 12 + 22 = 20
∑ 𝑥 1 𝑥 2 = 1 + 2 + 2 + 4 + 3 + 6 + 4 + 8 = 30

∑ 𝑥 1 𝑦 = 0 + 17.9 + 12.7 + (2 × 25.6) + (2 × 20.5) + (3 × 35.1) + (3 × 29.7) +


(4 × 45.4) + (4 × 40.2) = 659.6

∑ 𝑥 1 𝑦 = 0 + 17.9 + (2 × 12.7) + 25.6 + (2 × 20.5) + 35.1 + (2 × 29.7) + 45.4 +


(2 × 40.2) = 330.2

Dengan matriks:

𝑛 ∑ 𝑥1 ∑ 𝑥2 ∑𝑦
𝑎0
∑ 𝑥1 ∑ 𝑥 12 ∑ 𝑥 1 𝑥2 [𝑎1 ] = ∑ 𝑥 𝑦
𝑎2 1
2
[∑ 𝑥2 ∑ 𝑥1 𝑥2 ∑ 𝑥2 ]
[
∑𝑥 𝑦
2 ]

9 20 12 𝑎0 242.2
[20 60 𝑎
30] [ 1 ] = [ 659.6]
12 30 20 𝑎2 330.2
9𝑎 0 + 20𝑎1 + 12𝑎 2 = 242.2 … (1)
20𝑎 0 + 60𝑎1 + 30𝑎 2 = 659.6 … (2)
12𝑎 0 + 30𝑎1 + 20𝑎 2 = 330.2 … (3)

Dengan menggunakan metode Gauss Seidel, maka:

𝑎 0 = 27.51667

𝑎1 = 1.821
𝑎 2 = −3.489
𝑦 = 𝑎 0 + 𝑎 2 𝑥1 + 𝑎 2𝑥2 = 27.51667 + 1.821𝑥1 − 3.489𝑥2

𝑆𝑟 = ∑( 𝑦 − 𝑎 0 − 𝑎 2𝑥1 − 𝑎 2 𝑥2) 2

𝑆𝑟 = ∑( 𝑦 − 27.51667 − 1.821𝑥1 + 3.489𝑥 2)2

𝑆𝑦 = ∑(𝑦 − 𝑦̅) 2

𝑆𝑟 725.3167
𝑆𝑦⁄𝑥 = √ =√ = 10.994
𝑛 − (𝑚 + 1) 9 − (2 + 1)

𝑆𝑦 − 𝑆𝑟 1058.749 − 725.3167
𝑟2 = = = 0.4597
𝑆𝑟 725.3167
𝑟 = √0.4597 = 0.678

You might also like