WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Mean, Fitted-Value, Error, and Residual in Simple Linear Regression

observation number
5
indicate:
μ
y
ϵ
e
random seed
5983
This Demonstration simulates the simple linear regression
y
i
=a+b
x
i
+
ϵ
i
,
i=1,,10
. The red line is the plot of
y=a+bx
, while the blue line is the plot of
y
=
a
+
b
x
, where
a
and
b
are the least-squares estimates. The
x
's are ordered from smallest to largest and for any particular observation number
i
that is selected, a double arrow is used to indicate
μ
i
=a+b
x
i
,
y
i
=
a
+
b
x
i
,
ϵ
i
=
y
i
-
μ
i
, or
e
i
=
y
i
-
y
i
. In the thumbnail,
μ
has been selected with
i=5
, so the double arrow shows the value of
μ
5
. The numerical values of these quantities are displayed when you mouseover one of the data points. Select some other observation numbers. Can you give approximate values for the quantities shown by the arrows? Check your answer by mousing over the selected observation.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.