0% found this document useful (0 votes)
105 views

Tutorial 2 Variance Standard Deviation

This document discusses different ways to automatically fill cells in Excel, including: 1) Filling cells with the same number by selecting a cell, dragging the fill handle, and Excel will populate the cells with the same number. 2) Filling cells with a number series by selecting two cells, dragging the fill handle, and Excel will increment the numbers in the series. 3) Filling cells with different text patterns like "Sample 1", "Sample 2" by dragging the fill handle across selected cells containing text.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views

Tutorial 2 Variance Standard Deviation

This document discusses different ways to automatically fill cells in Excel, including: 1) Filling cells with the same number by selecting a cell, dragging the fill handle, and Excel will populate the cells with the same number. 2) Filling cells with a number series by selecting two cells, dragging the fill handle, and Excel will increment the numbers in the series. 3) Filling cells with different text patterns like "Sample 1", "Sample 2" by dragging the fill handle across selected cells containing text.
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 22

In this tutorial, information is presented in blue

boxes.

An Excel file usually consists of multiple pages


(called Worksheets) that can be accessed by
clicking on tabs that appear at the bottom of the
window.

Instructions are in purple boxes.

Click on the worksheet tabs from left to right to


follow the tutorials on each page.

Exercises are presented in red boxes.

Yellow highlights mark locations referred to in boxes.

You can also use Excel's built-in help function by


pressing F1. Depending on the Excel version and
configuration, this may require an internet
connection .

This tutorial was developed in Excel 2010. Not


all features and functions may work the same
way in earlier or Mac versions of Excel.

Version 1.02 9/28/2015


Version 1.03 2/10/2016 Added explanation for using F4 button in absolute reference
absolute reference
Plant Number Height (cm)
1 7.5 Calculate the range of
2 10.1 Time data (in column K)
with a single formula in
3 8.3 cell H8.
4 9.8
5 5.7 The range of the
data is calculated in
6 10.3 B13 by subtracting
7 9.2 the minimum value Range =
8 8.7 in B12 from the
maximum value in
B11.
Max 10.3
Min 5.7
Range 4.6

Range 4.6

The formulae to calculate


the range can be combined
into one. Check the formula
in B15.
Mouse No. Time (sec.)
1 31
2 33
3 163
4 33
5 28
6 29
7 33
8 27
9 27
10 34
11 35
12 28
13 32
Plant Number Plant Height (mm)
1 112 We are showing many decimal points in
2 102 our worksheet, but because the original
3 106 data only measured 3 significant digits,
the values should be reported as:
4 120
5 98 Mean = 103 mm
6 106 Variance = 138 mm2
SD = 11.7 mm
7 80
8 105 You can format each cell to show only
three significant digits, but Excel keeps
9 106 more digits internally. Click on E20, 21, Using form
10 110 22 and check the formula bar to see calculate t
11 95 what the value is in each cell. (in M20), V
M21), and
12 98 Deviation (
13 74 the data in
14 112
15 115
16 109
17 100

Mean 102.8235 Mean 103 Mean


Variance 137.7794 Variance 138 Variance
Standard Deviation 11.7379 SD 11.7 Standard Deviation

Mean, Variance, and Standard Deviation can be calculated by using a single


formula (see B20, B21, and B22).
For Variance, use the functions "VAR" or "VAR.S" and for Standard
Deviation, "STDEV" or "STDEV.S".
Data
96.01035
104.105
117.7388
99.2052
114.1852
98.52444
103.1756
87.03628
Using formulae, 95.38911
calculate the Mean 137.6266
(in M20), Variance (in 106.5698
M21), and Standard
Deviation (in M22) of 94.90177
the data in L2:L23. 128.4879
84.23827
76.42927
111.8783
91.34343
93.98116
96.77356
78.95172
Standard Deviation 139.2985
115.4865
Plant Number Copy a Number
1 1 Filling Cells with the Same
2 Number
3 Select E2
4 like this:
5 You can enter
6 data like this
by typing 1, 2,
7 3, ...etc. in Grab the little square at the
8 each cell. bottom right of the cell and drag
Or you can let it down to E18. When you let
9 Excel autofill go, Excel fills in all the cells with
10 data. the same number.
11 Let's see how
this works.
12
13
14
15
16
17
Number Series 1 Number Series 2
1 Filling Cells with a Number 1 Filling Cells with a Different
2 Series 3 Number Series
Select K2, drag to K3, and let go. Select Q2, drag to Q3 and le
You have now selected both K2 You have now selected both
and K3 like this: and Q3 like this:

Grab the little square at the


bottom right of the cells and Grab the little square at the
drag it down to K18. When you bottom right of the cells and
let go, Excel fills in all the cells drag it down to Q18. This tim
with a number series. when you let go, Excel fills th
cells with a number series th
increments by two each tim
Data Labels Number Series 3
illing Cells with a Different Sample 1 1
Filling Cells with an
Number Series Sample 2 Ordered Series of 2
Text 3
elect Q2, drag to Q3 and let go.
ou have now selected both Q2 Excel can work with
nd Q3 like this: cell content that
contains both text
and a number.

Perform a similar
exercise using
Column W. See what
happens when you
Grab the little square at the try to autofill a
ottom right of the cells and sequence like:
rag it down to Q18. This time,
when you let go, Excel fills the Sample 1
ells with a number series that Sample 2
ncrements by two each time.
Number Series 4
1
Filling cells with a repeating Filling Cells with a Number Series
pattern 3
9 Excel has a more versatile and powerful
Sometimes you need to fill a 27 to fill cells.
column with a repeating set of
values. For example, 81
PC Excel 2010:
1,2,3,1,2,3,1,2,3,...etc. 243 In the home tab,
729 there is a
Select Z2 to Z4 Fill button.
2187
6561

Mac Excel 2011 and earlier: From the me


choose
Edit -> Fill

Grab the little square at the


bottom right of the cells and
drag it down to Z10.

Click on AD2 and drag down to AD10 to


select those cells.
Choose Fill -> "Series..."

Explore different choices. Can you gener


series like this?

Grab the dropdown icon just to


the right and below the little
square, and select "Copy Cells"
s with a Number Series

a more versatile and powerful way


.

010:
me tab,

2011 and earlier: From the menu,

D2 and drag down to AD10 to


se cells.
ll -> "Series..."

fferent choices. Can you generate a


this?
Plant Number Plant Height (mm) Plant Height (m)
1 112 0.112 Excel can also fill cells with formulae. L
works using the formula in C2 (=B2/10
2 102 millimeters to meters.
3 106
4 120
5 98
6 106
7 80 Select C2.
8 105
9 106
10 110 Grab the little square at the bottom right of the cell and dr
11 95 Click in each cell in Column C to see what happened. Excel
12 98 automatically incrementing the cell references in the formu
the value in B2. One below, C3, uses the value in B3, etc.
13 74
14 112 Because the cell reference changes when you copy the form
15 115 this is known as Relative Reference.
16 109
17 100

Mean 102.823529411765

To copy a formula from a cell, select a cell

On a PC, select Copy from the


The same thing would happen if you copy and paste Clipboard section of the Home tab
formulae. Refer to the blue boxes to the right if you don't Or use the shortcut key for copy (Ctrl-c)
know how to copy and paste.

Click on C18, then copy the content of the cell (should be On a Mac, select from the menu bar
the formula "=B18/1000"). Edit -> Copy
Or use the shortcut key (command-C)
Then click on C20 and paste the content of the clipboard
into cell C20.
Then, to paste the formula into a cell,
C20 now has "=B20/1000", not "=B18/1000".
On a PC, select Paste from the Clipboard
section of the Home tab
Or use the shortcut key for paste (Ctrl-v)

On a Mac, select from the menu bar


Edit -> Paste
Or use the shortcut key (Command-v)
an also fill cells with formulae. Let's see how this
using the formula in C2 (=B2/1000) that converts
eters to meters.

e bottom right of the cell and drag it down to C18.

C to see what happened. Excel filled in the cells by


the cell references in the formula. For example, C2 uses
C3, uses the value in B3, etc.

changes when you copy the formula to a different location,


eference.

ormula from a cell, select a cell, then:

elect Copy from the


section of the Home tab
shortcut key for copy (Ctrl-c)

select from the menu bar


py
shortcut key (command-C)

aste the formula into a cell,

elect Paste from the Clipboard


the Home tab
shortcut key for paste (Ctrl-v)

select from the menu bar


te
shortcut key (Command-v)
Variance and Standard Deviation can also be Let's set up the table for calculations.
calculated manually as follows: B30 has the calculated mean value of data
1. For each value, subtract the mean from it in B12:B28.
(value - mean)
2. Square that value (value - mean)2 First, to subtract the mean from the value,
3. Sum all the values obtained in step 2 we can enter a formula in C12:
4. Divide by total number of the sample - 1. =B12-B30
This is the variance.
5. Square root the value in 4. This is the
standard deviation.

Plant Number Plant Height (mm) Value - Mean


1 112 9.1764705882
2 102
3 106 If you try to fill the cells by selecting
C12...
4 120
5 98
6 106
7 80 ...and dragging the square handle down
8 105 to C28, it doesn't work. Try it and see.
9 106 If you click on C13, you can see the
10 110 formula has changed to "=B13-B31"
11 95 Because of Relative Referencing, it
incremented B12 to B13, but it also
12 98 incremented B30 to B31.
13 74
14 112 We need a way to increment B12 but
15 115 not B30, which is where the average
value is kept.
16 109
17 100

Mean 102.823529411765
calculations. In Relative Referencing, the cell reference changes when you copy the formula to
mean value of data another location, but in Absolute Referencing, it stays the same.

The formula in K12 is =J12-$J$30


an from the value, The dollar sign ($) denotes absolute referencing, and the following column or row
n C12: reference does not change when the formula is copied to another location.

Plant Number Plant Height (mm) Value - Mean


1 112 9.1764705882
2 102 Click on K12 to select it...
s by selecting 3 106
4 120
5 98
6 106
...and drag the square handle down to
uare handle down 7 80 C28.
. Try it and see. 8 105
9 106 Click on K13 to verify that the formula
u can see the is "=J13-$J$30".
o "=B13-B31" 10 110
ferencing, it 11 95 J12 was incremented to J13, but $J$30
13, but it also stayed the same.
31. 12 98
13 74
ement B12 but 14 112
e the average 15 115
16 109
17 100

Mean 102.823529411765
Finish the calculation of variance and standard deviation.
In Column S, enter the formulae for calculating (Plant Height - mean).
When entering the formula, F4 key lets you can toggle between relative and absolute referencing.
Then in Column T, calculate the square of the value in column S.

In T32, use the function SUM to total the values in T14:T30.


Click on T33 to see the use of the function COUNT to calculate n-1.
In T34, enter a formula that divides the sum of squares in T32 by (n-1) in T33.
Finally, click on T35 to see the use the SQRT function to calculate the square root of the variance,
calculated in T34. Verify that the answer matches the values calculated in the "Standard Deviation"
worksheet.

elect it... Plant Number Plant Height (mm) Value - Mean (Value - Mean) squared
1 112
2 102
3 106
4 120
quare handle down to
5 98
6 106
erify that the formula 7 80
8 105
nted to J13, but $J$30 9 106
10 110
11 95
12 98
13 74
14 112
15 115
16 109
17 100

Mean 102.823529411765 Sum of Squares


n-1 -1
Variance, s2 = sum/(n-1)
Standard Deviation, s 0
e referencing.

the variance,
dard Deviation"
Bird ID
9
Columns G and H contain data from 50 medium ground finches. 12
Column L shows the ID # of a bird, and column M shows its beak 276
depth. 278
283
288
293
294
298
Using functions, calculate the following values for the beak depth of
these birds: 307
311
Mean in D29; Variance in D30; Standard Deviation in D31 315
Use the mean value in D29 and absolute referencing method to 321
calculate the (Beak Depth - mean) in column I, and the square of 342
those values in column J. 343
Use the values in column J to calculate the sum of squares in D33.
Calculate n - 1 of column J in D34. 345
Calculate the variance in D35 using the calculated values in D33 and 346
D34.
And finally, calculate the standard deviation by using the value in 347
D36. 352
Verify that D30 = D35 and D31 = D36. 356
413
420
422
428
452
456
457
Mean 458
Variance using function 461
Standard Deviation using function 462
468
Sum of Squares 503
n-1 506
Variance (sum of squares / (n-1) 507
Standard Deviation 509
511
512
519
522
561
564
605
609
610
611
619
621
674
676
687
Beak Depth (mm) (Value - Mean) (Value - Mean) Squared
8.30
7.50
8.00
10.60
11.20
9.10
9.50
10.50
8.40
8.60
9.20
8.80
8.50
8.00
9.70
8.40
7.90
9.30
7.70
8.50
8.20
9.70
10.30
10.20
8.90
9.60
7.85
9.60
9.80
8.80
9.00
9.10
9.20
8.80
9.20
8.80
9.40
8.30
8.40
10.20
9.30
10.20
10.50
9.00
9.80
9.30
7.60
10.50
9.70
8.60

You might also like