Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using C++, create a program to calculate a linear model of some (x,y) data pairs

ID: 3542498 • Letter: U

Question

Using C++, create a program to calculate a linear model of some (x,y) data pairs using least squares regression

Your user will enter the data points.

Requirements:

1.Create an algorithm for this problem using either a flowchart or pseudocode. Use your algorithm to work through a simple example (below).

2.Allow the user to enter the x and y coordinates of an arbitrary number of data points.

(Provide a way for the user to enter points until they are finished.)

3.Use the formulas given to calculate m and b for the best-fit line.

4.Display the linear model (in y = mx + b form) on the screen for the user.

5.Optional: calculate and display the correlation coefficient.

Notes:

You may use the Point class that you created last week, or you may use standard C++ data types (double) for the coefficients of the points.

Test your algorithm (and the C++ program) with a very simple example. The following two or more points will produce the equation y = x + 0.0 with R2 = 1.0:

(0,0) and (n,n) where n is any number


Full equations and details HERE: http://i.imgur.com/7mM9dRr.png

Using C++, create a program to calculate a linear model of some (x,y) data pairs using least squares regression Your user will enter the data points. Requirements: Create an algorithm for this problem using either a flowchart or pseudocode. Use your algorithm to work through a simple example (below). Allow the user to enter the x and y coordinates of an arbitrary number of data points. (Provide a way for the user to enter points until they are finished.) Use the formulas given to calculate m and b for the best-fit line. Display the linear model (in y = mx + b form) on the screen for the user. Optional: calculate and display the correlation coefficient. Notes: You may use the Point class that you created last week, or you may use standard C++ data types (double) for the coefficients of the points. Test your algorithm (and the C++ program) with a very simple example. The following two or more points will produce the equation y = x + 0.0 with R2 = 1.0: (0,0) and (n,n) where n is any number

Explanation / Answer

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote