Can I get help with this code?


In C++ language please!!!

Suppose we have a set of data consisting of ordered pairs and we suspect
the x and y coordinates are related. It is natural to try to find the best line that
fits the data points. If we can find this line, then we can use it to make all sorts
of other predictions. In this project, we're going to use several functions to find
this line using a technique called least squares regression. The result will be
what we call the least squares regression line (or LSRL for short).
In order to do this, you'll be able to reuse some code you've already written
(improve it if necessary, of course), as the LSRL is more or less based on
statistical calculations we've already automated. You'll need to program one
new statistical computation called the correlation coefficient, denoted by r in
statistical symbols:

r = 1/ (n-1) SUM ((x initial -x / Sx ) * (y initial - y / Sy )

Once you have the correlation coefficient, you use it along with the sample
means and sample standard deviations of the x and y-coordinates to compute
the slope and y-intercept of your regression line via these formulas:



By the way, this is another of those numerical methods that computers do so
well. While it's possible to compute an LSRL by hand, automating all of the tedious calculations makes sense, and leaves us to spend our time interpreting
our results in a practical context.

http://www.slideshare.net/guilhermetorres7921/project-37831709
Full Project is on this website in pdf! No virus. Thanks!!!
Last edited on
Please note, that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attemts to solve this problem youself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
Topic archived. No new replies allowed.