Está en la página 1de 15

Asignatura: Estadística II.

Carrera: Licenciatura en matemáticas

Alumno: Raúl Ibáñez Couoh

Matrícula: ES172001745

Docente: Mónica Zaima Víquez Cano

Unidad 2. Regresión lineal simple

Evidencia de aprendizaje. Ajuste de un análisis de regresión lineal

21/05/2020, Zihuatanejo, Guerrero, México.


⎡ 150 ⎤ ⎡ 400 ⎤
⎢ 200 ⎥ ⎢ 450 ⎥
⎢ ⎥ ⎢ ⎥
180 ⎥ 480 ⎥
x ≔ READCSV ((“X_1.csv”)) = ⎢ y ≔ READCSV ((“Y_1.csv”)) = ⎢
⎢ 225 ⎥ ⎢ 500 ⎥
⎢ 250 ⎥ ⎢ 450 ⎥
⎢⎣ 300 ⎥⎦ ⎢⎣ 550 ⎥⎦

M ≔ ‖ for i ∊ 1 ‥ 7 ||
‖ ‖ ||
‖ ‖ for j ∊ 1 ‥ 6| | |
X ≔ xT ‖ ‖ ‖M ←0 ||| Y ≔ yT
‖ ‖ ‖‖ i , j | |
| ||
‖ |
‖ return M |

A=i B = xi C = yi D = xi - mean ((x)) E = yi - mean ((y))


2
F = ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ G = ⎛⎝xi - mean ((x))⎞⎠

⎡ 2 ⎤
clase = ⎢ i xi y i x i - mean (
( x )
) y i - mean (
( y )
) ⎛
⎝ x i - mean (
(x )
) ⎞
⎠ ⋅ ⎛
⎝ y i - mean (
( y)
) ⎞
⎠ ⎛
⎝ xi - mean (
( x )
)⎞
⎠ ⎥
⎢⎣ “A” “B” “C” “D” “E” “F” “F” ⎥⎦

nombres ≔ [[ “A” “B” “C” “D” “E” “F” “G” ]]

M⟨1⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨2⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨3⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |
⟨ ⟩ ⟨ ⟩ ⟨ ⟩
‖ ‖ || ‖ ‖ || ‖ ‖ ||
‖ i+1 | ‖ i+1 | ‖ i+1 |



M⟨1⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨2⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨3⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |
⟨ ⟩ ⟨ ⟩ ⟨ ⟩
‖ ‖ || ‖ ‖ || ‖ ‖ ||
‖ ‖ Mi + 1 ← i || | ‖ ‖ Mi + 1 ← x || ‖ ‖ Mi + 1 ← y ||


‖ ‖ | ‖ ‖ || | ‖ ‖ || |


i i
‖‖ return M || ‖ | ‖ |
‖ return M | ‖ return M |

M⟨4⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||


⟨ ⟩
‖ ‖ || M⟨5⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||
⟨ ⟩
‖ ‖ Mi + 1 ← x - mean ((x)) | | ‖ ‖ ||

‖ ‖ || | ‖ ‖ Mi + 1 ← y - mean ((y)) | |


‖ | ‖ ‖ || |


i
‖ return M | ‖ |
M⟨6⟩ ≔ ‖ for i ∊ 1 ‥ length ((x))
⟨ ⟩
|| ‖ return M |
‖ ‖ | | ⟨⟨7⟩⟩ ‖ ( ) ||
‖ ‖ Mi + 1 ← ⎛x - mean ((x))⎞ ⋅ ⎛y - mean ((y))⎞ | | M ≔ ‖ for i ∊ 1 ‥ length (x) ||

‖ ‖ ‖
⎝ i ⎠ ⎝ i ⎠ || | ‖ ‖ Mi + 1 ← ⎛x - mean (x)⎞ 2 | |


‖ | ‖ ‖ ( )
⎝ ⎠ || |


‖ return M |
i
‖ |
‖ return M |
1
M ≔ nombres = [[ “A” “B” “C” “D” “E” “F” “G” ]]

⎡ “A” “B” “C” “D” “E” “F” “G” ⎤


⎢ 1 150 400 -67.5 -71.6667 4837.5 4556.25 ⎥
⎢ ⎥
⎢ 2 200 450 -17.5 -21.6667 379.1667 306.25 ⎥
M=⎢ 3 180 480 -37.5 8.3333 -312.5 1406.25 ⎥
⎢ 4 225 500 7.5 28.3333 212.5 56.25 ⎥
⎢ 5 250 450 32.5 -21.6667 -704.1667 1056.25 ⎥
⎢ 6 300 550 82.5 78.3333 6462.5 6806.25 ⎥⎦

intercept ((x , y)) = 304.9486 slope ((x , y)) = 0.7665


⎡ b0 ⎤ ⎡ 304.9486 ⎤
⎢ ⎥ ≔ line ((x , y)) = ⎢
⎣ b1 ⎦ ⎣ 0.7665 ⎥⎦
stderr ((x , y)) = 34.4508
( )
y1 (x) ≔ b0 + b1 ⋅ x → 0.76651982378854622 ⋅ x + 304.94860499265786

O:
length ((x))
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 6⎠
b1 ≔ ―――――
length ((x))
→ 0.76651982378854620617 = 0.7665
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 7⎠
b0 ≔ mean ((y)) - b1 ⋅ mean ((x)) = 304.9486
clear ((x))

y ((x)) ≔ b0 + b1 ⋅ x → 0.76651982378854622 ⋅ x + 304.94860499265792


x ≔ 120 ‥ 350
575

555

535

515

495

475 y ((x))

455 Y

435

415

395

120 145 170 195 220 245 270 295 320 345 370
x

⎡ 150 ⎤
⎡ 400 ⎤
X ≔ READCSV ((“X_1.csv”)) = ⎢ 200 ⎥ Y ≔ READCSV ((“Y_1.csv”)) = ⎢
⎢ ⎥ ⎣ ⋮ ⎥⎦
⎣ ⋮⎦

⎡a⎤ ⎡ 304.9486 ⎤
⎢⎣ b ⎥⎦ ≔ line ((X , Y)) = ⎢⎣ 0.7665 ⎥⎦

length ((Y)) length ((Y)) 2


a⋅ ∑ Y +b⋅ ∑ X ⋅ Y - length ((Y)) ⋅ ((mean ((Y))))
i i i
i=1 i=1
――――――――――――――――――
length ((Y))
= 0.6371
2
∑ ⎛Y ⎞ - length ((Y)) ⋅ ((mean ((Y))))
2

i=1 ⎝ i⎠

corr ((Y , X)) = 0.7982


⎡ 13640 ⎤
⎡ 15 ⎤ y ≔ READCSV ((“Y_2.csv”)) = ⎢⎣ ⋮ ⎥⎦
x ≔ READCSV ((“X_2.csv”)) = ⎢ 29 ⎥
⎢ ⎥
⎣ ⋮⎦

M ≔ ‖ for i ∊ 1 ‥ 7 ||
‖ ‖ ||
‖ ‖ for j ∊ 1 ‥ 6| | |
X ≔ xT ‖ ‖ ‖M ←0 ||| Y ≔ yT
‖ ‖ ‖‖ i , j | |
| ||
‖ |
‖ return M |

A=i B = xi C = yi D = xi - mean ((x)) E = yi - mean ((y))


B = xi C = yi D = xi - mean ((x)) E = yi - mean ((y))

2
F = ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ G = ⎛⎝xi - mean ((x))⎞⎠

⎡ 2 ⎤
clase = ⎢ i xi y i x i - mean (
( x )
) y i - mean (
( y )
) ⎛
⎝ x i - mean (
(x )
) ⎞
⎠ ⋅ ⎛
⎝ y i - mean (
( y)
) ⎞
⎠ ⎛
⎝ xi - mean (
( x )
)⎞
⎠ ⎥
⎢⎣ “A” “B” “C” “D” “E” “F” “F” ⎥⎦

nombres ≔ [[ “A” “B” “C” “D” “E” “F” “G” ]]

M⟨1⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨2⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨3⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |
⟨ ⟩ ⟨ ⟩ ⟨ ⟩
‖ ‖ || ‖ ‖ || ‖ ‖ ||
‖ ‖ Mi + 1 ← i || | ‖ ‖ Mi + 1 ← x || ‖ ‖ Mi + 1 ← y ||


‖ ‖ | ‖ ‖ || | ‖ ‖ || |


i i
‖‖ return M || ‖ | ‖ |
‖ return M | ‖ return M |

M⟨4⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||


⟨ ⟩
‖ ‖ || M⟨5⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||
⟨ ⟩
‖ ‖ Mi + 1 ← x - mean ((x)) | | ‖ ‖ ||

‖ ‖ || | ‖ ‖ Mi + 1 ← y - mean ((y)) | |


‖ | ‖ ‖ || |


i
‖ return M | ‖ |
M⟨6⟩ ≔ ‖ for i ∊ 1 ‥ length ((x))
⟨ ⟩
|| ‖ return M |
‖ ‖ | | ⟨⟨7⟩⟩ ‖ ( ) ||
‖ ‖ Mi + 1 ← ⎛x - mean ((x))⎞ ⋅ ⎛y - mean ((y))⎞ | | M ≔ ‖ for i ∊ 1 ‥ length (x) ||

‖ ‖ ‖
⎝ i ⎠ ⎝ i ⎠ || | ‖ ‖ Mi + 1 ← ⎛x - mean (x)⎞ 2 | |


‖ | ‖ ‖ ( )
‖ return M | ⎝ i
⟨ ⎠ || |
‖ |
‖ return M |
1
M ≔ nombres = [[ “A” “B” “C” “D” “E” “F” “G” ]]

⎡ “A” “B” “C” “D” “E” “F” “G” ⎤


⎢ 1 15 13640 -5.1667 -7230.25 37356.2917 26.6944 ⎥
⎢ ⎥
⎢ 2 29 27792 8.8333 6921.75 61142.125 78.0278 ⎥
⎢ 3 20 24447 -0.1667 3576.75 -596.125 0.0278 ⎥
⎢ 4 15 14754 -5.1667 -6116.25 31600.625 26.6944 ⎥
⎢ 5 15 15879 -5.1667 -4991.25 25788.125 26.6944 ⎥
M=⎢ 6 20 26075 -0.1667 5204.75 -867.4583 0.0278 ⎥
⎢ ⎥
⎢ 7 28 27650 7.8333 6779.75 53108.0417 61.3611 ⎥
⎢ 8 16 11520 -4.1667 -9350.25 38959.375 17.3611 ⎥
⎢ 9 22 25121 1.8333 4250.75 7793.0417 3.3611 ⎥
⎢ 10 15 13808 -5.1667 -7062.25 36488.2917 26.6944 ⎥
⎢ ⎥
⎢ 11 20 22505 -0.1667 1634.75 -272.4583 0.0278 ⎥
⎣ 12 27 27252 6.8333 6381.75 43608.625 46.6944 ⎦

intercept ((x , y)) = -610.6897 slope ((x , y)) = 1065.1706


⎡ b0 ⎤ ⎡ -610.6897 ⎤
⎢ ⎥ ≔ line ((x , y)) = ⎢
⎣ b1 ⎦ ⎣ 1065.1706 ⎥⎦

stderr ((x , y)) = 3020.6594


( )
y1 (x) ≔ b0 + b1 ⋅ x → 1065.1705632306048 ⋅ x - 610.68969181719638
stderr ((x , y)) = 3020.6594
( )
y1 (x) ≔ b0 + b1 ⋅ x → 1065.1705632306048 ⋅ x - 610.68969181719638

O:
length ((x))
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 6⎠
b1 ≔ ―――――
length ((x))
→ 1065.1705632306057475 = 1065.1706
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 7⎠
b0 ≔ mean ((y)) - b1 ⋅ mean ((x)) = -610.6897
clear ((x))

y ((x)) ≔ b0 + b1 ⋅ x → 1065.1705632306057 ⋅ x - 610.689691817217


x ≔ 10 ‥ 35

37500

35000

32500

30000

27500

25000

22500 y ((x))
20000
Y
17500

15000

12500

10000

10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35


x

⎡ 15 ⎤
⎢ 29 ⎥ ⎡ 13640 ⎤
X ≔ READCSV ((“X_2.csv”)) = Y ≔ READCSV ((“Y_2.csv”)) = ⎢⎣
⎢ ⎥ ⋮ ⎥⎦
⎣ ⋮⎦
⎡a⎤ ⎡ -610.6897 ⎤
⎢⎣ b ⎥⎦ ≔ line ((X , Y)) = ⎢⎣ 1065.1706 ⎥⎦

length ((Y)) length ((Y)) 2


a⋅ ∑ Y +b⋅ ∑ X ⋅ Y - length ((Y)) ⋅ ((mean ((Y))))
i i i
i=1 i=1
――――――――――――――――――
length ((Y))
= 0.7959
2
∑ ⎛Y ⎞ 2 - length ((Y)) ⋅ ((mean ((Y))))
i=1 ⎝ i⎠

corr ((Y , X)) = 0.8922


⎡6⎤
⎡1⎤ ⎢8⎥
x ≔ READCSV ((“X_3.csv”)) = ⎢⎣ ⋮ ⎥⎦ y ≔ READCSV ((“Y_3.csv”)) =
⎢ ⎥
⎣ ⋮⎦

M ≔ ‖ for i ∊ 1 ‥ 7 ||
‖ ‖ ||
‖ ‖ for j ∊ 1 ‥ 6| | |
X ≔ xT ‖ ‖ ‖M ←0 ||| Y ≔ yT
‖ ‖ ‖‖ i , j | |
| ||
‖ |
‖ return M |

A=i B = xi C = yi D = xi - mean ((x)) E = yi - mean ((y))


2
F = ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ G = ⎛⎝xi - mean ((x))⎞⎠

⎡ 2 ⎤
clase = ⎢ i xi yi xi - mean ((x)) yi - mean ((y)) ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ ⎛⎝xi - mean ((x))⎞⎠ ⎥
⎢⎣ “A” “B” “C” “D” “E” “F” “F” ⎥⎦

nombres ≔ [[ “A” “B” “C” “D” “E” “F” “G” ]]


M⟨1⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨2⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨3⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |
⟨ ⟩ ⟨ ⟩ ⟨ ⟩
‖ ‖ || ‖ ‖ || ‖ ‖ ||
‖ ‖ Mi + 1 ← i || | ‖ ‖ Mi + 1 ← x || ‖ ‖ Mi + 1 ← y ||


‖ ‖ | ‖ ‖ || | ‖ ‖ || |


i i
‖‖ return M || ‖ | ‖ |
‖ return M | ‖ return M |

M⟨4⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||


⟨ ⟩
‖ ‖ || M⟨5⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||
⟨ ⟩
‖ ‖ Mi + 1 ← x - mean ((x)) | | ‖ ‖ ||

‖ ‖ || | ‖ ‖ Mi + 1 ← y - mean ((y)) | |


‖ | ‖ ‖ || |


i
‖ return M | ‖ |
‖ | | ‖ return M |
M ≔ for i ∊ 1 ‥ length ((x))
⟨⟨6⟩⟩
‖ ‖ | | ⟨⟨7⟩⟩ ‖ ( ) ||
‖ ‖ Mi + 1 ← ⎛x - mean ((x))⎞ ⋅ ⎛y - mean ((y))⎞ | | M ≔ ‖ for i ∊ 1 ‥ length (x) ||

‖ ‖ ‖
⎝ i ⎠ ⎝ i ⎠ || | ‖ ‖ Mi + 1 ← ⎛x - mean (x)⎞ 2 | |


‖ | ‖ ‖ ( )
⎝ ⎠ || |


‖ return M |
i
‖ |
‖ return M |
1
M ≔ nombres = [[ “A” “B” “C” “D” “E” “F” “G” ]]

⎡ “A” “B” “C” “D” “E” “F” “G” ⎤


⎢ 1 1 6 -5.5 -2.8333 15.5833 30.25 ⎥
⎢ ⎥
⎢ 2 2 8 -4.5 -0.8333 3.75 20.25 ⎥
⎢ 3 3 6 -3.5 -2.8333 9.9167 12.25 ⎥
⎢ 4 4 6 -2.5 -2.8333 7.0833 6.25 ⎥
⎢ 5 5 8 -1.5 -0.8333 1.25 2.25 ⎥
M=⎢ 6 6 5 -0.5 -3.8333 1.9167 0.25 ⎥
⎢ ⎥
⎢ 7 7 7 0.5 -1.8333 -0.9167 0.25 ⎥
⎢ 8 8 10 1.5 1.1667 1.75 2.25 ⎥
⎢ 9 9 9 2.5 0.1667 0.4167 6.25 ⎥
⎢ 10 10 11 3.5 2.1667 7.5833 12.25 ⎥
⎢ ⎥
⎢ 11 11 15 4.5 6.1667 27.75 20.25 ⎥
⎣ 12 12 15 5.5 6.1667 33.9167 30.25 ⎦

intercept ((x , y)) = 3.8333 slope ((x , y)) = 0.7692


⎡ b0 ⎤ ⎡ 3.8333 ⎤
⎢ ⎥ ≔ line ((x , y)) = ⎢
⎣ b1 ⎦ ⎣ 0.7692 ⎥⎦
stderr ((x , y)) = 2.0261
y1 ((x)) ≔ b0 + b1 ⋅ x → 0.76923076923076927 ⋅ x + 3.8333333333333335

O:
length ((x))
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 6⎠
b1 ≔ ―――――
length ((x))
→ 0.76923076923076921601 = 0.7692
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 7⎠
b0 ≔ mean ((y)) - b1 ⋅ mean ((x)) = 3.8333

clear ((x))
b0 ≔ mean ((y)) - b1 ⋅ mean ((x)) = 3.8333

clear ((x))

y ((x)) ≔ b0 + b1 ⋅ x → 0.76923076923076916 ⋅ x + 3.8333333333333339


x ≔ 0 ‥ 15

15.5

14.5

13.5

12.5

11.5

10.5

9.5
y ((x))
8.5

7.5 Y
6.5

5.5

4.5

3.5

0 1.5 3 4.5 6 7.5 9 10.5 12 13.5 15


x

⎡1⎤
⎢2⎥ ⎡6⎤
X ≔ READCSV ((“X_3.csv”)) = Y ≔ READCSV ((“Y_3.csv”)) = ⎢⎣ ⋮ ⎥⎦
⎢ ⎥
⎣ ⋮⎦

⎡a⎤ ⎡ 3.8333 ⎤
⎢⎣ b ⎥⎦ ≔ line ((X , Y)) = ⎢⎣ 0.7692 ⎥⎦

length ((Y)) length ((Y)) 2


a⋅ ∑ Y +b⋅ ∑ X ⋅ Y - length ((Y)) ⋅ ((mean ((Y))))
i i i
i=1 i=1
――――――――――――――――――
length ((Y))
= 0.6733
2
∑ ⎛Y ⎞ - length ((Y)) ⋅ ((mean ((Y))))
2

i=1 ⎝ i⎠

corr ((Y , X)) = 0.8206


⎡1⎤
⎢2⎥ ⎡ 250 ⎤
x ≔ READCSV ((“X_4.csv”)) = ⎢ ⎥ y ≔ READCSV (“Y_4.csv”) = ⎢ 328 ⎥
( )
⎢3⎥ ⎢ ⎥
⎣ ⋮⎦
⎣ ⋮⎦

M ≔ ‖ for i ∊ 1 ‥ 7 ||
‖ ‖ ||
‖ ‖ for j ∊ 1 ‥ 6| | |
X ≔ xT ‖ ‖ ‖M ←0 ||| Y ≔ yT
‖ ‖ ‖‖ i , j | |
| ||
‖ |
‖ return M |

A=i B = xi C = yi D = xi - mean ((x)) E = yi - mean ((y))


2
F = ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ G = ⎛⎝xi - mean ((x))⎞⎠

⎡ 2 ⎤
clase = ⎢ i xi yi xi - mean ((x)) yi - mean ((y)) ⎛⎝xi - mean ((x))⎞⎠ ⋅ ⎛⎝yi - mean ((y))⎞⎠ ⎛⎝xi - mean ((x))⎞⎠ ⎥
⎢⎣ “A” “B” “C” “D” “E” “F” “F” ⎥⎦

nombres ≔ [[ “A” “B” “C” “D” “E” “F” “G” ]]

M⟨1⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |M⟨2⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| | M⟨3⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x))| |
⟨ ⟩ ⟨ ⟩ ⟨ ⟩
‖ ‖ || ‖ ‖ || ‖ ‖ ||
‖ ‖ Mi + 1 ← i || | ‖ ‖ Mi + 1 ← x || ‖ ‖ Mi + 1 ← y ||

‖ ‖ | ‖ ‖ || | ‖ ‖ || |

i i
‖‖ return M || ‖ | ‖ |
‖ return M | ‖ return M |

M ≔ for i ∊ 1 ‥ rows ((x))
⟨⟨4⟩⟩
| |
‖ ‖ || M⟨5⟩ ≔ ‖ for i ∊ 1 ‥ rows ((x)) ||
⟨ ⟩
‖ ‖ Mi + 1 ← x - mean ((x)) | | ‖ ‖ ||

‖ ‖ || | ‖ ‖ Mi + 1 ← y - mean ((y)) | |

i

‖ | ‖ ‖ || |

i
‖ return M | ‖ |
‖ return M |
M⟨6⟩ ≔ ‖ for i ∊ 1 ‥ length ((x)) ||
⟨ ⟩
‖ ‖ || ⟨⟨7⟩⟩ ‖ ( ) ||
‖ ‖ Mi + 1 ← ⎛x - mean ((x))⎞ ⋅ ⎛y - mean ((y))⎞ | | M ≔ ‖ for i ∊ 1 ‥ length (x) ||


‖ ‖ ‖
⎝ i ⎠ ⎝ i ⎠ || | ‖ ‖ Mi + 1 ← ⎛x - mean (x)⎞ 2 | |


‖ | ‖ ‖ ( )
⎝ i ⎠ || |


‖ return M | ‖ |
‖ return M |
1
M ≔ nombres = [[ “A” “B” “C” “D” “E” “F” “G” ]]

⎡ “A” “B” “C” “D” “E” “F” “G” ⎤


⎢ 1 1 250 -3.1429 -441.4286 1387.3469 9.8776 ⎥
⎢ ⎥
⎢ 2 2 328 -2.1429 -363.4286 778.7755 4.5918 ⎥
3 3 462 -1.1429 -229.4286 262.2041 1.3061 ⎥
M=⎢
⎢ 4 4 708 -0.1429 16.5714 -2.3673 0.0204 ⎥
⎢ 5 5 923 0.8571 231.5714 198.4898 0.7347 ⎥
⎢ 6 6 1054 1.8571 362.5714 673.3469 3.449 ⎥
⎢ ⎥
⎣ 7 8 1115 3.8571 423.5714 1633.7755 14.8776 ⎦
intercept ((x , y)) = 105.2992 slope ((x , y)) = 141.4795
⎡ b0 ⎤ ⎡ 105.2992 ⎤
⎢ ⎥ ≔ line ((x , y)) = ⎢
⎣ b1 ⎦ ⎣ 141.4795 ⎥⎦
stderr ((x , y)) = 96.5727
y1 ((x)) ≔ b0 + b1 ⋅ x → 141.47950819672127 ⋅ x + 105.29918032786905

O:
length ((x))
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 6⎠
b1 ≔ ―――――
length ((x))
→ 141.47950819672130881 = 141.4795
∑ ⎛M ⎞
i=1 ⎝ i + 1 , 7⎠

b0 ≔ mean ((y)) - b1 ⋅ mean ((x)) = 105.2992


clear ((x))

y ((x)) ≔ b0 + b1 ⋅ x → 141.4795081967213 ⋅ x + 105.29918032786884


x≔0‥9

1450
1300
1150
1000
850
700
550
y ((x))
400
250 Y
100

0 0.9 1.8 2.7 3.6 4.5 5.4 6.3 7.2 8.1 9


x

⎡1⎤
X ≔ READCSV (“X_4.csv”) = ⎢ 2 ⎥
( )
⎡1⎤
⎡ 250 ⎤
X ≔ READCSV (“X_4.csv”) = ⎢ 2 ⎥
( ) Y ≔ READCSV ((“Y_4.csv”)) = ⎢
⎢ ⎥ ⎣ ⋮ ⎥⎦
⎣ ⋮⎦

⎡a⎤ ⎡ 105.2992 ⎤
⎢⎣ b ⎥⎦ ≔ line ((X , Y)) = ⎢⎣ 141.4795 ⎥⎦

length ((Y)) length ((Y)) 2


a⋅ ∑ Y +b⋅ ∑ X ⋅ Y - length ((Y)) ⋅ ((mean ((Y))))
i i i
i=1 i=1
――――――――――――――――――
length ((Y))
= 0.9374
2
∑ ⎛Y ⎞ - length ((Y)) ⋅ ((mean ((Y))))
2

i=1 ⎝ i⎠

corr ((Y , X)) = 0.9682


Bibliografía
Canavos, G. C. (1988). Probabilidad y Estadística Aplicaciones y métodos. México: Mc Graw
Hill.

Hill, M. R. (2009). Estadística. México: Mc Graw Hill.

Lipschutz, S. (1991). Probabilidad. México: Mc Graw Hill.

Lipschutz, S. (2009). Matemáticas discretas. México: Mc Grawl Hill.

Martínez Bencardino, C. (2012). Estadística y muestreo. Bogotá: Ecoe Ediciones.

R., M. (1976). Probabilidad y Estadística. México: Mc Graw Hill.

Spiegel, M. (2007). Álgebra Superior. México: McGRAW-HILL.

TRIOLA, M. F. (2009). Estadística. México: Pearson Educación.

También podría gustarte