Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Linear Regression create a set of points like this ( all on one line ) p = [[0,3.8414709848078967],[0.6931471805599453,6.6818861490654635],[1.0986122886681098,7.5355691627323065],[1.3862943611198906,7.788374949171635],[1.6094379124341003,8.478827375073264],[1.791759469228055,9.887622378713294],[1.9459101490553132,11.440627194940042],[2.0794415416798357,12.307124413342725]] where: p[i][0] is an x value and

Linear Regression

create a set of points like this ( all on one line )

p = [[0,3.8414709848078967],[0.6931471805599453,6.6818861490654635],[1.0986122886681098,7.5355691627323065],[1.3862943611198906,7.788374949171635],[1.6094379124341003,8.478827375073264],[1.791759469228055,9.887622378713294],[1.9459101490553132,11.440627194940042],[2.0794415416798357,12.307124413342725]]

where:

p[i][0] is an x value

and p[i][1] is the corresponding y value

Find the least square curve that best matches these points using linear regression.

I need four outputs:

n = number of points

m = slope

b = y intercept

r = coefficient of regression.

formulas that might help:

n = p.length

m = (n* xy - x* y)/(n* xx - x* x)

b = ( y - m* x)/n

r = (n* xy - x* y)/sqrt((n* xx - x* x)*(n* yy- y* y))

write a program in notepad++.

hypertext markup language.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions