Question: Create a class for linear regression. The class should contain an array to store the sample data coordinates of ( x , y ) and

Create a class for linear regression. The class should contain an array to store the sample data coordinates of (x,y) and n which is the number of sample data. You may assume the maximum number of data points is 100. The class should contain methods to calculate a,b,r(correlation) and predict the value of y for an input of x. Construct an object of this class and assign the values of (x,y) in the main program. Call the methods in the main program to calculate a,b,r and predict the value of y for an input of x.(Java Program)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!