Regression Assignment / Business Calculus
REGRESSION ASSIGNMENT
Due: January 20, 2017 In real-world applications we often encounter numerical data in the form of a table. The
powerful mathematical tool Regression Analysis is a process for finding a function that provides a useful model for a set of data points. One uses computer software to create a graph (a scatter plot) of the set of points and find the function of best fit. The function can then be used to predict values of the dependent variable y for any given value of the independent variable x.
Review §1.3, 2.3, 2.5, of the textbook and try the following example before starting the assignment.
1. Example
Prices for round-shaped diamonds taken from an online trader are given in Table 1. Weight is the independent variable x and price is the dependent variable y. We will analyze this data in the computer.
For Windows users, I suggest using Excel (Microsoft Office). For Mac users, I suggest using Numbers (iWork ’09 or higher). If you do not have this software, it is available in the university computer labs. More information about the available software can be found at
http://its.uncg.edu/Software/.
For Excel and Numbers, enter chart into the Help menu to find out how to create charts, and enter trend into the Help menu to find detailed instructions on creating and manipu- lating trendlines for data series.
In Excel, you can adjust the precision in the trendline equations by clicking on the trendline equation.
Table 1. Prices for round-shaped diamonds
Weight (carats) Price ($)
0.5 2790 0.6 3191 0.7 3694 0.8 4154 0.9 5018 1.0 5898
(1) Enter the data into a spreadsheet (including the header Weight and Price). (2) Create a scatter plot of the data. Note that the scatter plot for this data appears
roughly linear. (3) Compute the linear regression equation (trendline). The trendline will be y = ax + b
for some values of a and b. (4) Adjust the minimum/maximum values on the axes of the graph to 0.4 and 1.2 for
the weight and 2000 and 6500 for the price to make the graph look nice. 1
http://its.uncg.edu/Software/
2 MAT 120-81D REGRESSION ASSIGNMENT
A sample of the output created on Mac Numbers is given below. The regression equation y = 6137.4x−478.9 is on the graph. To predict the price of a diamond weighing 0.85 carats, calculate price by plugging in x = 0.85 into the regression equation
y = 6137.4(0.85) − 478.9 = $4737.89.
Weight (carats)
Price ($)
0.5 $2,790.00 0.6 $3,191.00 0.7 $3,694.00 0.8 $4,154.00 0.9 $5,018.00 1.0 $5,898.00
$2,000.00
$3,125.00
$4,250.00
$5,375.00
$6,500.00
0.4 0.6 0.8 1 1.2
y = 6137.4x - 478.9
Diamond prices
Weight (carats) Price
Diamond Prices for round-shaped diamonds
Predicted price for 0.85 carat diamond: $4,737.89
2. Assignment
Complete the following exercises in Excel, Numbers, or similar software. Save your work often. You answers should be entered in the Regression Assignment under the TESTS tab of MyMathLab. Your work can be submitted any time before the due date.
Exercises.
(1) Table 2 contains price-supply data and price-demand data for soybeans. • Enter the data into a spreadsheet. • Create the scatter plots for the price-supply, where x is the supply (in billions
of bushels) and y is the price (in dollars). • Adjust the minimum and maximum of the axes of each plot to slightly below
and slightly above the data values. • Compute the regression equations for supply using linear regression on each of
the plots. The trendline will be y = ax + b for some values of a and b. Round a and b to 3 decimal places.
(2) Table 3 contains data for fuel consumption (mpg) of an outboard motor at various rpm.
MAT 120-81D REGRESSION ASSIGNMENT 3
Table 2. Supply for soybeans.
Supply (billion bu) Price ($/bu)
1.55 5.11 1.86 5.55 1.94 5.78 2.08 6.15 2.15 6.20 2.27 6.45
• Enter the data into a spreadsheet so that x represents the rpm in thousands. e.g. enter x = 1.5 for 1500, enter x = 2.0 for 2000 etc. • Create the scatter plot for the fuel consumption y (mpg) as a function of engine
speed x (rpm). • Adjust the minimum and maximum of the axes of each plot to slightly below
and slightly above the data values. • Compute the regression equation using quadratic (polynomial order 2) regres-
sion. The trendline will be y = ax2 +bx+c for some values of a, b, and c. Round a, b, and c, to 3 decimal places. • Use your regression equation to estimate the fuel consumption at 2100 rpm
(x = 2.1).
Table 3. Fuel consumption for outboard motor.
rpm mpg
1500 8.4 2000 6.5 2500 4.8 3000 4.0 3500 3.7
1. Example
2. Assignment
Exercises