// Instructions: // (1) First display the points by compiling and executing. // (2) Un-comment the least-squares section, add code to // apply least-squares. Then compile and execute. import edu.gwu.lintool.*; public class RegressionExample { public static void main (String[] argv) { // The data: int n = 8; double[] x = {1, 1.5, 2, 3.6, 5, 6.2, 8.5, 9}; double[] y = {3.6, 3.9, 3.9, 5.1, 5.2, 6.0, 7.4, 7.2}; // Display the points. DrawTool.display (); DrawTool.setXYRange (0,10, 0,10); for (int i=0; i