Consider the line y = mx + b and the point (x0, y0). Here we look...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the line y = mx + b and the point (x0, y0). Here we look at only the vertical distance, which is the difference between the y value of the point and the y value of the line at the same x value. This difference is sometimes called a residual. Specific case: You have done three experiments, leading to the following three results correlating the x value and the y value: (1, 2), (2, 4), (3, 5). We are going to fit a line to the data as follows: we shall find the line that minimizes the sum of the squares of the residuals between these points and the line. We use the square partially because the square is always positive, so we do not have to worry about signs. It is much easier to work with squares than with absolute values. i. Consider the line y = mx + b and the point (x0, y0). Find an expression for the vertical distance between the line and the point, i.e. the residual. ii. Now assume we have a line y = mx + b, and the points above. What are the three residuals. Note that your answers will have m's and b's in them. iii. The function D(m, b), represents the sum of the squares of the residuals: i.e., you square each residual and add the results. Write a formula for D(m, b). iv. Optimize D(m, b) by taking the partial derivative with respect to each of the two variables and setting them equal to zero. This will lead to two linear equations in two unknowns. v. Solve the equations to find the values of m and b. vi. Draw a graph with the three points and the line to make sure it looks reasonable. If it doesn't: return to ii. vii. Check your answer by going to the Wolfram Alpha website and typing: 'best fit line (1,2), (2,4), (3,5). If you have the wrong answer: return to ii. General case. Do exactly what you did above but instead of the three specific points, use k points with unknown values: (x0, y0), (x1, y1)... (xk-1, yk-1) i. Again, the function D(m, b) represents the sum of the squares of the residuals. Write a formula for D(m, b). It is easier now, and will be much easier in the next part, if you work with these quantities using sigma notation. For example, write the sum x0+ x1 ++xk-1 as Σ xi. ii. Now optimize D(m, b). Take the partial derivatives with respect to each of the two variables and set the results equal to zero. This, again, will lead to two linear equations in two unknowns. Note that it is very important that we think of the (x, y) points as constants, even though we do not know their values. iii. Solve the two equations to the extent that they are each written in the following form: b = a fraction that involves a m, xi, yi, k and preferably Sigma signs Note that all symbols may not be needed to present the equations in their required form iv. Use your equations from iii to find the equation of the best-fit line to the following data: (1,2). (1.3). (2,4), (2.2), (4,8), (3.5), (4,5). When you plug in the data, you should end up with two linear equations in two unknowns v. Manipulate your equations from iii to end up with one of the standard equations for linear regression. Take your two equations of the form b = something and set the two somethings equal to each other. Cross multiply and manipulate. Consider the line y = mx + b and the point (x0, y0). Here we look at only the vertical distance, which is the difference between the y value of the point and the y value of the line at the same x value. This difference is sometimes called a residual. Specific case: You have done three experiments, leading to the following three results correlating the x value and the y value: (1, 2), (2, 4), (3, 5). We are going to fit a line to the data as follows: we shall find the line that minimizes the sum of the squares of the residuals between these points and the line. We use the square partially because the square is always positive, so we do not have to worry about signs. It is much easier to work with squares than with absolute values. i. Consider the line y = mx + b and the point (x0, y0). Find an expression for the vertical distance between the line and the point, i.e. the residual. ii. Now assume we have a line y = mx + b, and the points above. What are the three residuals. Note that your answers will have m's and b's in them. iii. The function D(m, b), represents the sum of the squares of the residuals: i.e., you square each residual and add the results. Write a formula for D(m, b). iv. Optimize D(m, b) by taking the partial derivative with respect to each of the two variables and setting them equal to zero. This will lead to two linear equations in two unknowns. v. Solve the equations to find the values of m and b. vi. Draw a graph with the three points and the line to make sure it looks reasonable. If it doesn't: return to ii. vii. Check your answer by going to the Wolfram Alpha website and typing: 'best fit line (1,2), (2,4), (3,5). If you have the wrong answer: return to ii. General case. Do exactly what you did above but instead of the three specific points, use k points with unknown values: (x0, y0), (x1, y1)... (xk-1, yk-1) i. Again, the function D(m, b) represents the sum of the squares of the residuals. Write a formula for D(m, b). It is easier now, and will be much easier in the next part, if you work with these quantities using sigma notation. For example, write the sum x0+ x1 ++xk-1 as Σ xi. ii. Now optimize D(m, b). Take the partial derivatives with respect to each of the two variables and set the results equal to zero. This, again, will lead to two linear equations in two unknowns. Note that it is very important that we think of the (x, y) points as constants, even though we do not know their values. iii. Solve the two equations to the extent that they are each written in the following form: b = a fraction that involves a m, xi, yi, k and preferably Sigma signs Note that all symbols may not be needed to present the equations in their required form iv. Use your equations from iii to find the equation of the best-fit line to the following data: (1,2). (1.3). (2,4), (2.2), (4,8), (3.5), (4,5). When you plug in the data, you should end up with two linear equations in two unknowns v. Manipulate your equations from iii to end up with one of the standard equations for linear regression. Take your two equations of the form b = something and set the two somethings equal to each other. Cross multiply and manipulate.
Expert Answer:
Answer rating: 100% (QA)
i The vertical distance between the line and the point is the residual and is expressed as residual y0 mx0 b ii The three residuals for the given poin... View the full answer
Related Book For
Posted Date:
Students also viewed these economics questions
-
If for all x, write a formula for b8.
-
Write a formula for the marginal cost of production when y centiliters are produced. Your formula gives the marginal cost in dollars per centiliter. Express the same formula in terms of dollars per...
-
Using the descriptions in Section 16.13.c, write a formula for a. Chitin b. Pectinright
-
Alleghany Community College operates four departments. The square footage used by each department is shown below. Alleghany's annual building rental cost is $320,000 What amount of rent expense that...
-
The Excel file Auto Survey contains a sample of data about vehicles owned, whether they were purchased new or used, and other types of data. Use the Descriptive Statistics tool to summarize the...
-
A(n) ________ is a sudden, permanent change in a sequence of DNA. a. Allele b. Chromosome c. Epigenetic d. Mutation
-
Distinguish between the main approaches to impact assessment. Explain the three steps that lead to construction of an EIA index. Can environmental impact added ever be negative?
-
Assume that LBJ Group (LBJ), a European engineering firm, engaged in the following six transactions during the year ended December 31, Year 3. LBJ applies U.S. GAAP and reports its results in...
-
The first production department of Stone Incorporated reports the following for April. Direct Materials Units Beginning work in process inventory 70,000 Percent Complete 60% Conversion Percent...
-
Paste Clipboard A1 3 4 5 6 1.000 7 8 9 10 11 FILE 2 12 13 14 15 5 6 16 1. Prepare a bank reconciliation using a company's bank statement and cash account. HOME Date June 1 3 8545NOWO A 10 13 A B ...
-
Short term debt owed to other companies with no formal debt instrument, typically for items already purchased by your company, is referred to as: A. Notes Payable B. Accounts Receivable C. Accounts...
-
The team is in the process of completing the work breakdown structure of the project. Once they have completed this, which of the following can they begin to work on? a. Estimating costs b....
-
Payroll is often used as a good example of batch processing using sequential files. Explain why.
-
Define internal energy and enthalpy.
-
The project manager always involves the team in the creation of the work breakdown structure. What is the most significant benefit derived from this approach? a. Generation of a more accurate...
-
What are three input controls?
-
f(x)=x- 4 x f is increasing on the intervals f is decreasing on the interval f has a local maximum value of and at He
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19 year-old nanny $125 per week for 48 weeks during the current year. a. What is the employers portion of...
-
True or false? (a) The transpose of a column vector is a row vector. (b) The matrix product bc of a row vector b with n elements times a column vector c with n elements is a scalar. (c) The diagonal...
-
Verify Eq. (13.79) for a Ïh reflection. In Equation 13.79 a
-
(a) Show that for the orbital-angular-momentum eigenfunctions, the smallest possible value for the angle between L and the z axis obeys the relation cos2 = l/ (l + 1). (b) As l increases, does this...
-
Derive coefficients \[ C_{j k}=\frac{2}{\sqrt{ho a b}} \] using the normalization procedure given for \(W_{j k}\) by Equation 8.40. == Wik(x, y) Cik sin aja sin Yky, or Wjk (x, y) =Cjk sin x : sin...
-
Show how the parameters \(k_{i j}\) and \(m_{i j}\) are derived.
-
Derive Equations 8.54. m =mydx = = mL 5 mL = m12 myydx= m21 mamy dx = k11=EIYdx= 6 mL 7 (8.54) 4EI 6EI k12 = SEIYYdx= -k21 12EI k22=EIYdx
Study smarter with the SolutionInn App