Professional Documents
Culture Documents
Lab 1: Use of Microsoft Excel
Lab 1: Use of Microsoft Excel
A second alternative is to simply type "sum(d2:d4)" in the command line and then press the
enter key.
A third alternative is to place the cursor in the cell D5 and left click on the sigma (summation)
button and press the enter key..
Page 3 Introduction to Engineering Statistics: Excel Exercise
In any case what is shown in cell D5 is the computed sum. (To actually see the formula in a cell
rather than the result of its evaluation use the command sequence Tools Options View and click
on Formulas check box.)
Another feature that makes spreadsheets easy to use is the use of relative addressing in copying
and pasting. Suppose we have two columns x and y, with x in cells C2-C7 and y in cells D2-D7.
We want to make a new column z, where each entry in the z column is the sum of the
corresponding entry in the x column with twice the corresponding entry in the y column. Stated
as a formula z = x + 2y . To put this formula into spreadsheet language, we compute the first
entry in the z column, E2 as +C2+2*D2. Using the leading + sign lets Excel know that we are
entering a formula without having to depress the = sign in the command line.
We could enter the corresponding formulas for cells E3-E7, but this is rather tedious, especially
if there were a large number of cells. Here's where the magic of relative addressing comes in. We
select cell E2 and copy its contents into the clipboard. Then we select the cells E3 -E7 and right
click with the mouse to get the selection menu. We choose to paste the clipboard into the selected
cells. You might think that this would paste +C2+2*D2 into each cell.
Page 4 Introduction to Engineering Statistics: Excel Exercise
In fact, we get just what we wanted. Excel is "smart enough" to know that the C column is being
added to twice the D column, so it changes the cell addresses for each cell. This is what relative
addressing is all about.
Sometimes we don't want to copy and paste cell address "relatively". For example, if a formula
must always use the contents of cell G17 regardless of what cell contains the formula, we would
refer to cell G17 in the formula as $G$17 . The use of the $ means that if this formula is copied
and pasted into another cell, the contents of cell G17 will still be used in the computation. The
use of the $ with cell addresses is called absolute addressing.
Next create a 2-D XY (Scatter) chart that shows the Maximum, Minimum, and Average versus
Day all on one graph. The Chart sub-type should be Scatter with data points connected by
lines. Click on the Series tab and press the Add button. There should be three Series. The X
Values for each series is the Day column. The Y Values will be the Maximum column for
Series 1, the Minimum column for Series 2, and the Average column for Series 3. The graph
should have a title, the x axis should be labeled, and each series should have a Name to identify
Maximum, Minimum and Average on the graph.
Page 7 Introduction to Engineering Statistics: Excel Exercise
Right click on objects such as the X and Y axes and the titles to adjust the scale, the size and
types of fonts, colors, etc. Generate a clear and understandable graph similar to the one shown
below. Insert the chart into the spreadsheet and print the result.
Given a set of X, Y values where Y is the dependent variable and X is the independent variable,
the "best" straight line (which Excel calls a "Trend Line) through the data can be determined by
the method of "least squares". This linear modeling of the relationship between X and Y is
calculated by the equation Y = m*X+b , where m is the slope of the line and b is the y intercept.
In Excel this least squares or "regression" slope can be calculated with the SLOPE( ) function.
The SLOPE function's input menu requires the cell addresses of the Known_y's and the
Known_x's. These may be entered directly, or if you click on the "little spreadsheet" icon you
will return to the spreadsheet where you can select the appropriate cells. After selecting the
correct input, click on the OK button to calculate the slope. The regression y intercept is
calculated in a similar fashion with the INTERCEPT( ) function.
Page 8 Introduction to Engineering Statistics: Excel Exercise
To calculate the estimated Y values based on the linear model copy and paste the formula
Y=m*X+b as shown below. Note: the use of absolute addressing for the cells containing the
slope and y intercept.
Finally, a 2-D XY (Scatter) plot of the data plus the linear model can be constructed as shown
below. The chart sub-type chosen was Scatter with no connecting lines or curves between data
points. Then the series option was used to plot both the (X, Y) data pairs. Right click on a (X, Y)
data point and add a "Trend line" with the options to display both the regression equation and R2.
R2 is the fraction of Y that a linear equation in X explains, it is always between 0 and 1. To
change the background color of the plot right click within the plot and select Format Plot Area.
To insert grid lines right click within the plot and select Chart Options. The chart shown below
was modified from what Excel originally generated by various re-sizing and "much" right
clicking on its components.
Page 9 Introduction to Engineering Statistics: Excel Exercise
Generate a 2-D XY (Scatter) graph of y versus x and add a trend line with both the regression
(trend line) equation and the value of R2 displayed.
Generate a second 2-D XY (Scatter) graph of ln(y) versus ln(x) and add a trend line of this
second graph again with both the regression (trend line) equation and the value of R2 displayed.
Now use the drop down menus to sample different values for p, A , x start, and Change in x.
From the results computed and displayed by the spreadsheet, answer the following discussion
questions in the spread sheet. Print out the results, including the two scatter plots, with neither
one separated by a page break.
Page 10 Introduction to Engineering Statistics: Excel Exercise
a) For the input values tested how well does a linear model of y versus x represent the data? Is
the linear model "exact"?
b) For the input values tested how well does a linear model of ln(y) versus ln(x) represent the
data? Is this model "exact"?
c) Describe in words a procedure for determining the "best" values of and for any data set that
obeys the power law relation, y = Ax p .