14
IDS 101 Introduction to Spreadsheets A spreadsheet will be a valuable tool in our analysis of the climate data we will examine this year. The specific goals of this module are to help you learn: how to enter data into a spreadsheet how to use fill-down, copy, and paste functions in the spreadsheet how to determine the average of a list of values using two different methods how to determine the standard deviation of a list of values how to prepare a properly labeled graph using Excel examine some records of atmospheric carbon dioxide and temperatures in Seattle and Pullman If you have not had experience using a computer, please let us know so that we can give you more assistance. First go to the link below: http://www.instruction.greenriver.edu/ids/101/IDS101spreadsheet.xls Open and save the file to your personal “H-drive” space. (Go to FileSave As... and enter a file name. Click OK. If you need assistance, please let an instructor know. After the file is saved on your H-drive, you may close the Internet Explorer window. Go to the Start icon in the lower left part of the screen and select Microsoft Applications and then select Excel 2007. Once Excel is open on your desktop, use the mouse and click on the Office Button in the upper left part of the screen. Select Open from the list of options and then navigate to your H-drive space and open the same file in Excel. You should see a file that looks like the illustration below:

IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

  • Upload
    dinhdat

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

IDS 101Introduction to Spreadsheets

A spreadsheet will be a valuable tool in our analysis of the climate data we will examine this year. The specific goals of this module are to help you learn:

how to enter data into a spreadsheet how to use fill-down, copy, and paste functions in the spreadsheet how to determine the average of a list of values using two different methods how to determine the standard deviation of a list of values how to prepare a properly labeled graph using Excel examine some records of atmospheric carbon dioxide and temperatures in Seattle

and Pullman

If you have not had experience using a computer, please let us know so that we can give you more assistance.

First go to the link below:

http://www.instruction.greenriver.edu/ids/101/IDS101spreadsheet.xls

Open and save the file to your personal “H-drive” space. (Go to File… Save As... and enter a file name. Click OK. If you need assistance, please let an instructor know. After the file is saved on your H-drive, you may close the Internet Explorer window.

Go to the Start icon in the lower left part of the screen and select Microsoft Applications and then select Excel 2007. Once Excel is open on your desktop, use the mouse and click on the Office Button in the upper left part of the screen. Select Open from the list of options and then navigate to your H-drive space and open the same file in Excel. You should see a file that looks like the illustration below:

You will notice that at the top of the spreadsheet there are letters in the columns and numbers for the rows. The rectangles are known as cells and we can refer to a cell by the

Page 2: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

letter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the keyboard permit you to move from cell to cell.

The two major gases in our atmosphere are nitrogen (about 79%) and oxygen (about 18%). The remainder of the gases in the atmosphere is termed the trace gases. One of the major issues in science today is the connection between observed global warming and the abundance of these trace gases. In IDS 102 we will examine the science behind the role of atmospheric trace gases in increasing the temperature (the greenhouse effect), but we will use this issue to learn how to use Excel.

We will examine data of atmospheric carbon dioxide concentration (a “greenhouse” gas) and temperatures in Seattle and Pullman, Washington. Clearly, comparing just two locations will not be sufficient to resolve this issue, but it will give us a practical example as we learn to use Excel.

Normally we start a spreadsheet by adding a title to our spreadsheet, but this should be in the spreadsheet as your open it.

The first year of record that we will consider is 1959. Enter that number in cell A7. The next value in column A (cell A8) will be 1960. You could enter the remainder of the years in column A, but let’s learn a cool way that Excel can save you time. It is called “fill down”.

Fill Down:

Move the cursor back to cell A7 and drag the mouse down column A until both of your entries (1959 and 1960) are highlighted. Now move the mouse to the lower right corner of the highlighted area. Notice that the big plus sign changes into a thinner-lined plus sign at the small black square at the lower right. Depress the button on the mouse and drag the corner of that rectangle down column A. When you get down to 2004 stop and release the button. Excel will “fill down” the values for you. This seems odd at first, but it can save a lot of time!

Our next task will be to determine the average yearly carbon dioxide content of the atmosphere. Scientists have monitored the abundance of carbon dioxide in the atmosphere at Mauna Loa volcano, Hawai’i because the values at Mauna Loa should not be affected by local pollution sources. Go to the CO2 Values tab in the lower left part of the spreadsheet. This tab will open another sheet in this file.

You should find a table of monthly carbon dioxide values. Notice that some of the values are missing in 1964. Missing data could be due to several reasons, such as a lack of funding or lost data. If you encounter a table in which some values are missing, you should consider whether it is valid to average the remaining data for that year. We will assume that it is not valid to average the values for 1964, so let’s delete this row. Go to row 12 on the left side of the screen. Click on the number 12 and this should highlight row 12 (the values for 1964).

2

Page 3: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

Click on the Home tab in the upper left part of the screen and select Delete (see the arrow in the figure above) and the contents of row 14 should disappear. A short-cut method is to use the right mouse button and select Delete from the options and that will have the same effect.

Important! Go back to Sheet 1 (click on the Sheet 1 tab in the lower left part of the screen) and delete the row of data for 1964. Go to the other two sheets (Seattle temps and Pullman temps) and delete the data for 1964 for each of these data sets.

Go to the CO2 values sheet.

We need the average for the remaining carbon dioxide values for each year. Excel can help us with the math.

Doing math the Excel way:

Go to cell N7 and type an “=” sign (do not enter the quotation marks). This tells the program, wake-up, I’m going to enter something for you to do! After the = sign, type the word “sum”—(again, no quotation marks). It does not matter if the word is uppercase or lowercase. Then we need to tell the program what to sum. So we type a “(“ to tell the program that the next thing will be the first cell to add into the sum. You could enter this cell address by hand, but the easier way is to use the mouse and drag the cursor over the cells you want to sum. Start in cell B7 and drag the mouse to the right along row 7 until all of the carbon dioxide values for 1959 are highlighted. (Sometimes the new, fast computers go through the data so fast you will find yourself way across the page. If this happens, continue to hold the button down and move the mouse to the left; the cursor will move back toward the left side of the spreadsheet and you should find the end of the row!)

Add a right parenthesis sign to let the program know that is the end of the list of data. To get the average we need to divide by the number of observations (in this case 12). We divide by using the “/” symbol and entering 12. Another method is that Excel has a “function” that will average data. Move the cursor to N8. In the Formulas tab, go to AutoSum and click on the small arrow just to the right of AutoSum and a list of other

3

Page 4: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

functions should appear. Select the Average function. You will need to tell the program which cells to average, so select the cells you want to average with the mouse and press Enter. See the example below:

Click Enter and you should have the average value of carbon dioxide in 1960.

Use the fill down technique you learned before to complete the list of average values for the other years in column N. Unless you tell Excel otherwise, it will automatically assume that when you use the fill down technique that you want the value in N8 to be the average of the values in B8 through O8 and so forth. There are methods to stop this automatic referencing and if you are interested in this technique, see an instructor.

Notice that the values created by the averaging will have more decimal points than the observed values. This would indicate that the average values are more precise than the observed value. This is not the case. We need to change the format for column N so that the number of decimal places is 2. Right click on the N at the top of the column and select Format Cells….next select the Number option under Category. Select 2 as the number of decimal places and click OK. The values in column N should now be consistent with the level of precision of the data. You can also change the number of decimal places in the Home tab and go to long bar in the Number tab and select Number and the column should have the same format as the rest of the spreadsheet.

Copy and Paste:

Another task is to copy and paste information and functions from one cell to another cell. Highlight the carbon dioxide averages that you just determined. Go the Home tab and the Clipboard tab and then select the Copy option. See the arrow in the figure below:

4

Page 5: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

The average data from the spreadsheet is now saved on an electronic “clipboard” inside the computer. Move the cursor to cell B7 on Sheet 1. Go back to the Home tab and select Paste Special/Values. (The reason for Paste Special rather than just Paste is that Excel would try to put the average function in the cell in Sheet 1 and this would create a #REF! error). See below:

This is another real time saver when you are using spreadsheets. (A shortcut is to click the right button on the mouse and select “Paste Special” from the pop-up menu that appears.)

Still another method is to have the Sheet 1 sheet get the value directly from the CO2 values sheet. To do this go to cell B7 on Sheet 1 and type =. Then go to cell N7 on the CO2 values sheet and click the cursor in cell N7 and press Enter. This links the value from one sheet to another. Go back to Sheet 1 and fill down the remaining values in column B. This method has the advantage that if you change a value on the CO2 values page, it will automatically change on Sheet 1.

Go to the other tabs at the bottom of Sheet 1 (Seattle temps and Pullman temps) and determine the average yearly temperatures for each year listed on these sheets and link the values to the appropriate columns in Sheet 1.

5

Page 6: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

Standard Deviation

If someone asks you whether the temperature is more constant in Seattle or in Pullman, you would probably guess that the temperatures are more constant in Seattle. One way to determine if this is true is to compare the standard deviation of the temperatures in Seattle and Pullman. Again, Excel is very helpful in determining the standard deviation. The larger the value of standard deviation, the greater the variation there is in the monthly temperatures. In cell O4 (Seattle temps sheet), type “Std Dev” and follow the procedure below:

Move the cursor to cell O5 and enter “=”. Go to the Formulas tab near the top of the screen and select Recently Used in the upper left. Select STDEV from the list of functions. You could also go to Insert Function and select STDEV from the pull down menu. You should see another small screen asking what the range of values Excel should use to determine the standard deviation. Highlight the values in cells B5 through M5 and the box should appear as the one you see below:

Click OK and go back to the spreadsheet. Use the fill down technique to complete the standard deviation values for the remainder of the Seattle temps data.

Use this same procedure for the Pullman data.

Was the standard deviation of the Seattle data higher, lower, or the same as the standard deviation of the Pullman data?

On Sheet 1 you should have the values for the years (1959-2004- excluding 1964 which we deleted previously), the carbon dioxide content of the atmosphere, and the average

6

Page 7: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

Seattle and Pullman temperatures for this same time period (excluding the values for 1964).

Graphing with Excel:

The last part of this module is how to use Excel to graph your data. Let’s graph the average Seattle and Pullman temperatures as a function of the carbon dioxide concentration in the atmosphere.

To create a graph, we must highlight the appropriate data. The x-axis (the independent variable) of the graph will be the carbon dioxide concentration and the y-axis will be the temperatures in Seattle and Pullman. First, highlight with the mouse the carbon dioxide values in column B and the Seattle temperature data in column C. Excel will assume that the highlighted column on the left will be the independent variable and the highlighted column or columns to the right are the dependent variables.

Go to the Insert tab and the Charts tab. Click on the arrow in the Scatter icon as illustrated below:

Once you have selected the Scatter option with no lines, a graph will appear on top of the spreadsheet. You could leave the scatter plot in this position, however, most of the time you will want to see a separate graph so go to top right corner and you should find Move Chart Location. Select this option and select the Chart 1 button and click OK.

The same graph should appear as a separate page, labeled Chart 1 as a tab in the lower left corner (you can get back to the spreadsheet by clicking on Sheet 1 or any other tab). The graph is not finished because we must have a Title, labels for the axes, and a trendline. At the top of the screen select the Layout tab. You should find the necessary controls to add the title, axes titles and units (such as degrees F or parts per million) and a variety of options for adding a trendline to the graph. At the bottom of the Trendline full down menu, there is an option for “More Trendline Options…” – select this option and a new dialog box will appear. Notice near the bottom of this box that you can have the computer add the equation for the trendline and something called the R2 value. The R2

7

Page 8: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

value is a measure of how well the trendline fits the data. If all of the data fall on the line, R2=1 and if the data are truly random, with no trend, the R2 would be close to 0.

Have an instructor check your graph before you continue.

The next step is to graph the Pullman data as a function of carbon dioxide concentration. Follow the same procedures with the exception of highlighting the columns. There is a special trick to this when the columns are not adjacent to each other. Highlight the CO2 values as you did before, then depress the Control key (Ctrl) and highlight the Pullman data. Then finish the graph in the same manner as before. This will give you a Chart 2.

Imagine that you would like to have both the Seattle and Pullman data on the same graph.

Go back to Sheet 1 and highlight all three columns of data to be graphed including the labels at the top of each column (Carbon Dioxide, Seattle temperatures, and Pullman temperatures). Follow the same procedures you used previously to Insert a chart. Excel assumes that the CO2 values will be the independent variable and the other two are dependent variables.

Your graph probably shows the Seattle temps data grouped above the Pullman temps data. What does this tell us?

Use the mouse to select the Pullman temps data and add a trendline to this set of data. Again, have Excel write both the equation for the line and the R-squared value.

Which trendline had the higher R-squared value? From the previous discussion of R-squared values, what does this mean?

Chart 3 (both sets of temperature data) will probably have the temperature as 0 at the origin. The data seem to be grouped in a small part of the graph. There is nothing incorrect about this, but it may be that you want to display the data using different y-axis values. Move the mouse so that the cursor is directly above the values on the y-axis and right click the mouse. Select Format Axis… Change the minimum value to 40 and click OK.

When you constructed this graph, if you did not include the labels at the top of each column, you may have a graph that has a legend on the right side of the graph that shows Series 1 and Series 2. If this is case, the next task is to change the legend box on the right side of the graph so that someone will better understand what the graph is illustrating.

8

Page 9: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

Go to the Design tab near the top and select Select Data… you should see the following dialog box:

Click on Series 1 and then Edit. A new, small dialog box will appear and you can enter the name of the series of data. In this case, series 1 is the Seattle data. Do the same thing for Series 2 and put in the Pullman temperature label.

Once you have this graph (or chart as Excel calls it) looking the way you like (make sure your name is on the graph) and then print it and include it with the module in your notebook.

1. Go back to the graphs you have made and summarize what the graphs tell you.

2. What is the general trend of the temperatures in Seattle and Pullman as a function of the carbon dioxide concentration of the atmosphere?

3. What do the R2 values mean?

9

Page 10: IDS 101 - instruction.greenriver.edu€¦ · Web viewletter of the column and the number of the row. Notice that the word “Year” is in cell A4. The mouse or the arrows on the

In this module you have learned some of the basic functions in Excel. We will use this powerful spreadsheet several times through the year and we think by the end of the year you will see how helpful spreadsheets can be!

End of Module Question:

Parents, grandparents, and senior-citizen friends often tell stories about how they walked through snowdrifts up to their shoulders to get to school when they were young. Is there any merit to their observations of climate or is the climate about the same as it used to be? Let’s test this idea.

We have stored a spreadsheet of temperature data from SeaTac Airport on the web site for this class. The address for that data is:http://www.instruction.greenriver.edu/ids/101/Modulesf06/SeaTacdata.xls

In cell O3, enter the words “yearly average”. Calculate the yearly average temperatures for the data from SeaTac Airport and graph the temperatures as a function of time. (Reminder—consider what you should do with the partial temperature records for 1948 and 2006.)

a) Print a completed graph of the average temperature at SeaTac Airport as a function of time. Make sure that your graph has at least 2020 on the x-axis. Complete your graph with all the characteristics of a “good” graph. Please type your name on the graph before you print it. Put this graph in your course notebook just after this module.

b) So, what do you think about the “old-timers’ stories? Was it colder in the “old” days?

c) Assuming the climate continues in the same manner in the next few years, use your graph to predict the temperature at SeaTac Airport in 2020. Explain briefly how you made your prediction.

10