1 spreadsheet problem solving applied statistics table lookup
TRANSCRIPT
1
Spreadsheet Problem Solving applied statistics
table lookup
2
Using Excel for statistical calculations
Broad capabilities, well beyond the scope of this course[ChE’s will learn many more features in
Applied Data Analysis (CHEN 3010)]
Built-in functions (COUNT, AVERAGE, STDEV, . . . )
Data Analysis toolbox (Descriptive Statistics, Histogram,Regression, . . . )
We will concentrate today on descriptive statistics
Trendline curve-fitting feature
3
Characterizing a set of data
1 2 ny , y , , y iy , i 1,2, ,n
Central value or tendency(most likely value, estimate of true value)
Sample average
n
ii 1
yy
n
Median
n+1
2
in 2 n 2 1
n odd: y
y with y sorted in ascending ordery yn even:
2
Mode most frequently occurring value in the series
there are others: geometric mean, harmonic mean,m-estimator, first moment
[ AVERAGE(•) ]
[ MEDIAN(•) ]
[ MODE(•) ]
4
Spread or dispersion of the data (describes uncertainty)
Range max minR y y
Inter-quartile range (iqr) 75%ile 25%ileiqr y y
Sample standard deviation n
2
ii 1
y yS
n 1
Resolution decimal place farthest to the right to whicha measurement may be reliably read
Standard error of the mean estimate y
SS
n
There are others, e.g., median absolute deviation.
[ MAX(•) - MIN(•) ]
[ STDEV(•) ]Note: sample variance issquare of S, [ VAR(•) ]
5
Other quantities of use in statistical calculations
sample count n
sample sumn
ii 1
y
sample sum of squaresn
2i
i 1
y
“corrected” sum of squares n
2
ii 1
y y
[ COUNT(•) ]
[ SUM(•) ]
[ SUMSQ(•) ]
[ VAR(•) * (n-1) ]
6
Example data set:
Measurements taken on a silicon wafer used for makingmicrocircuits
7
Sample statistics using formulas
8Finding the median andquartiles
9
Using the Data Analysis toolbox
Note: if the Data Analysis . . .item is not on the Tools menu,you will have to go to the Add-insmenu and activate the checkboxfor Analysis Toolpak. If the AnalysisToolpak item is not on the Add-inslist, it will have to be installed fromMicrosoft Office Set-up.
10
Setting up for descriptive statistics
11
Results from Descriptive Statistics
Format AutoFormat OK
reformat table adjust display forappropriatesignificant figures
12
Table Look-up
A great deal of information is organized in the form oftables and Excel provides a number of built-in functionsthat allow for the extraction of appropriate data from tables.
Excel’s lookup functions are:
LOOKUP
VLOOKUP
HLOOKUP
MATCH
INDEX
OFFSET
13
LOOKUP(Lookup_value,Lookup_vector,Result_vector)
search downthe lookupvector
find eithera matchingvalue, ora valuegreater thanthe lookupvalue, whicheveroccurs first
go to the same position inthe result vector, and extractthe value there
14
Example of LOOKUP use
text inalphabeticalorder
create name“material”for this column
this columnwill be the“lookup vector”
numerical valuesof bulk density
create name“density” forthis column
this column willbe the“result vector”
15
Create LOOKUP functionformulas
this cell is named “choice”
Lookup_value,Lookup_vector,Result_vector
What happens when our choice is not in the lookup vector?
LOOKUP goes down listuntil it finds a name > “potash”,“salt” in this case, then it backsup one to “oyster shells” andreturns the answer for that
16
Important: the lookup vector must be in ascending order. For text labels,this means alphabetic order. Upper- or lower-case letters don’t matter.
17
VLOOKUP(Lookup_value,Table_array,col_index_num,Range_lookup)
searchdownleftcolumnoftablearraytofindmatch
Which column number forextraction of result? 1, 2, 3 or 4?
result
optional argument:if FALSE, requiresan exact match
18
Example of VLOOKUP use
Table of properties of various granular materials
named “MaterialTable”
19
Need to sort the table in ascending (alphabetical) order forfirst column
Using VLOOKUP to extract information from the table:
What if our choice value has a typo?
cell named“choice”
20
typo, should be “Millet”
result shown as invalid
With 4th argument as TRUE, or absent, you would see:
results for “Flaxseeds”,next earlier item in table
21
Application of VLOOKUP: Linear interpolation from atable of physical properties
For any %HNO3
from 0 to 90, wewant an automaticestimate of theheat capacity
22
Create index columns to the right and left of the table
name this“NitricTable2” name this
“NitricTable1”
23
Create an input cell and name it “input”
Enter a formula using VLOOKUP todetermine the row index for the“lower bracketing value”
Enter a simple “add 1 to the above” formula for the rowindex of the “higher bracketing value”
24
Enter VLOOKUP functions based on “NitricTable2” andusing the low and high row indices to extract the bracketingvalues of %HNO3 and Heat Capacity.
Using Insert Name Create, transfer the 6 labelsin column F over as names on the cells to the right incolumn G
25
LowPct HighPct
LowHC
HighHC
linear approximationbetween to locationsin the table
input%HNO3
HeatCapestimate
input LowPct
HeatCap HighHC LowHC LowHCHighPct LowPct
Enter this formula in a cell to compute the estimatedheat capacity
26
Automatic linear interpolationformula and results
27
Change values of the input to get different results[including bad results when input outside of
acceptable range]
the good the bad and the ugly!
28
Other lookup functions:
HLOOKUP like VLOOKUP, except horizontalrather than vertical looks acrosstop row of table and then extracts fromindexed row
MATCH does not extract a value, but, instead, returnsa relative location (position number) of avalue in a lookup array
INDEX extracts a value from a table (2-dimensionalarray of cells with rows and columns) giventhe column index and the row index
OFFSET extracts a cell address or range from a tablegiven the offset location from the upper-left-hand corner of the table
See “Help” for more details on these