## Description

- We have a few data files each of them having a set of values for two variables (say x & y), one pair per line in the data file. We are trying to determine if there is a linear relationship between them.
- You are given a set of regression functions in a module. Apply the algorithms and graphically plot the linear relationship if any for the data present in each file. Also print the results (to the output) of your numerical computation to the output as you go along so that your graphical results correlate with the numerical results.
- The two techniques used in the program are (1) Method of Least Squares that gives us a Coefficient of Determination about the linearity of the relationship and also allows us try and fit a line along a possible linear path (2) Pearson technique which gives us a Correlation Coefficient about the linearity of the relationship
- The four data files are in1, in2, in3 and in4. Run the program against a data file and observe the results

• In order to plot the relationship of x and y, do the following:

- (1)Plot x vs y as scatterplot(2)Plot x vs f(x) as a line plot
- Apply appropriate text in the plot for axes, title, as well as the coefficient of determination (from Least Squares) and Pearson coefficient (from Pearson). Your plots should also show me all meaningful information to infer whether or not the visualization and numerical results agree with each other.
- If you are done with one data file, repeat the process for all four of them to appear in the same figure window as sub plot

### Unformatted Attachment Preview

Purchase answer to see full attachment

## Explanation & Answer

Hi,Uploading the solution for first probl...