You are on page 1of 15

Least-Squares Regression

Computations
Appendix 2A

PowerPoint Authors:
Susan Coomer Galbreath, Ph.D., CPA
Charles W. Caldwell, D.B.A., CMA
Jon A. Booker, Ph.D., CPA, CIA
Cynthia J. Rooney, Ph.D., CPA
Copyright © 2015 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
2A-2

Learning Objective 8

Analyze a mixed cost


using a scattergraph plot
and the least-squares
regression method.
2A-3

The Data Set


Matrix,
Matrix, Inc.
Inc. wants
wants toto
know
know itsits average
average
fixed
fixed cost
cost and
and
variable
variable cost
cost per
per
meals
meals served.
served.
Using
Using the
the data
data to
to the
the
right,
right, let’s
let’s see
see how
how toto
do
do aa Scattergraph
Scattergraph
plot
plot using
using Microsoft
Microsoft
Excel.
Excel.
2A-4

Scattergraph Plot
Highlight
Highlight Cells
Cells C4
C4
through
through D19.
D19.
from
from the
the Insert
Insert Menu
Menu inin
Excel,
Excel, select
select
Graph.
Graph. andand the
the
Scattergraph
Scattergraph withwith
no
no lines.
lines. You
You should
should
produce
produce aa graph
graph that
that
looks
looks similar
similar to
to the
the one
one
shown
shown on on the
the right.
right.
2A-5

Scattergraph Plot

Right
Right click
click on
on any
any
of
of the
the grid
grid values
values
and
and enter
enter the
the text
text
as
as shown.
shown. The
The XX
axis
axis should
should read
read
“Units
“Units (Meals),
(Meals), and
and
the
the YY axis
axis should
should
read
read Total
Total Cost.
Cost.
2A-6

Scattergraph Plot
Right
Right click
click on
on any
any
data
data point
point in
in the
the
scattergraph
scattergraph plot plot and
and
selecting
selecting “Add
“Add
Trendline”
Trendline” fromfrom the
the
graph
graph submenu.
submenu. The The
relationship
relationship appears
appears to
to
be
be linear,
linear, so
so wewe can
can
apply
apply the
the regression
regression
model.
model.
2A-7

Simple Regression Using Excel


You
You will
will need
need three
three pieces
pieces of
of
information
information from
from your
your
regression
regression analysis:
analysis:
1.
1. Estimated
Estimated Variable
Variable Cost
Cost Per
Per
Unit
Unit (line
(line slope)
slope)
2.
2. Estimated
Estimated Fixed
Fixed Costs
Costs (line
(line
intercept)
intercept)
3.
3. Goodness
Goodness of of fit,
fit, or
or R
R22
To
To get
get these
these three
three pieces
pieces
information
information we
we will
will need
need to to use
use
three
three Excel
Excel functions
functions in in the
the
Statistical
Statistical Group
Group ofof special
special
functions.
functions.
SLOPE,
SLOPE, INTERCEPT,
INTERCEPT, and
and RSQ
RSQ
2A-8

Simple Regression Using Excel

Place
Place your
your cursor
cursor in
in cell
cell F4
F4 and
and press
press the
the == key.
key.
Click
Click on
on the
the pull
pull down
down menu
menu andand scroll
scroll down
down toto
“Statistical”
“Statistical” and
and scroll
scroll until
until you
you see
see “Slope.”
“Slope.”
2A-9

Simple Regression Using Excel

For
For “Known_y’s”
“Known_y’s” highlight
highlight cells
cells D4
D4 through
through D19,
D19, and
and
for
for “Known_x’s”
“Known_x’s” highlight
highlight cells
cells C4
C4 through
through C19.
C19.
Notice
Notice the
the Slope
Slope is
is calculated
calculated atat 2.7684.
2.7684.
2A-10

Simple Regression Using Excel

Place
Place your
your cursor
cursor in
in cell
cell F5
F5 and
and press
press the
the == key.
key.
Click
Click on
on the
the pull
pull down
down menu
menu andand scroll
scroll down
down toto
“Statistical”
“Statistical” and
and scroll
scroll until
until you
you see
see “Intercept.”
“Intercept.”
2A-11

Simple Regression Using Excel


Here is the
estimate of the
fixed costs.

1.
1. In
In the
the Known_y’s
Known_y’s box,
box, enter
enter D4:D19
D4:D19 for
for the
the range.
range.
2.
2. In
In the
the Known_x’s
Known_x’s box,
box, enter
enter C4:C19
C4:C19 for
for the
the range.
range.
2A-12

Simple Regression Using Excel

Finally,
Finally, we
we will
will determine
determine the
the ““goodness
goodness ofof fit
fit”,”, or
or R
R22,, by
by
using
using the
the RSQ
RSQ function.
function. Move
Move your
your cursor
cursor toto Cell
Cell F6.
F6.
2A-13

Simple Regression Using Excel

Here is the
estimate of R2.

1.
1. In
In the
the Known_y’s
Known_y’s box,
box, enter
enter D4:D19
D4:D19 for
for the
the range.
range.
2.
2. In
In the
the Known_x’s
Known_x’s box,
box, enter
enter C4:C19
C4:C19 for
for the
the range.
range.
2A-14

Simple Regression Using Excel

Notice
Notice that
that Excel
Excel depicts
depicts its
its least-squares
least-squares
regression
regression equation
equation as
as Y
Y == bX
bX ++ a.
a. We
We
can
can easily
easily rearrange
rearrange with
with equation.
equation.
2A-15

End of Appendix 2A

You might also like