hp calculators
HP 30S Statistics – Linear Regression
Answer:
10.89 grams.
=
)
.
('
x
5
10
=
)
.
(
xˆ
5
10
Example 4: The previous examples are based on the regression of the final concentration (y) on the amount of
chemical added (x). Would the last result obtained be equal to
if we were studying the regression
of x on y?
)
.
('
y
5
10
Solution:
The most likely answer is no. y is the dependent variable and x is the independent variable. Their roles
cannot be interchanged. If we interchange x and y, we change our experiment, the results of which may
well be meaningless. Let’s see what happens, by swapping the given data, and then we’ll find
.
Press
a
and reenter the data in the following order:
)
.
('
y
5
10
3?2???5?6?5?3???8?6?8.5?9?
To
find
press:
)
.
('
y
5
10
b@@@@@@@@
(to select )
y10.5y
'
y
Answer:
According to the new regression, the predicted value is 9.88 grams. The regression line is now
(where x is still the amount of chemical added and y is the concentration), which
y
.
.
x
98
0
38
0
+
−
=
is
not the same as before (
y
.
.
x
18
1
44
1
+
−
=
)
Example 5: By polling fifty people, a survey taker obtained the following data:
,
,
,
and
3333
=
∑
i
x
9
459
.
y
i
=
∑
231933
2
=
∑
i
x
57
4308
2
.
y
i
=
∑
75
30549
.
y
x
i
i
=
∑
Judging by the correlation coefficient , is there a linear relation between x and y?
Solution:
r can be calculated using the formula given on page 2:
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
⋅
−
=
50
9
459
57
4308
50
3333
231933
50
9
459
3333
75
30549
2
2
.
.
.
.
r
Let’s enter it into the entry line by pressing:
r30549.75-333*459.9/50s
/pr231933-3333q/50sr43
08.57-459.9q/50
and finally
y
.
Answer:
r = –0.12, so we can assume there’s no linear relation at all.
hp calculators
- 4 -
HP 30S Statistics – Linear Regression - Version 1.0