# 4.3 Fitting linear models to data  (Page 3/14)

 Page 3 / 14

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\left(c\right)=30.281+1.143c$

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 $\text{\hspace{0.17em}}r\text{\hspace{0.17em}}$ 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 $\text{\hspace{0.17em}}r\text{\hspace{0.17em}}$ 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 coefficient

The correlation coefficient is a value, $\text{\hspace{0.17em}}r,$ between –1 and 1.

• $r>0\text{\hspace{0.17em}}$ suggests a positive (increasing) relationship
• $r<0\text{\hspace{0.17em}}$ 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 $\text{\hspace{0.17em}}r\text{\hspace{0.17em}}$ Enter the inputs and corresponding outputs and select the Linear Regression. The calculator will also provide you with the correlation coefficient, $\text{\hspace{0.17em}}r=0.9509.\text{\hspace{0.17em}}$ 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.

## 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.

Cos45/sec30+cosec30=
Cos 45 = 1/ √ 2 sec 30 = 2/√3 cosec 30 = 2. =1/√2 / 2/√3+2 =1/√2/2+2√3/√3 =1/√2*√3/2+2√3 =√3/√2(2+2√3) =√3/2√2+2√6 --------- (1) =√3 (2√6-2√2)/((2√6)+2√2))(2√6-2√2) =2√3(√6-√2)/(2√6)²-(2√2)² =2√3(√6-√2)/24-8 =2√3(√6-√2)/16 =√18-√16/8 =3√2-√6/8 ----------(2)
exercise 1.2 solution b....isnt it lacking
I dnt get dis work well
what is one-to-one function
what is the procedure in solving quadratic equetion at least 6?
Almighty formula or by factorization...or by graphical analysis
Damian
I need to learn this trigonometry from A level.. can anyone help here?
yes am hia
Miiro
tanh2x =2tanhx/1+tanh^2x
cos(a+b)+cos(a-b)/sin(a+b)-sin(a-b)=cotb ... pls some one should help me with this..thanks in anticipation
f(x)=x/x+2 given g(x)=1+2x/1-x show that gf(x)=1+2x/3
proof
AUSTINE
sebd me some questions about anything ill solve for yall
cos(a+b)+cos(a-b)/sin(a+b)-sin(a-b)= cotb
favour
how to solve x²=2x+8 factorization?
x=2x+8 x-2x=2x+8-2x x-2x=8 -x=8 -x/-1=8/-1 x=-8 prove: if x=-8 -8=2(-8)+8 -8=-16+8 -8=-8 (PROVEN)
Manifoldee
x=2x+8
Manifoldee
×=2x-8 minus both sides by 2x
Manifoldee
so, x-2x=2x+8-2x
Manifoldee
then cancel out 2x and -2x, cuz 2x-2x is obviously zero
Manifoldee
so it would be like this: x-2x=8
Manifoldee
then we all know that beside the variable is a number (1): (1)x-2x=8
Manifoldee
so we will going to minus that 1-2=-1
Manifoldee
so it would be -x=8
Manifoldee
so next step is to cancel out negative number beside x so we get positive x
Manifoldee
so by doing it you need to divide both side by -1 so it would be like this: (-1x/-1)=(8/-1)
Manifoldee
so -1/-1=1
Manifoldee
so x=-8
Manifoldee
Manifoldee
so we should prove it
Manifoldee
x=2x+8 x-2x=8 -x=8 x=-8 by mantu from India
mantu
lol i just saw its x²
Manifoldee
x²=2x-8 x²-2x=8 -x²=8 x²=-8 square root(x²)=square root(-8) x=sq. root(-8)
Manifoldee
I mean x²=2x+8 by factorization method
Kristof
I think x=-2 or x=4
Kristof
x= 2x+8 ×=8-2x - 2x + x = 8 - x = 8 both sides divided - 1 -×/-1 = 8/-1 × = - 8 //// from somalia
Mohamed
i am in
Cliff
hii
Amit
how are you
Dorbor
well
Biswajit
can u tell me concepts
Gaurav
Find the possible value of 8.5 using moivre's theorem
which of these functions is not uniformly cintinuous on (0, 1)? sinx
helo
Akash
hlo
Akash
Hello
Hudheifa
which of these functions is not uniformly continuous on 0,1