hpsupportheadportlet
Actions ${title}
Loading...
Welcome to HP Customer Support
hpcontactsecondarynavigationportlet
Actions ${title}
Loading...
hpherosupportsearch
Actions ${title}
Loading...
hpshareprintwidgetportlet
Actions ${title}
Loading...
hpconcentrawrapperportlet
Actions ${title}
Loading...
HP 12c Platinum Financial Calculator  Statistics  Linear Regression
Linear regression
Linear regression is a statistical method for finding a smooth straight line that best fits two or more data pairs in a sample
being analyzed. Any straight line like the one shown in Figure 1 owns two specific coefficients that precisely locate it in a
planar coordinate system: a yintercept A and a slope B. These coefficients compose the straight line equation y = A +
Bx. It is also important to mention that the correlation  r  is always 1 when only two points are entered.
Figure : Graph of the line y = A + Bx
HP 12c Platinum statistics
In the HP 12c Platinum, summations resulting from statistics data are suitable for linear regression computations. Given the y and
x coordinates of any two or more points belonging to a curve, the linear regression coefficients can be easily found.
Practice solving linear regression problems
Example 1
Based on the information presented in the graphic in Figure 2, compute the yintercept and slope to
characterize the straight line.
note:
The line crosses the xaxis at the origin (0,0).
Figure : Line passing the origin and the point (4,6)
Solution
One of the points that belongs to the curve is (0,0) and the other one is (4,6). Both must be entered to
compute the equation of the line. Be sure to clear the statistics/summation memories before starting the
problem.
Keystroke

Display


Figure : Displaying the number of entries

The display shows the number of entries.
Now compute the slope (B) by entering: (Since A is already zero)
Keystroke

Display


Figure : Calculating the slope B

Answer
The expression for this straight line has A=0 and B=1.5. The equation is y = 1.5x + 0.
Example 2
Based on the information presented in the graphic in Figure 5, compute the yintercept and slope to
characterize the straight line. Then use xforecasting to compute the xrelated coordinate for y=5.
Figure : Graph to compute the xrelated coordinate when y=5
Solution
Be sure to clear the statistics/summation memories before starting the problem.
Press .
The data pairs must be entered before computing the coefficients.
Keystroke

Display


Figure : Entering the coordinates of the points

As the line does not cross the xaxis at the origin, we forecast y when x=0 to find the yintercept A:
Keystroke

Display


Figure : Finding the yintercept when x=0

To compute the slope, now press:
Keystroke (In RPN mode)

Keystroke (In algebraic mode)

Display



Figure : Finding the slope of the line

Now it is necessary to forecast x for y=5.
Keystroke

Display


Figure : Calculating the value of x when y=5

Answer
This straight line has A=1.67 and B=0.33 and its expression is: y = 1.67 + 0.33x.
Example 3
Linear programming is a common technique used to solve operational research problems by graphics
inspection. Based on the information presented in the graphics in Figure 10, compute the yintercept and
slope for both straight lines S_{1} and S_{2}.
Figure : Graph indicating the lines S_{1} and S_{2}
Solution
Be sure to clear the statistics/summation memories before starting the problem.
Press .
By inspection, the yintercept for both lines is found to be 3.5 for S_{1} and 5 for S_{2}. Now we need to compute
their slope. The data pairs for S_{1} are (10,0) and (0,3.5):
Keystroke

Display


Figure : Entering the coordinates of the points for S_{1}

The slope for S_{1} can be found with the following sequence:
Keystroke (In RPN mode)

Keystroke

Display



Figure : Calculating the slope of line S_{1}

Now, to compute S_{2} slope it is necessary to clear the statistics/summation memories and enter (5,0) and
(0,4.5) as the new data pairs.
Keystroke

Display


Figure : Entering the coordinates of the points for S_{2}

The slope for S_{2} can be found with the same sequence as before:
Keystroke (In RPN mode)

Keystroke (In algebraic mode)

Display



Figure : Calculating the slope of line S_{2}

Answer
For S_{1}, A = 3.5 and B = 0.35. For S_{2}, A = 5 and B = 0.90.
hpfeedbackinputportlet
Actions ${title}
Loading...
hponlinecommunitiesportlet
Actions ${title}
Loading...
Ask the community!
hpfeedbackbannerportlet
Actions ${title}
Loading...
hpcountrylocatorportlet
Actions ${title}
Loading...
Country/Region:
Lithuania
hpdetectloadmydeviceportlet
Actions ${title}
Loading...