Updates to Graphing with Excel



Similar documents
Dealing with Data in Excel 2010

Summary of important mathematical operations and formulas (from first tutorial):

Scientific Graphing in Excel 2010

Excel -- Creating Charts

Plots, Curve-Fitting, and Data Modeling in Microsoft Excel

This activity will show you how to draw graphs of algebraic functions in Excel.

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

Excel Tutorial. Bio 150B Excel Tutorial 1

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

A Guide to Using Excel in Physics Lab

Graphing in excel on the Mac

Create Charts in Excel

0 Introduction to Data Analysis Using an Excel Spreadsheet

Absorbance Spectrophotometry: Analysis of FD&C Red Food Dye #40 Calibration Curve Procedure

Intermediate PowerPoint

Formulas, Functions and Charts

Years after US Student to Teacher Ratio

Spreadsheets and Laboratory Data Analysis: Excel 2003 Version (Excel 2007 is only slightly different)

Using Excel for Handling, Graphing, and Analyzing Scientific Data:

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

USING EXCEL ON THE COMPUTER TO FIND THE MEAN AND STANDARD DEVIATION AND TO DO LINEAR REGRESSION ANALYSIS AND GRAPHING TABLE OF CONTENTS

Figure 1. An embedded chart on a worksheet.

How to make a line graph using Excel 2007

Introduction to Microsoft Excel 2007/2010

Graphing Parabolas With Microsoft Excel

Creating and Formatting Charts in Microsoft Excel

Microsoft Excel 2010 Charts and Graphs

Excel Math Project for 8th Grade Identifying Patterns

Microsoft Excel 2010 Part 3: Advanced Excel

Plotting Data with Microsoft Excel

Microsoft Excel Basics

Excel 2007 Basic knowledge

Create a Poster Using Publisher

ITS Training Class Charts and PivotTables Using Excel 2007

Excel Basics By Tom Peters & Laura Spielman

Microsoft Office Excel 2007 Key Features. Office of Enterprise Development and Support Applications Support Group

Creating Charts in Microsoft Excel A supplement to Chapter 5 of Quantitative Approaches in Business Studies

Microsoft Excel Tutorial

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Below is a very brief tutorial on the basic capabilities of Excel. Refer to the Excel help files for more information.

Microsoft Excel 2010 Tutorial

Excel Guide for Finite Mathematics and Applied Calculus

Calibration and Linear Regression Analysis: A Self-Guided Tutorial

Using Microsoft Excel to Plot and Analyze Kinetic Data

PowerPoint 2007 Basics Website:

Curve Fitting in Microsoft Excel By William Lee

Using Microsoft Word. Working With Objects

Intro to Excel spreadsheets

Microsoft Excel Tutorial

Interactive Excel Spreadsheets:

2. Creating Bar Graphs with Excel 2007

Microsoft Migrating to PowerPoint 2010 from PowerPoint 2003

Microsoft PowerPoint Exercises 4

MARS STUDENT IMAGING PROJECT

Chapter 4 Creating Charts and Graphs

Project 1 - Business Proposal (PowerPoint)

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

Experiment 1A: Excel Graphing Exercise

Plotting: Customizing the Graph

KaleidaGraph Quick Start Guide

CONSTRUCTING SINGLE-SUBJECT REVERSAL DESIGN GRAPHS USING MICROSOFT WORD : A COMPREHENSIVE TUTORIAL

Creating Bar Charts and Pie Charts Excel 2010 Tutorial (small revisions 1/20/14)

Data representation and analysis in Excel

Microsoft PowerPoint 2010

Lab 1: The metric system measurement of length and weight

Microsoft Excel 2013: Charts June 2014

What is the difference between simple and compound interest and does it really matter?

Gestation Period as a function of Lifespan

A Beginner s Guide to PowerPoint 2010

Advanced Microsoft Excel 2010

So you want to create an a Friend action

GUIDELINES FOR PREPARING POSTERS USING POWERPOINT PRESENTATION SOFTWARE

Microsoft PowerPoint 2010 Handout

PowerPoint 2013: Basic Skills

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Probability Distributions

WHAT S NEW IN MS EXCEL 2013

Linear Equations. Find the domain and the range of the following set. {(4,5), (7,8), (-1,3), (3,3), (2,-3)}

Excel 2007 A Beginners Guide

MICROSOFT POWERPOINT STEP BY STEP GUIDE

Microsoft Excel 2007 Finding Objects and How To

Scatter Plots with Error Bars

PERFORMING REGRESSION ANALYSIS USING MICROSOFT EXCEL

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Tutorial 2: Using Excel in Data Analysis

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Excel Unit 4. Data files needed to complete these exercises will be found on the S: drive>410>student>computer Technology>Excel>Unit 4

Analyzing Dose-Response Data 1

Estimating a market model: Step-by-step Prepared by Pamela Peterson Drake Florida Atlantic University

Getting Started with Excel Table of Contents

Excel 2007: Basics Learning Guide

Working with SmartArt

Excel Using Pivot Tables

Excel 2007 Charts and Pivot Tables

The Center for Teaching, Learning, & Technology

Statgraphics Getting started

TLMC WORKSHOP: THESIS FORMATTING IN WORD 2010

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

Appendix C. Vernier Tutorial

Word 2007 WOWS of Word Office 2007 brings a whole new basket of bells and whistles for our enjoyment. The whistles turn to wows.

Transcription:

Updates to Graphing with Excel NCC has recently upgraded to a new version of the Microsoft Office suite of programs. As such, many of the directions in the Biology Student Handbook for how to graph with Excel are now out of date. This handout is intended to update some of that key information. Drawing a simple graph Suppose we have some data to graph, like the number of cookies in two different cookie jars, monitored over a period of hours. The first step is simply to Rate of Cookie type the data into Excel. Put the data in columns: a column for the Disappearance times at which the measurements were taken, and a column for Bio 4 lab, 3 Feb 27 each jar. Add headings to identify the data in each column, and put enough extra information into the spreadsheet so that you will immediately know what s what when you come back to it later. A sample is shown in Figure 1. Now, how would we go about graphing these data? The quickest way is to simply select (highlight) the three columns of data. Then click on the Insert tab and the Scatter graph option. This will automatically draw the graph that Excel thinks that you want (Figure 11). Unfortunately, this isn t a particularly useful graph! Our axes aren t labeled, the grid lines make it rather busy and the legend s labels of Series 1 and Series 2 aren t very helpful to a reader. Sadly, some students stop right here and just drop the graph into their lab reports. You can imagine that this doesn t make a big hit at grading time! 3 3 2 No. of Cookies Time (hrs.) Jar #1 Jar #2 2 3 1 22 29 2 19 29 3 16 28 4 12 27 9 2 6 6 24 7 3 23 8 2 22 9 1 21 1 2 Figure 1. Sample of a well-formatted table in Excel. 2 1 1 Series1 Series2 2 4 6 8 1 12 Figure 11. Excel s default scatter graph.

Fortunately, it doesn t take too much work to dramatically improve this graph. With a little cleaning up, you can convert this initial graph to something much more professional, as shown in Figure 12. If in doubt, click on what you want to change and then right-click (rather than double-click) to see what some options are. You can simply click on the gridlines to select them and then use the delete button to get rid of them. To add labels to your axes, click on the graph itself and 3 then click the Jar #1 Layout tab to 3 Jar #2 bring up the layout 2 ribbon. Click the 2 Axis Titles button and then 1 either the horizontal axis or 1 vertical axis button. For the vertical axis, select the Rotated option 2 4 6 8 1 12 and Excel will put a dummy title ( Axis Title ) on your graph. Simply Figure 12. A much improved basic graph. click on that text and replace it with a useful title. You can then do the same thing for the horizontal axis. Be sure to include units! The easiest way to improve the figure s legend is to change what we graphed. Instead of simply highlighting the data, also highlight the column titles, which include Jar #1 and Jar #2. Then those will automatically replace Series 1 and Series 2. Often it is useful to select the legend and to move it on to the graph itself. This eliminates the amount of white space and maximizes the size of the graph itself. If you don t need a legend (perhaps because there is only one series of data), simply click on the legend and then press the delete button. To connect the dots with a solid line to better show the trends, click on one of the datapoints and then right click your mouse. Choose Format Data Series option at the bottom. Select line color and change from No Line to a Solid Line. Notice that through this menu, you can also change the color of the data series and lines as well as the symbols and types of line. Be careful with colors! In most cases, you re going to print this graph for your notebook or your lab report in black-and-white. Be sure that the colors you ve chosen will still look ok when they have been converted to grayscale. You may also need to change the range of an axis. Click on one of the numbers on the axis and right-click to Format Axis. Click the button to change from the Auto minimum and maximum to Fixed and then enter a value for what you want the minimum and maximum to be. Finally, be sure your graph is large enough that your reader will be able to see it clearly, that the axis labels are clearly readable, and that the symbols you use can be easily distinguished when it is printed. If you will be using your graph in an oral or poster presentation, then be sure it

can be seen clearly from where your audience will be sitting. Always preview a PowerPoint presentation to be sure all the figures are readable before presenting it to an actual audience; don t just rely on it looking good on your computer screen. Drawing best-fit lines So far, we ve let Excel connect the dots. However, this doesn t give us all the information we could get from the graph. There seems to be a trend in the data: cookies disappear at a nearly linear rate. What we need is a line that fits the data as closely as possible, in order to show the trend: a best-fit line. Once we have this line, its slope will give us the mathematical relationship between time and cookie disappearance: the rate of cookie disappearance. The first thing to do is to right-click the data series and remove the line (through Format Data Series and selecting No Line ). Now click the data series and select the Layout tab. From this, click on the Trendline button and select the More Trendline Options. Select the Linear option (unless you expect your data to be better represented by a logarithmic or other curve) and click the Display equation on chart and the Display R-squared value on chart boxes. R 2 is a measure of how good the fit is between your data and your line. If R 2 = 1, the data fall perfectly on the line. You may need to move the equations around a bit so they aren t overlapping anything and its clear which line they are associated with. You will probably also want to remove the extra entry of Linear that has been added to the legend. After adding a trendline to each set of data, you ll see something like the graph in Figure 14. Unfortunately, there s a problem here. Excel just does what you tell it to it can t interpret your data. So, you should look at your data carefully and be sure that you re getting what you wanted. In this case, you can clearly see from your data points for Jar #1 that the number of 3 2 2 1 1 y = -2.64x + 23.72 R² =.97 y = -1.4x + 2.4 R² =.98 2 4 6 8 1 12 Figure 14. Best-fit lines show trends effectively. Jar #1 Jar #2 (normalized) cookies goes down almost in a straight line for a while, but then it levels off at the end. (Maybe because nobody wants to be blamed for taking those last few cookies!) So, what you really want is a best-fit curve, or a best-fit line which takes into account only the first seven hours.

Sadly, there s no easy way to tell Excel which points to consider when it draws its trendline. But we can get around this problem with a little ingenuity. Make a new column in your data table that contains only the data you want the trendline to use (in this case, hours through 7 for Jar #1). Delete the original trendline and plot the new column. To add the additional data, right-click on the graph and click the Select Data option. In the new box that opens, click the button that says Add. This new series doesn t need a series name but you do need to tell the program the x-values and y-values. To select the range of x-values (in this case, time in hours) click on the icon at the right end of the box. Then you can select the cells that contain that data. Repeat this for the y-values (in this case, the partial set of data for Jar #1). Click on the newly added data series and add your trendline. Then click again on the newly added data series, rightclick and select the Format Data Series option. Select Marker Options and select None. This will cause the newly plotted points to be invisible so they don t clutter up your graph and confuse the reader. The result is shown in Figure 1. Notice how much better the R 2 value is for this graph! This will give us a much more accurate rate, and also shows your reader more clearly what actually happened in the experiment. 3 2 2 1 1 y = -3.19x + 2.16 R² =.998 y = -1.4x + 2.4 R² =.98 2 4 6 8 1 12 Jar #1 Jar #2 (normalized) Figure 1. Better trendline using only the linear portion of the graph. Now, what do you do with the lines once you have them? The equation is in the form y = mx + b, and you ll remember that m represents the slope of the line, and b represents the point where the line intersects the y-axis. The slope is the change in the y-value divided by the change in the x-value, which in this case is the number of cookies divided by time. So, the slope is really the rate of cookie disappearance! For Jar #1, the rate is 3.2 cookies/hour (it s negative, because the cookies are disappearing instead of appearing, which is pretty normal for cookies). For Jar #2, it s 1.1 cookies/hour. This gives you something to work with in your discussion. Why is the rate greater for Jar #1 than Jar #2? (Maybe Jar #1 is sitting on your instructor s desk yum!) Why is the rate for Jar #1 slower in the last three hours than the first seven? (You could also calculate a rate for these three hours and compare it to the first rate.) And so on. You can write a much more interesting discussion if you ve carefully analyzed the data first and come up with the most informative graphs you can.

Adding error bars In the example above, we only had one set of data for each jar. But, suppose we had several sets of data, and we wanted to determine average values. Averaging multiple data sets is a good way to be sure you are seeing the true values (see the Statistics section in the Biology Student Handbook). What your reader will want to know, though, is how close your values are to the average. If your average score in Biology is, did you get that by getting 4 and on the first two exams, or by getting 1 on the first exam and a zero on the second because you slept in? It makes a big difference! So, you need to show the range of values in some way. On a graph, the range can be shown by using error bars: lines which extend above and below the plotted point. The error bars can represent the whole range of the data, or they might represent one standard deviation, or they might represent the 9 % confidence limits, which are twice the standard deviation. Excel can do any of these. Suppose we have five sets of data for cookie jar #1, which we arrange in five columns, C through G. Excel can calculate the average automatically. If the five values for hours are in cells C6 through G6, go to cell H6 and type this formula: = average(c6:g6) and press Enter. Cell H6 will then contain the average of the other five cells. You can then copy this formula to all the cells below, as was already discussed. Excel can also calculate the standard deviation. The formula for this, which we might then enter in cell I6, would be: = stdev(c6:g6) And, if we want to calculate the 9% confidence limits, we know that these are two standard deviations from the average. So, in column J, we d use the formula: = 2 * I6 Rate of Cookie Disappearance Bio 4 lab, 3 Feb 22 No. of Cookies in Jar #1 standard 9% Time (hrs.) Trial #1 Trial #2 Trial #3 Trial #4 Trial # average deviation conf. 2 2 2 2 2 2.. 1 22 21 23 22 22 22.71 1.41 2 19 18 19 18 2 19.84 1.67 3 16 1 17 16 1 16.84 1.67 4 12 12 13 13 14 13.84 1.67 9 9 1 8 1 9.84 1.67 6 6 7 7 6 8 7.84 1.67 7 3 4 4 4 6 4 1.1 2.19 8 2 1 1 2 3 2.84 1.67 9 1 1 1 1 1.4.89 1 1.4.89 Figure 16. Multiple trials of the cookie experiment, with averages and standard deviations.

Now we have the data shown in Figure 16, and we can again use the Excel to draw a graph. This time, though, instead of graphing all the data, let s just graph the average. And, let s use error bars to show the 9% confidence limits (the range where the true value is expected to fall 9% of the time). This range would be determined by adding the standard deviation (which we have put in column J) to the average and by subtracting the same number from the average. To get error bars, draw the graph as usual. Then right-click the graph, select the Layout tab and click the Error Bars button. Select the More Error Bars Option from the bottom of the list. For the Error Amount, click the Custom button. To indicate the values that correspond to our 9% confidence intervals, click the Specify values option and highlight the series of cells that contain your 9% confidence limits. Unfortunately, this plots error bars both in the vertical and the horizontal directions. To get rid of the x-error bars (or horizontal error bars) carefully click on one of the x-error bars and press the delete button. When you close this box, you should get a graph with the error bars included, something like the one in Figure 17. (Check to be sure the error bars look like they match the calculated values in your worksheet!) This gives your reader a good idea of how close together your data points are in this case, there s not a big range, suggesting valid data. 3 2 2 1 1 2 4 6 8 1 12 Figure 17. Error bars showing 9% confidence intervals for the data. Using pattern fills for bar graphs If you re drawing a graph for an oral presentation, you can go ahead and use different colors to distinguish your data series. Be sure to pick colors with good contrast so that the viewer will be able to tell them apart easily! But if you ll be printing your graph, say for a lab report, you want all your symbols to look good in black and white. For a line graph, you can use open ( ) and filled ( ) symbols of different shapes as well as solid and dashed lines. But for a bar

graph, you re basically limited to black, white and gray bars. In previous versions of Excel, you could easily fill your bars with a pattern such as diagonal stripes, but that feature has unfortunately been removed. Instead, Excel 27 lets you choose from a variety of gradients and pictures that will not print well and will not look professional in a scientific paper! Actually, pattern fills aren t really gone, just inaccessible. You could write a macro to get them back, but an easier way is to use an add-in already developed and available for free download: http://www.andypope.info/charts/patternfills.htm To use this add-in, close Excel, download and open the compressed file and move the file PatternFills.xlam to the folder c:\documents and Settings\[your user name]\application Data\Microsoft\AddIns. Now restart Excel, click the Office Button and then click Excel Options at the bottom. Choose Add-Ins from the list at left, then set the drop down to Manage: Excel Add-Ins at the bottom and click Go. You should see Pattern Fills in the list that pops up; put a check mark in its box and click OK. Whew. Now, when you select a chart series and click the Format tab in your ribbon under Chart Tools, you should see a new option, Patterns, at the right end. Click here to get a dialog that will let you pick patterns and colors much as you could with previous versions. If you re using campus computers, you may want to keep PatternFills.xlam on your flash drive, as you ll have to do the installation for every computer you use.