Engineering Statistics Excel...

15
Engineering Statistics Excel Tutorial Page 1 The three Excel assignments in this Lab should adhere to the following format: A. Your name should appear left justified at the top of each page of each spreadsheet. Immediately below your name the Assignment number must appear in the form "Assignment _ ". The date of the assignment's completion should appear at the top right of each page of the spreadsheet. To access Headers use the command sequence Insert Header & Footer. B. All the assignments of this Lab should be handed in at the same time, stapled to the first page. Do not hand in the assignments piece meal. Wait until all three assignments have been completed. I. Introduction A spreadsheet program like MS Excel allows you to enter numbers and labels into cells which make a two-dimensional array or table called a spreadsheet. The rows of the spreadsheet are labeled by numbers and the columns by numbers. In addition to storing information, a spreadsheet's real power comes from performing calculations and generating graphs. Furthermore, if the contents of a given cell are changed, this change is automatically incorporated into the calculations or graphs. For this reason, calculations in a spreadsheet should always be stated as formulas involving the addresses of the cells containing the data rather than the numerical values of the data. This illustrated below. Cells D2-D4 contain the values 9, 8, and 6 respectively. To place the sum of this column (23) in cell D5, we type the equal sign in the command line. This tells Excel that we are entering a formula. The "function" name we want is sum. Selecting "SUM" from the functions bar results in the dialogue box shown below. We need to indicate that the block of cells to sum is D2-D4. One way to do this is to click on the "little spreadsheet" icon shown in the extreme right of the Number 1 data box. This returns you to the spreadsheet and allows you to select with the mouse those cells which are to be summed. Once the selection Al Lehnen Madison Area Technical College 12/17/2010

Transcript of Engineering Statistics Excel...

Page 1: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 1

The three Excel assignments in this Lab should adhere to the following format:

A. Your name should appear left justified at the top of each page of each spreadsheet. Immediately below your name the Assignment number must appear in the form "Assignment _ ". The date of the assignment's completion should appear at the top right of each page of the spreadsheet. To access Headers use the command sequence Insert Header & Footer.  

B. All the assignments of this Lab should be handed in at the same time, stapled to the first page. Do not hand in the assignments piece meal. Wait until all three assignments have been completed.

I. Introduction

A spreadsheet program like MS Excel allows you to enter numbers and labels into cells which make a two-dimensional array or table called a spreadsheet. The rows of the spreadsheet are labeled by numbers and the columns by numbers. In addition to storing information, a spreadsheet's real power comes from performing calculations and generating graphs. Furthermore, if the contents of a given cell are changed, this change is automatically incorporated into the calculations or graphs. For this reason, calculations in a spreadsheet should always be stated as formulas involving the addresses of the cells containing the data rather than the numerical values of the data. This illustrated below.

Cells D2-D4 contain the values 9, 8, and 6 respectively. To place the sum of this column (23) in cell D5, we type the equal sign in the command line. This tells Excel that we are entering a formula. The "function" name we want is sum. Selecting "SUM" from the functions bar results in the dialogue box shown below. We need to indicate that the block of cells to sum is D2-D4. One way to do this is to click on the "little spreadsheet" icon shown in the extreme right of the Number 1 data box. This returns you to the spreadsheet and allows you to select with the mouse those cells which are to be summed. Once the selection has been made press the enter key. Then click on "OK" in the dialogue box.

Al Lehnen Madison Area Technical College 12/17/2010

Page 2: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 2

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..

Al Lehnen Madison Area Technical College 12/17/2010

Page 3: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 3

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 click on Formulas Show Formulas.)

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 B4-B9 and y in cells C4-C9. 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, D4 as +B4+2*C4. 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 D5-D9, 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 D4

Al Lehnen Madison Area Technical College 12/17/2010

Page 4: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 4

and copy its contents into the clipboard. Then we select the cells D5 –D9 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 +B4+2*C4 into each cell. 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.

Excel Assignment 1:

Go to the website http://faculty.madisoncollege.edu/alehnen/TechmathII/TechMathIILabs.html and download a copy (“right click” on the link and choose “Save Target As”) of the Excel file Salesort.xls. In Excel open this file. Using formulas and the Format/Format Cells menu modify the worksheet so that it appears as follows: A. All column widths are adjusted so that all column headings fit.

B. All columns except "Sales Associate" and "Employee Code" are displayed as currency with 2 decimal digits.

C. The "First Quarter Sales" Column is the sum of each associate's sales from January through March.

D. The "Commission" Column is 6.5% of the First Quarter Sales Column.

Al Lehnen Madison Area Technical College 12/17/2010

Page 5: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 5

E. All Column headings are bold and a blank row separates the column headings from the sales data. A single width line underlines the row of Column headings.

F. In addition to the original order of associates, three other listings of the spreadsheet results are to be shown, each separated by a blank row. So make three copies by using select, copy, and paste. The first listing should have the associates' names in alphabetical order. The second listing should be in ascending order of the Employee Code, while the last listing should be in descending order according to First Quarter Sales. To sort a block of cells, select Sort from the Data menu. Since all four listings are to be displayed in the final form of the spreadsheet, be sure to make a copy of the rows before executing the sort. That is, first make the changes to the rows in the order given, then make a copy of these rows below them, then sort the copied rows. Repeat this process until all four listings are in the same spreadsheet.

G. Insert a three-D pie chart showing the contribution of each associate to first quarter sales. Select Data Choose Add a Series and select the first quarter sales. Select the column of names of sales associates as the Category (X) axis labels. This graph should have a title of First Quarter Sales. Right click on the pie chart and select Add Data Labels followed by Format data Labels and add the Category Name (Sales associate’s name) on each slice of the pie. Once the chart appears right clicking on it (or any portion of it such as titles or labels) brings up an "object menu" which allows you to make changes. The chart can be resized in the same way as graphic images in MS Word. Insert the chart into your spreadsheet.

H. Print the spreadsheet. Use Print Preview and its Page Setup option to get a printout that is easy to read and understand. Use the Scaling adjust option under the Page index label of the Page Setup menu to insure that all columns printed fit on one page.

Excel Assignment 2:

Go to the website http://www.weather.gov/climate/index.php?wfo=mkx of the National Weather Service Forecast Office. Choose the following options: 1. Product: Preliminary Monthly Climate Data (CF6), 2. Location: Madison, 3. Timeframe marked: Archived Data to find the maximum, minimum, and average temperatures recorded in Madison for each day of the preceding calendar month. In an Excel spreadsheet enter this temperature data in four columns. The first column is Day and runs from 1 (the first of the month) to the last day of the month. Compute the average, median and sample standard deviation (using the Excel functions AVERAGE, MEDIAN and STDEV) for the Maximum, Minimum, and Average columns and format these results to two decimal places.

Al Lehnen Madison Area Technical College 12/17/2010

Page 6: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 6

Next create a Scatter chart that shows the Maximum, Minimum, and Average versus Day all on one graph. Insert a scatter plot that displays just the data points as shown below.

Click on the chart and select data. Enter a new series with the x axis the day of the month and y the daily high temperature. Repeat this procedure for the daily low temperature and the daily average temperature.

Al Lehnen Madison Area Technical College 12/17/2010

Page 7: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 7

Click on a data point to Format Data Series which allows you to change data marker size (Marker Options) and connect points with line segments (Line Color, Line Style).

Al Lehnen Madison Area Technical College 12/17/2010

Page 8: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 8

Clicking on the chart and selecting Format Chart Area allows you to insert borders and modify the graph window. Double clicking on the chart brings up the chart layout menu which allows you to add titles to the chart and axes. Clicking on the x axis gives options such as adding grid lines. The “finished” product is shown below. Generate a “similar” graph for your spreadsheet.

+

Al Lehnen Madison Area Technical College 12/17/2010

Page 9: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 9

II. Generating Linear Models in Excel

Given a set of  X, Y values where Y is the dependent variable and X is the independent variable, the "best" straight 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.

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.

Al Lehnen Madison Area Technical College 12/17/2010

Page 10: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 10

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 and the (X, Y Estimate) pairs. Right click on a Y Estimate point and select Format Data Series and connect the estimated y data points connected by a thin continuous line. You can control how you want the graph to look by “clicking” on its various elements. The result of these modifications is shown below.

Excel Assignment 3:

Al Lehnen Madison Area Technical College 12/17/2010

Page 11: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 11

Below is data giving the yearly energy consumption in millions of BTU's and the area in thousands of square feet of building shell for 22 warehouses all subject to the same climatic conditions.  

Shell Area (Kft2) MBTU/Year Shell Area (Kft2) MBTU/Year

30.00 3,870 23.68 2,680

13.53 1,371 5.65 337

26.06 2,422 8.00 568

6.36 672 6.15 555

4.58 233 2.66 239

24.68 219 19.24 2,629

2.62 354 10.70 1,102

23.35 3,135 9.13 424

18.77 1,470 6.51 545

12.22 1,408 13.53 1,691

25.49 2,201 18.86 1,870

A. Enter the data as two columns in an Excel spreadsheet. Consider the column of Shell Areas to be X and the Energy Consumption to be Y. In the cell beneath each column calculate the average value of each variable in fixed digit format with 1 decimal place. Calculate the regression slope and regression y intercept for this data.

B. Create a third column by applying the linear model. That is, for each value of shell area calculate what the linear model predicts for the energy consumption. In the cell beneath this column calculate the average of the predicted energy consumption in fixed digit format with 1 decimal place.

C. Generate a 2-D XY (Scatter) graph of Energy Consumption versus Shell Area. Give the graph an appropriate title and label the axes. Plot the predicted linear energy consumption on the same graph as the actual energy consumption. For this Series add line segments between the plotted points.

D. Insert your graph in the spreadsheet and print out the results.

Al Lehnen Madison Area Technical College 12/17/2010

Page 12: Engineering Statistics Excel Tutorialfaculty.madisoncollege.edu/alehnen/EngineeringStats/ExcelTutorial…  · Web viewThe chart can be resized in the same way as graphic images in

Engineering Statistics Excel Tutorial Page 12

E. In MS Word write answers to the following questions, print the document and attach this to printed spreadsheet.

How does the average predicted energy consumption compare to the average actual energy consumption?

How well does the linear model fit the data?

What data point deviates the most from the linear model?

Estimate the yearly energy consumption of a building whose shell area is 17,500 square feet. Explain how you obtained this estimate.

Al Lehnen Madison Area Technical College 12/17/2010