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...
-
(a) Find the differential dy (b) evaluate dy for the given values of and dx. 1. y = ex/10, x = 0, dx = 0.1 2. y = 3 + x2, x = 1, dx = - 0.1
-
Refer to the data in Short Exercise. Prepare Daves unclassified balance sheet at December 31, 2015. Use the accountform. DAVE HAIR STYLISTS Adjusted Trial Balance December 31, 2015 Balance Debit...
-
Find the mean and the standard deviation of the distribution of each of the following random variables (having binomial distributions): (a) The number of heads in 440 flips of a balanced coin. (b)...
-
Savage Motors sells and leases commercial automobiles, vans, and trucks to customers in southern California. Most of the company's administrative staff works in the main office. The company has been...
-
Marin Company produces two software products ( Cloud - X and Cloud - Y ) in two separate departments ( A and B ) . These products are highly regarded network maintenance programs. Cloud - X is used...
-
Newlyweds Jamie Lee and Ross have had several milestones in the past year. They are newly married, recently purchased their first home, and now have twins on the way! Jamie Lee and Ross have to...
-
Calculate the E cell value at 298K for the cell basedon the reaction: Cu(s) + 2Ag + (aq) ----> Cu +2 (aq)+ 2Ag(s) where [Ag + ]= 0.00475 M and [Cu +2 ]=0.000900M.
-
A natural monopoly has: a. numerous competitors b. large fixed costs c. large variable costs d. zero fixed costs
-
The United States is an example of: a . a command economy b . a market economy c . a mixed economy d . none of the other three answers
-
Which good is a homogeneous product? a. furniture b. automobile c. wheat d. toothpaste
-
In a market economy, resources are allocated by: a . prices b . whoever is in charge c . an elected group of officials d . a disaster
-
Four processes are shown in the following fi gure. Each process occurs in a well-insulated piston cylinder assembly and starts from the same initial state, state 1. Put the fi nal temperatures in...
-
For public and mass communication, make an observation how the following communication was delivered. Highlight its differences. News on TV Product Advertising Public Service Radio Broadcasting (no...
-
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...
-
Few things are more irritating than a dripping tap. Taps drip because the rubber washer is worn or the brass seat is pitted by corrosion, or both. Ceramics have good wear resistance, and they have...
-
Polyethylene bottles are used to contain fluids as various as milk and engine oil. A typical polyethylene bottle weighs about 30 grams and has a wall thickness of about \(0.8 \mathrm{~mm}\). The...
-
As weight-saving assumes greater importance in automobile design, the replacement of steel parts with polymer-composite substitutes becomes increasingly attractive. Weight can be saved by replacing a...
Study smarter with the SolutionInn App