background image

 

hp calculators 

 

HP 30S Statistics – Linear Regression

 

 
Example 6:  An experimenter obtained the following data: 
  

x  300 420 450 500 610 780 800 
y  11.1 12.2 12.5 13 15.6 15.8 16.1 

 

 

 

Determine whether there is a linear relation between x and y

 
Solution: 

First of all, let’s clear any previous data: 

–1

, select CLR-DATA and press 

y

. This is not required 

in this example: since the number of data items did not change, new data would overwrite the old ones. 
But, it’s a good habit to clear previous data before starting a new regression calculation. 2-VAR mode was 
already set, so we can now enter the data as follows:  

 

 

a300?11.1?420?12.2?450?12
.5?500?13?610?15.6?780?15.
8?800?16.1?

 

 

 

Let’s now find the linear correlation coefficient: 

b<<<<<<

Rounded to four decimal places, r = 0.9624. Even though it is quite close 
to one, the experimenter expected a more conclusive result. By plotting a 
scatter graph (figure 1), she notices that point (610, 15.6) is anomalous, 
and is consequently removed from the data set. To do so, press: 

 Figure 1

 

 
 

a&

 seven times, and  

e

(NB: not  

o

). 

 
 

The new correlation coefficient is displayed as above. i.e. by pressing  

b

 and then the left arrow key six 

times. 

 

Answer: 

r = 0.9997, so there’s strong evidence that the relation is linearThe regression line is  

 

x

.

.

y

01

0

03

8

+

=

 

 

Example 7:  Find the power curve 

that best fits the following data: 

n

x

m

y

=

 

x  0.50 0.75 1.00 1.25 1.50 2.00 
y  0.47 1.43 3.15 5.75 9.45 20.68 

 
Solution: 

This problem can be solved on your HP 30S by making the substitutions y’ = ln y, and x’ = ln x. The model 
becomes: 

, which is a linear form. Clear the statistical data ( 

–1

, select CLR-DATA 

and press 

y

) and enter the new data as follows: 

'

x

n

m

ln

'

y

+

=

 

 

ah.5?h.47?h.75?h1.43?h1?
h3.15?h1.25?h5.75?h1.5?h
9.45?h2?h20.68? 

 
 

In the STATVAR menu ( 

b

), we find that a = 1.140696782 and b = 2.728608754. Since b = n and 

, then n = 2.728608754, and 

, which can be calculated as follows: 

m

ln

a

=

a

e

m

=

 

 

o—Hb<

(eight times)

 yy 

 

 

Answer: 

Rounding to two decimal digits, 

 

73

2

13

3

.

x

.

y

=

hp calculators 

- 5 - 

HP 30S Statistics – Linear Regression - Version 1.0 

Summary of Contents for HP 30S

Page 1: ...hp calculators HP 30S Statistics Linear Regression Linear Regression Practice Solving Linear Regression Problems ...

Page 2: ...greement between the x and y variables and is given by n y y n x x n y x y x r i i i i i i i i 2 2 2 2 When r is positive the correlation is positive which means that high values of one variable correspond to high values of the other Conversely if r is negative then the correlation is negative low values of one variable correspond to high values of the other An important property of r is that 1 1 ...

Page 3: ...ressed to two decimal digits a 1 22 and b 0 85 therefore the regression line is The correlation coefficient is 0 91 which means that the correlation is positive and that it is quite a good fit since r is close to 1 However exactly how far away from this value the correlation can be and the equation still be considered a good predictor is certainly a matter of debate x y 85 0 22 1 Example 2 If the ...

Page 4: ... 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 yi 231933 2 i x 57 4308 ...

Page 5: ...s that point 610 15 6 is anomalous and is consequently removed from the data set To do so press Figure 1 a seven times and e NB not o The new correlation coefficient is displayed as above i e by pressing b and then the left arrow key six times Answer r 0 9997 so there s strong evidence that the relation is linear The regression line is x y 01 0 03 8 Example 7 Find the power curve that best fits th...

Reviews: