

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


a 0
a =51. 0
:=intercept x y( , )
a 1
− 3
a = × 1
:=slope x y( , )
Using MathCAD's built-in functions:
a 0
a =51. 0
y_bar a 1
:= − ⋅x_bar
a 1
− 3
a = × 1
n
i
x
i
y
i
i
x
i
i
y
n
i
x
2
i
x
2
y_bar y_bar =23.
i
y
n
x_bar 3 10 :=
3
x_bar = ×
i
x
n
Using regression equations:
y a 0
a 1
= + ⋅x
Form of regression equation:
n :=length mpg( ) n = 7 i := 0 ..n − 1
weight ( 2000 2200 2600 2900 3400 3800 4100 ) x :=weight
T
:=
mpg ( 35 30 28 22 18 17 15 ) y :=mpg
T
:=
Data provided:
Trending vehicle miles-per-gallon versus vehicle weight
Computing the standard error and the correlation coefficient:
t
i
y
i
−y_bar
2
t
r
i
y
i
a 0
a 1
x
i
2
r
s y_x
r
n − 2
:= s y_x
r
t
r
t
:= r =0.
Plotting the original data and the regression line:
f x( ) a 0
a 1
:= + ⋅x
2000 2500 3000 3500 4000 4500
10
15
20
25
30
35
y i
f x i
xi
Now we can estimate a vehicles mpg, given its weight. For example:
weight := 3100
mpg := f weight( ) mpg =22.