Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1 2 2 • E = 0.005 2.3 10 2.6 30 3 47 In this problem, your task is to find the least squares regression line for this data. (a) Find the least squares regression line for the given data using QR factorization of the design matrix. You are encouraged to get computer assistance in this part. For example, two python functions that can be used are numpy.linalg.qr and scipy.linalg.qr. (Hint: First you should use the given data to construct the design matrix.) (b) In this part, you will use gradient descent method to compute the same least squares regression line numerically. Since it is not feasible to perform the necessary computation manually, a reasonable way is to write a small function in any computer program to carry out the task for you. In the web, there are many pages that describes how to do it using python; you can even make use of them. But you must first understand the mathematical formulation of the problem, of course. You can use the following parameters, although you are free to change them as long as your algorithm converges to a solution. Initial point: may be xo = (0, 0) or Xo = (1, 1) or any randomly generated point Learning rate: a = 0.001 Stopping criterion: ||Vf|| < € NOTE: Whenever you take computer assistance, please include the relevant prints/screenshots in your homework. Consider the six data points given in the table below. 1.5 1.9 6 Xi Yi 1 2 2 • E = 0.005 2.3 10 2.6 30 3 47 In this problem, your task is to find the least squares regression line for this data. (a) Find the least squares regression line for the given data using QR factorization of the design matrix. You are encouraged to get computer assistance in this part. For example, two python functions that can be used are numpy.linalg.qr and scipy.linalg.qr. (Hint: First you should use the given data to construct the design matrix.) (b) In this part, you will use gradient descent method to compute the same least squares regression line numerically. Since it is not feasible to perform the necessary computation manually, a reasonable way is to write a small function in any computer program to carry out the task for you. In the web, there are many pages that describes how to do it using python; you can even make use of them. But you must first understand the mathematical formulation of the problem, of course. You can use the following parameters, although you are free to change them as long as your algorithm converges to a solution. Initial point: may be xo = (0, 0) or Xo = (1, 1) or any randomly generated point Learning rate: a = 0.001 Stopping criterion: ||Vf|| < € NOTE: Whenever you take computer assistance, please include the relevant prints/screenshots in your homework.
Expert Answer:
Answer rating: 100% (QA)
a To find the least squares regression line using QR factorization of the design matrix we need to c... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these mathematics questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
This case was written by Professor Michele Greenwald, Visiting Professor of Marketing at HEC Paris, for use with Advertising and Promotion: An Integrated Marketing Communications Perspective 7th...
-
Hi there , I need help. for my work i need a relevant and well written introduction as well as conclusion to the following below. My work is complete i just need a introduction and conclusion please...
-
In Exercises find the second derivative of the function. f(x) = x sin x
-
Use Fishers LSD method with a = 0.05 test to analyze the means of the three flow rates in Exercise 13-2.
-
(Classification of Liabilities) Presented below are various account balances. (a) Bank loans payable of a winery, due March 10, 2014. (The product requires aging for 5 years before sale.) (b)...
-
The Judicial Council of California has developed a number of forms that can be used to ensure that a party has satisfied the necessary pleading requirements. Familiarize yourself with the...
-
A gas containing methane, ethane, and carbon dioxide is analyzed with a gas chromatograph (GC) and flame ionization detector (FID): the GC separates the components of the gas and the FID registers...
-
A store sells widgets and is supplied by three major subcontractors. Subcontractor A is the more reliable company and only 2% of their widgets are defective. As such, company A makes 50% of the...
-
Keeper Corporations income statement for the year ended June 30, 2014, and its comparative balance sheets for June 30, 2014 and 2013 follow. Keeper Corporation Income Statement For the Year Ended...
-
b a d Question 6 (15 points) Find a topological ordering of the graph in Figure 3. e Figure 3: Graph used in Question 6
-
Find the optimal portfolio for a target Active Risk of 5% per year, assuming that short-positions are allowed, but now adding the constrains that the beta of the optimal portfolio with respect to the...
-
What three leadership theories would best support organizational change in Starbucks' Mission and Values? How do these three theories compare?
-
1. market analysis from kwong woh hing 2. ad words stratergy ( PREMIUM RANGE ) - ad groups and their key rationale - three text ads - how the text ads are different. from each other - 20 key words...
-
Examine the principles of protein folding and misfolding, exploring how chaperone proteins assist in correct protein folding and prevent protein aggregation, and discuss the pathological consequences...
-
Analyze the evolutionary adaptations of extremophiles to their harsh environmental niches, focusing on the molecular mechanisms underlying extremophilic traits such as thermotolerance, halotolerance,...
-
A company uses the weighted average method to calculate the cost of inventory. At the end of the period, 22,000 units were in ending work-in-process inventory and are 100% complete for materials and...
-
Gordon and Lisa estimate that they will need $1,875,000 in 40 years for their retirement years. If they can earn 8 percent annually on their funds, how much do they need to save annually?
-
Indicate whether each of the items listed below would be included (I) in or excluded (E) from gross income for the 2012 tax year. ________a. Welfare payments ________b. Commissions ________c. Hobby...
-
Diane is a single taxpayer who qualifies for the earned income credit. Diane has two qualifying children who are 3 and 5 years old. During 2012, Diane's wages are $17,100 and she receives dividend...
-
Jim (age 50) and Martha (age 49) are married with three dependent children. They file a joint return for 2012. Their income from salaries totals $50,000, and they received $10,000 in taxable...
-
Find the distance s and the force F on the seesaw fulcrum shown in the figure. Assume that the system is in equilibrium. 20 lb ks- F -24 ft- 10 lb
-
A jet airplane is climbing at a constant airspeed in nowind conditions. The plane is directly over a point on the ground that is 4 statute miles from the takeoff point and the altimeter reads 15 840...
-
The airplane in Problem 6 starts from a brakeslocked position on the runway. The airplane takes off at an airspeed of 200 fps. Find the time for the aircraft to reach takeoff speed.
Study smarter with the SolutionInn App