<< Chapter < Page Chapter >> Page >

Given data of input and corresponding outputs from a linear function, find the best fit line using linear regression.

  1. Enter the input in List 1 (L1).
  2. Enter the output in List 2 (L2).
  3. On a graphing utility, select Linear Regression (LinReg).

Finding a least squares regression line

Find the least squares regression line using the cricket-chirp data in [link] .

  1. Enter the input (chirps) in List 1 (L1).
  2. Enter the output (temperature) in List 2 (L2). See [link] .
    L1 44 35 20.4 33 31 35 18.5 37 26
    L2 80.5 70.5 57 66 68 72 52 73.5 53
  3. On a graphing utility, select Linear Regression (LinReg). Using the cricket chirp data from earlier, with technology we obtain the equation:
T ( c ) = 30.281 + 1.143 c
Got questions? Get instant answers now!
Got questions? Get instant answers now!

Will there ever be a case where two different lines will serve as the best fit for the data?

No. There is only one best fit line.

Distinguishing between linear and nonlinear models

As we saw above with the cricket-chirp model, some data exhibit strong linear trends, but other data, like the final exam scores plotted by age, are clearly nonlinear. Most calculators and computer software can also provide us with the correlation coefficient    , which is a measure of how closely the line fits the data. Many graphing calculators require the user to turn a ”diagnostic on” selection to find the correlation coefficient, which mathematicians label as r The correlation coefficient provides an easy way to get an idea of how close to a line the data falls.

We should compute the correlation coefficient only for data that follows a linear pattern or to determine the degree to which a data set is linear. If the data exhibits a nonlinear pattern, the correlation coefficient for a linear regression is meaningless. To get a sense for the relationship between the value of r and the graph of the data, [link] shows some large data sets with their correlation coefficients. Remember, for all plots, the horizontal axis shows the input and the vertical axis shows the output.

Correlation coefficients values range from -1.0 - 1.0.  Collections of dots representing an example of each kind of correlation coefficient are plotted underneath them.  The closer to 1.0 the more the points are grouped tightly to form a line in the positive direction.  The closer to -1.0 the more the points are grouped tightly to form a line in the negative direction.  The closer to 0 the points are very scattered and do not form a line.  Several shapes are displayed at the bottom row, none of which are lines, but all of them have values of 0.
Plotted data and related correlation coefficients. (credit: “DenisBoigelot,” Wikimedia Commons)

Correlation coefficient

The correlation coefficient is a value, r , between –1 and 1.

  • r > 0 suggests a positive (increasing) relationship
  • r < 0 suggests a negative (decreasing) relationship
  • The closer the value is to 0, the more scattered the data.
  • The closer the value is to 1 or –1, the less scattered the data is.

Finding a correlation coefficient

Calculate the correlation coefficient for cricket-chirp data in [link] .

Because the data appear to follow a linear pattern, we can use technology to calculate r Enter the inputs and corresponding outputs and select the Linear Regression. The calculator will also provide you with the correlation coefficient, r = 0.9509. This value is very close to 1, which suggests a strong increasing linear relationship.

Note: For some calculators, the Diagnostics must be turned "on" in order to get the correlation coefficient when linear regression is performed: [2nd]>[0]>[alpha][x–1], then scroll to DIAGNOSTICSON.

Got questions? Get instant answers now!
Got questions? Get instant answers now!

Fitting a regression line to a set of data

Once we determine that a set of data is linear using the correlation coefficient, we can use the regression line to make predictions. As we learned above, a regression line is a line that is closest to the data in the scatter plot, which means that only one such line is a best fit for the data.

Questions & Answers

By the definition, is such that 0!=1.why?
Unikpel Reply
(1+cosA+IsinA)(1+cosB+isinB)/(cos@+isin@)(cos$+isin$)
Ajay Reply
hatdog
Mark
how we can draw three triangles of distinctly different shapes. All the angles will be cutt off each triangle and placed side by side with vertices touching
Shahid Reply
bsc F. y algebra and trigonometry pepper 2
Aditi Reply
given that x= 3/5 find sin 3x
Adamu Reply
4
DB
remove any signs and collect terms of -2(8a-3b-c)
Joeval Reply
-16a+6b+2c
Will
is that a real answer
Joeval
(x2-2x+8)-4(x2-3x+5)
Ayush Reply
sorry
Miranda
x²-2x+9-4x²+12x-20 -3x²+10x+11
Miranda
x²-2x+9-4x²+12x-20 -3x²+10x+11
Miranda
(X2-2X+8)-4(X2-3X+5)=0 ?
master
The anwser is imaginary number if you want to know The anwser of the expression you must arrange The expression and use quadratic formula To find the answer
master
The anwser is imaginary number if you want to know The anwser of the expression you must arrange The expression and use quadratic formula To find the answer
master
Y
master
X2-2X+8-4X2+12X-20=0 (X2-4X2)+(-2X+12X)+(-20+8)= 0 -3X2+10X-12=0 3X2-10X+12=0 Use quadratic formula To find the answer answer (5±Root11i)/3
master
Soo sorry (5±Root11* i)/3
master
x2-2x+8-4x2+12x-20 x2-4x2-2x+12x+8-20 -3x2+10x-12 now you can find the answer using quadratic
Mukhtar
2x²-6x+1=0
Ife
explain and give four example of hyperbolic function
Lukman Reply
What is the correct rational algebraic expression of the given "a fraction whose denominator is 10 more than the numerator y?
Racelle Reply
y/y+10
Mr
Find nth derivative of eax sin (bx + c).
Anurag Reply
Find area common to the parabola y2 = 4ax and x2 = 4ay.
Anurag
y2=4ax= y=4ax/2. y=2ax
akash
A rectangular garden is 25ft wide. if its area is 1125ft, what is the length of the garden
Jhovie Reply
to find the length I divide the area by the wide wich means 1125ft/25ft=45
Miranda
thanks
Jhovie
What do you call a relation where each element in the domain is related to only one value in the range by some rules?
Charmaine Reply
A banana.
Yaona
a function
Daniel
a function
emmanuel
given 4cot thither +3=0and 0°<thither <180° use a sketch to determine the value of the following a)cos thither
Snalo Reply
what are you up to?
Mark Reply
nothing up todat yet
Miranda
hi
jai
hello
jai
Miranda Drice
jai
aap konsi country se ho
jai
which language is that
Miranda
I am living in india
jai
good
Miranda
what is the formula for calculating algebraic
Propessor Reply
I think the formula for calculating algebraic is the statement of the equality of two expression stimulate by a set of addition, multiplication, soustraction, division, raising to a power and extraction of Root. U believe by having those in the equation you will be in measure to calculate it
Miranda
Practice Key Terms 5

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play




Source:  OpenStax, Algebra and trigonometry. OpenStax CNX. Nov 14, 2016 Download for free at https://legacy.cnx.org/content/col11758/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Algebra and trigonometry' conversation and receive update notifications?

Ask