You are on page 1of 6

How to do regression analysis using excel spreadsheets v2

1. set up your data set, in this examples I want to see if there is a


relationship between the height of a child and their age [the
figures are made up
Here is my [imaginary] data set
Age
height in
cm
3 1
! 11"
" 1#$
% 1%$
& 1&'
$ 1$"
' 1'&
1 #
11 #1
#. highlight the data set
Age
height in
cm
3 100
4 115
5 128
6 168
7 179
8 185
9 197
10 200
11 210
3. lets do a graph( we want a scatter plot, with age along the
hori)ontal axis [the * +alue] and height on the +ertical axis [the ,
+alue]
a. select the type of chart, we want scatterplots
b. now we chose the data points
c. -ow we add legends, and chart titles
i. Age will appear on the * axis
ii. Height will appear on the , axis
d. And finally we get this graph
Height in cm
0
50
100
150
200
250
0 2 4 6 8 10 12
Age in Years
H
e
i
g
h
t

i
n

C
m
s
Height in cm
Fitting a regression line
.o fit a regression line to the graph, select /HA0. and A11 .02-13I-2
.his will gi+e you a number of possible options, select 3I-2A0 [the
default option] clic4 56
.he graph should now loo4 li4e this(
.o display the formula for the regression line, right clic4 on the
regression line, this should bring up the following dialogue box,
Chart Comparing Age and Height
0
50
100
150
200
250
0 5 10 15
Age in years
H
e
i
g
h
t

i
n

c
m
s
height in cm
Linear (height in cm)
,ou now want 7508A. .02-13I-2
.his will gi+e you the following box, select options from the top menu of
this box, chec4 display formula on chart, and display 0 9:uared statistic,
the clic4 56
0eposition the formula and 0 s:uared statistic by dragging away from the
graph
.he final chart should loo4 as follows(
,es but what does it all mean
;<29.I5-(
1. How tall will the adult be at #
#. How tall will the adult be at 3
3. what is the problem with this analysis
Chart Comparing Age and Height
y = 14.167 ! 65.5
"
2
= 0.#28$
0
50
100
150
200
250
0 5 10 15
Age in years
H
e
i
g
h
t

i
n

c
m
s
Height in cm
Linear (height in cm)

You might also like