Using Excel for Graphical Analysis of Data

Similar documents
Using Excel for Graphical Analysis of Data

Graphical Analysis of Data using Microsoft Excel [2016 Version]

Reading: Graphing Techniques Revised 1/12/11 GRAPHING TECHNIQUES

Error Analysis, Statistics and Graphing

Excel Spreadsheets and Graphs

Chapter 3: Rate Laws Excel Tutorial on Fitting logarithmic data

= 3 + (5*4) + (1/2)*(4/2)^2.

Survey of Math: Excel Spreadsheet Guide (for Excel 2016) Page 1 of 9

addition + =5+C2 adds 5 to the value in cell C2 multiplication * =F6*0.12 multiplies the value in cell F6 by 0.12

Microsoft Excel 2007 Creating a XY Scatter Chart

Microsoft Excel Using Excel in the Science Classroom

Experiment 1 CH Fall 2004 INTRODUCTION TO SPREADSHEETS

Appendix C. Vernier Tutorial

Plotting Graphs. Error Bars

Lab Activity #2- Statistics and Graphing

ENV Laboratory 2: Graphing

1 Introduction to Using Excel Spreadsheets

Microsoft Word for Report-Writing (2016 Version)

Chemistry 1A Graphing Tutorial CSUS Department of Chemistry

Practical 1P1 Computing Exercise

Pre-Lab Excel Problem

Scientific Graphing in Excel 2007

W7 DATA ANALYSIS 2. Your graph should look something like that in Figure W7-2. It shows the expected bell shape of the Gaussian distribution.

Excel Primer CH141 Fall, 2017

Reference and Style Guide for Microsoft Excel

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Chemistry Excel. Microsoft 2007

Introduction to Spreadsheets

Dealing with Data in Excel 2013/2016

Scientific Graphing in Excel 2013

IDS 101 Introduction to Spreadsheets

How to use Excel Spreadsheets for Graphing

Math 2524: Activity 1 (Using Excel) Fall 2002

Here is the data collected.

Graphing with Microsoft Excel

Microsoft Excel 2007

252 APPENDIX D EXPERIMENT 1 Introduction to Computer Tools and Uncertainties

Lesson 76. Linear Regression, Scatterplots. Review: Shormann Algebra 2, Lessons 12, 24; Shormann Algebra 1, Lesson 94

Data Management Project Using Software to Carry Out Data Analysis Tasks

KINETICS CALCS AND GRAPHS INSTRUCTIONS

Preliminary Lab Exercise Part 1 Calibration of Eppendorf Pipette

Geology Geomath Estimating the coefficients of various Mathematical relationships in Geology

0 Graphical Analysis Use of Excel

Tips and Guidance for Analyzing Data. Executive Summary

Experiment 3 Microsoft Excel in Scientific Applications I

Activity Graphical Analysis with Excel and Logger Pro

Excel R Tips. is used for multiplication. + is used for addition. is used for subtraction. / is used for division

Fall 2016 CS130 - Regression Analysis 1 7. REGRESSION. Fall 2016

Models for Nurses: Quadratic Model ( ) Linear Model Dx ( ) x Models for Doctors:

An introduction to plotting data

Lab1: Use of Word and Excel

Introduction to Excel Workshop

Select the Points You ll Use. Tech Assignment: Find a Quadratic Function for College Costs

Intermediate Microsoft Excel (Demonstrated using Windows XP) Using Spreadsheets in the Classroom

Intro To Excel Spreadsheet for use in Introductory Sciences

Chemistry 30 Tips for Creating Graphs using Microsoft Excel

Creating a Basic Chart in Excel 2007

Creating a Histogram Creating a Histogram

INSTRUCTIONS FOR USING MICROSOFT EXCEL PERFORMING DESCRIPTIVE AND INFERENTIAL STATISTICS AND GRAPHING

Excel. Spreadsheet functions

BioFuel Graphing instructions using Microsoft Excel 2003 (Microsoft Excel 2007 instructions start on page mei-7)

Logger Pro Resource Sheet

EXCEL SPREADSHEET TUTORIAL

Total Number of Students in US (millions)

EXCEL 98 TUTORIAL Chemistry C2407 fall 1998 Andy Eng, Columbia University 1998

Technology Assignment: Scatter Plots

Using Excel to produce graphs - a quick introduction:

[1] CURVE FITTING WITH EXCEL

UW Department of Chemistry Lab Lectures Online

Excel 2013 Charts and Graphs

Introduction to the workbook and spreadsheet

Charts in Excel 2003

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving Excel Tutorial VIII

Using Large Data Sets Workbook Version A (MEI)

Physics 251 Laboratory Introduction to Spreadsheets

Chapter 1: Introduction to the Microsoft Excel Spreadsheet

Homework 1 Excel Basics

Chapter 2 Assignment (due Thursday, April 19)

Version 1.1. COPYRIGHT 1999 Tufts University and Vernier Software. ISBN (Windows) ISBN (Macintosh)

Your Name: Section: INTRODUCTION TO STATISTICAL REASONING Computer Lab #4 Scatterplots and Regression

Computer Data Analysis and Plotting

Microsoft Excel. Charts

CS130 Regression. Winter Winter 2014 CS130 - Regression Analysis 1

Exercise: Graphing and Least Squares Fitting in Quattro Pro

LAB 2: DATA FILTERING AND NOISE REDUCTION

Excel Tips and FAQs - MS 2010

Rockefeller College MPA Excel Workshop: Clinton Impeachment Data Example

EDIT202 Spreadsheet Lab Prep Sheet

Chapter 2 Assignment (due Thursday, October 5)

Introduction to Motion

8.NS.1 8.NS.2. 8.EE.7.a 8.EE.4 8.EE.5 8.EE.6

Spreadsheet Warm Up for SSAC Geology of National Parks Modules, 2: Elementary Spreadsheet Manipulations and Graphing Tasks

Microsoft Excel Lab: Data Analysis

SAMLab Tip Sheet #4 Creating a Histogram

Computer Data Analysis and Use of Excel

Three-Dimensional (Surface) Plots

General Program Description

Work Session 16a: Massaging data graphically

Scottish Improvement Skills

Excel for Gen Chem General Chemistry Laboratory September 15, 2014

Transcription:

EXERCISE Using Excel for Graphical Analysis of Data Introduction In several upcoming experiments, a primary goal will be to determine the mathematical relationship between two variable physical parameters. Graphs are useful tools that can elucidate such relationships. First, plotting a graph provides a visual image of data and any trends therein. Second, via appropriate analysis, they provide us with the ability to predict the results of any changes to the system. An important technique in graphical analysis is the transformation of experimental data to produce a straight line. If there is a direct, linear relationship between two variable parameters, the data may be fitted to the equation of a line with the familiar form y = mx + b through a technique known as linear regression. Here m represents the slope of the line, and b represents the y-intercept, as shown in the figure below. This equation expresses the mathematical relationship between the two variables plotted, and allows for the prediction of unknown values within the parameters. Best-fit line Equation: y = mx + b b = y-intercept m = slope = y/ x = y2-y1/x2-x1 Computer spreadsheets are powerful tools for manipulating and graphing quantitative data. In this exercise, the spreadsheet program Microsoft Excel will be used for this purpose. In particular, students will learn to use Excel in order to explore a number of linear graphical relations. Please note that although Excel can fit curves to nonlinear data sets, this form of analysis is usually not as accurate as linear regression. Part 1: Simple Linear Plot Scenario: A certain experiment is designed to measure the volume of one mole of helium gas

at a variety of different temperatures, while keeping the gas pressure constant at 758 torr. What follows are the data that were collected: Temperature (K) Volume of Helium (L) 203 14.3 243 17.2 283 23.1 323 25.9 363 31.5 a) Launch the program Excel. Go to the Dock at the bottom of the screen, and click on the Microsoft Excel Icon. b) Enter the above data into the first two columns in the spreadsheet. Reserve the first row for column labels. The x values must be entered to the left of the y values in the spreadsheet. Remember that the independent variable (the one that you, as the experimenter, have control of) goes on the x-axis while the dependent variable (the measured data) goes on the y-axis. c) Highlight the set of data (not the column labels) that you wish to plot and click on the Chart button in the ribbon above your data (Figure 1). Figure 1 Then click the All button under Insert Chart. Figure 2 A number of charting options will be available to you. Scroll down to the Scatter set and choose Marked Scatter.

Figure 3 At this point you should see a graph similar to the one below. Figure 4 Type your labels into the appropriate spaces. Notice the title. Excel prints the Dependent variable. It is up to you to complete the title. Your graph should be given a meaningful, explanatory title that explains your experiment. The standard title method is Dependent variable versus independent variable followed by a description of your system (Figure 5). Figure 5

It is important to label axes with both the measurement and the units used. By double clicking on the numbers on the x or y axes, you can access the Format Axis window that will allow you to enhance the material and presentation of your data. Figure 6 Click on the various tabs (Scale, Number, Font etc.) to investigate how they affect the look of your graph. To add Axis Titles, Legend, etc. click on the Chart Layout button in the ribbon. Figure 7 The following will appear just below Chart Layout. Figure 8 Go ahead and place Axis Titles on your chart. d) Your next step is to add a trendline to this plotted data. A trendline represents the best possible fit to your data. Most if not all of your graphs this semester will be linear. Click the Trendline icon in the Analysis portion of the Chart Layout choices (See Figure 8). The following should appear (Figure 9). Figure 9

The Trendline Function is useless without a mathematical function. Double click on the straight black Trendline on you chart. The following window should appear (Figure 10). Figure 10 Choose Options, check Display equation on chart, and Display R-squared value on chart, then click OK. Your chart should look something like this (Figure 11). Figure 11 Can you identify what is wrong with the chart in figure 11? Make a list and include with your report. e) The equation that now appears on your graph is the equation of the fitted trendline. The R 2 value (the square of the correlation function R) gives a measure of how well the data is fit by the equation. The closer the R 2 value is to 1, the better the fit. Generally, R 2 values of 0.95 or higher are considered good fits. Note that the program will always fit a trendline to the data no matter how good or how awful the data is. You must judge the quality of the fit and the suitability of this type of fit to your data set. f) Print out a full size copy of this prepared graph and staple it to your report. Then record the following information on your report:

the equation of the best-fit trendline to your data the slope of the trendline the y-intercept of the trendline whether the fit of the line to the data is good or bad, and why. g) By graphing the five measured values a relationship is established between gas volume and temperature. The graph contains a visual representation of that relationship (the plot) as well as a mathematical expression of it (the equation). It can now be used to make certain predictions. For example, suppose the 1 mole sample of helium gas is cooled until its volume is measured to be 10.5 L. You are asked to determine the gas temperature. Note that the value 10.5 L falls outside the range of the plotted data. How can you find the temperature if it doesn't fall between the known points? This is done as follows: 1) Extrapolate the trendline and estimate where the point on the line is. Double-click on the line on the graph. You will see a screen called Format Trendline. Choose the Options folder. Go to Options, then Forecast forward or backward (in this case backward) by enough units to include the value y = 10.5 L on the graph. Estimate the x value by envisioning a straight line down from y = 10.5 L to the x-axis. Record this value on your report. 2) Plug this value for volume into the equation of the trendline and solve for the unknown temperature. Do this and record your ans wer on your report. Note that this method is generally more precise than extrapolating and "eyeballing" from the graph. Part 2: Using Functions Scenario: An experiment is designed to measure how quickly helium gas diffuses from a source to a detector ten meters away, as a function of the temperature of the source. The data collected are shown below: Temperature (K) Time of Diffusion (ms) 200 9.72 300 7.93 400 6.87 500 6.15 600 5.61 700 5.19 800 4.86 a) Enter this data into a new sheet in Excel by clicking on the Sheet 2 tab at the bottom left of the page. Then create a plot of Time versus Temperature (as in Part I). Why is time plotted on the y-axis? Which set of data is placed on the left in the Excel worksheet? b) Examination of your graph will reveal that the plotted data is not linear. Your goal is to linearize this data. Doing this requires that you operate on one column of your data values with a function. One of the following functions of temperature will give a straight line when plotted against time: ln(temp) = the natural log of temperature (Temp) 1/2 = the square root of temperature (Temp) 1/2 = the inverse of the square root of temperature

c) Using functions to manipulate data values in Excel is quite straightforward. example, follow the procedure below to obtain a column of ln(temp) values: As an Pick an empty column to the right of your data. In the same row as your old data begins, type "=ln(a2)" where a2 represents the cell in which the first temperature value exists (a1 should contain your column label). When you hit return, the program returns the natural log of that value and puts it into the new cell. To operate on the rest of the values, click on the cell with the formula near the bottom right corner so that the cursor appears as a solid black cross (not a white cross). Hold the mouse button down and drag down the cell until you are in the same row as the last data point. When you release the mouse, all the cells will fill in with the ln of each temperature value in the correct rows. Note that this is simply a shorthand way to paste the function into many cells at once. Be sure to add a label to this ne w column of data. Now graph the new function versus time and fit the data to see if it is linear. Note that you will have to re-enter the time data in the column beside the new ln(temp) data before creating the new graph. d) Repeat this procedure for the other two functions of temperature. Type =(a2)^0.5 to obtain the square root of temperature, and =(a2)^-0.5 to obtain the inverse square root of temperature as your formulas. Then fit a trendline to whichever plot is determined to be linear. e) Record on your report: which function of temperature produces a linear relationship to time the slope of the trendline fitted to your linear plot. Part 3: Two Data Sets with Overlay Scenario: In a certain experiment, a spectrophotometer is used to measure the absorbance of light for several solutions containing different quantities of a red dye. The two sets of data collected are presented in the table below. You would like to see how these two sets of data relate to each other. To do this you will have to place both sets of data, as independent relationships, on the same graph. Note that this process only works when you have the same axis values and magnitudes. Amount of Dye (mol) Data A Data B Absorbance (unitless) Amount of Dye (mol) 0.100 0.049 0.800 0.620 0.200 0.168 0.850 0.440 0.300 0.261 0.900 0.285 0.400 0.360 0.950 0.125 0.500 0.470 0.600 0.590 0.700 0.700 0.750 0.750 Absorbance (unitless) a) Enter this new data into a new sheet (Sheet 3) in Excel. Be sure to label your data columns A and B. Again, remember to enter the x values to the left of the y values.

b) First, plot Data A only as an XY Scatter plot. Fit a trendline to this data as before using linear regression, and obtain the equation of this line. c) Now add Data B to this graph. Activate the graph by clicking on one of the plotted data points. Go to the Chart menu and select Add Data. You will be asked for a range of values. Take your mouse and drag it over the new columns of Data B values that you wish to add. Then click the OK button. On the next screen that appears, check the box labeled Categories (X Values) that you will add in First Column, then click OK. You can now independently analyze this data set by inserting a trendline as before. d) Record the following information on your report: the equation of the best-fit trendline for Data A, the equation of the best-fit trendline for Data B, If these trendlines were extrapolated, they would intersect. Determine the values of x and y for the point of intersection using simultaneous equations. Part 4: Choosing the Correct Parameters for Graphing Scenario: The following data was collected from an experiment which measures the rate constant (k) of a first order hydrolysis reaction as a function of temperature. Temperature (K) Rate Constant, k (s -1 ) 280 4.70 x 10-2 285 6.87 x 10-2 290 9.85 x 10-2 295 1.41 x 10-1 300 1.97 x 10-1 a) k (the rate constant) and T (the temperature) are related via the following equation: A is called the frequency factor (units are identical to those of k, s -1 ), E a is the energy of activation (units of kj/mol), and R is the thermodynamic gas constant (8.31 x 10-3 kj/k mol). Since the relationship between k and T is an exponential one, the data set when plotted will not be linear. Your goal is to linearize it. To do this, you must perform different functions on both k and T before you plot the data. b) How do you take an exponential function and transform it into a linear function? Clearly you have to get rid of the "e" or the exponential term. To do this, simply take the natural logarithm of both sides of the equation. This gives the new, linearized equation below. It is this function that you must plot to get a straight line. But exactly what are you going to plot on the x-axis and y-axis to create this linear graph? If you rearrange the previous

equation, it might become evident: Identify y, x, m and b within this equation, and record them on your report. Check with your instructor to make sure you have figured it out correctly. Only then should you go ahead and construct your linear plot. c) Enter the data into a new sheet (Sheet 4) in Excel, and use the appropriate functions (as learned in Part 2) to linearize it. Then plot these variables to obtain a linear graph. Be sure to add a trendline to your data set, and obtain the equation of this line. d) Record the equation of the fitted trendline on your report. Then use information obtained from this equation to calculate: the value of E a in kj/mol. the value of A, in s -1. Part 5: Statistical Analysis and Simple Scatter Plots Scenario: When many independent measurements are made for one variable, there is inevitably some scatter (noise) in the data. This is usually the result of random errors over which the experimenter has little control. For example, the data sets below show the measurement of the sulfate ion concentration in a sample of water by ten different students at two different colleges. College #1 College #2 35.9 45.1 43.2 34.2 33.5 36.8 35.1 31.0 32.8 40.7 37.6 29.6 31.9 35.4 36.6 32.5 35.0 43.5 32.0 38.8 Simple statistical analyses of these data sets might include calculations of the mean and median concentration, and the standard deviation. The mean ( ) or average value, is defined as the sum (Σ) of each of the measurements (x i ) in a data set divided by the number of measurements (N): The median (M) is the midpoint value of a numerically ordered data set, where half of the measurements are above the median and half are below. The location of the median for N measurements can be found using: When N is an odd number, the formula yields an integer that represents the value corresponding to the median location in an ordered distribution of measurements. For example, in the set of numbers (3 1 5 4 9 9 8) the median location is (7 + 1) / 2, or the 4th value. When applied to the numerically ordered set (1 3 4 5 8 9 9), the number 5 is the 4th value and is thus the median three scores are above 5 and three are below 5. Note that if there were only 6 numbers in the set (1 3 4 5 8 9), the median location is (6 + 1) / 2, or the

3.5th value. In this case the median is half-way between the 3rd and 4th values in the ordered distribution, or 4.5. Standard deviation (s) is a measure of the variation in a data set, and is defined as the square root of the sum of squares divided by the number of measurements minus one: So to find s, subtract each measurement from the mean, square that result, add it to the results of each other difference squared, divide that sum by the number of measurements minus one, then take the square root of this result. The larger this value is, the greater the variation in the data, and the lower the precision in the measurements. While the mean, median and standard deviation can be calculated by hand, it is often more convenient to use a calculator or computer to determine these values. Microsoft Excel is particularly well suited for such statistical analyses, especially on large data sets. a) Enter the data acquired by the students from College #1 (only) into a single column of cells on a new sheet (Sheet 5) in Excel. Then in any empty cell (usually one close to the data cells), instruct the program to perform the required functions on the data. To compute the mean or average of the data entered in cells a1 through a10, for example, you must: click the mouse in an empty cell type "=average(a1:a10)" press return To obtain the median you would instead type =median(a1:a10). To obtain the standard deviation you would instead type "=stdev(a1:a10)". Record the Excel calculated mean, median and standard deviation for the College #1 data set on your report. Now, calculate the standard deviation of this data set by hand, and compare it to the value obtained from the program. Rejecting Outliers Do all the measurements in the College #1 data set look equally good to you, or are there any points that do not seem to fit with the others? If so, is it acceptable or "legal" to reject these measurements? Outliers are data points which lie far outside the range defined by the rest of the measurements and may skew your results to a great extent. If you determine that an outlier resulted from an obvious experimental error (e.g., you incorrectly read an instrument or prepared a solution), you may reject the point without hesitation. If, however, none of these errors is evident, you must use caution in making your decision to keep or reject a point. One rough criterion for rejecting a data point is if it lies beyond two standard deviations from the mean or average. b) Using the criteria supplied above, determine if any measurements in the College #1 data set are outliers. Record on your report which measurements (if any) are outliers. Then, excluding the outliers, re-calculate the mean, median and standard deviation of this data set (use Excel).

Please note that rejecting data points may not be done just because you want your data to look better. If you choose to reject an outlier for any reason, you must always clearly document in your lab report or on your data sheet: that you did reject a point which point you rejected why you rejected it Failure to disclose this could constitute scientific fraud. Graphing a Scatter Plot Unlike the linear plots we have created so far, a scatter plot simply shows the variation in measurements of a single variable in a given data set, i.e., it supplies a visual representation of the noise in the data. The data is plotted in a column. Here, there is no x-y dependence. Data sets with a greater degree of scatter will have a higher standard deviation and consist of less precise measurements than data sets with a small degree of scatter. To obtain such a plot using Excel, all the x values for each data set must be identical. Thus, let the College #1 measurements be assigned x = 1.0, and let x = 2.0 for the College #2 measurements. Measurements by Students from College #1 Measurements by Students from College #2 College [SO 4-2 ] () College [SO4-2 ] () 1.0 35.9 2.0 45.1 1.0 43.2 2.0 34.2 1.0 33.5 2.0 36.8 1.0 35.1 2.0 31.0 1.0 32.8 2.0 40.7 1.0 37.6 2.0 29.6 1.0 31.9 2.0 35.4 1.0 36.6 2.0 32.5 1.0 35.0 2.0 43.5 1.0 32.0 2.0 38.8

c) Enter the data as shown above into the first four columns of your spreadsheet. Plot the College #1 data set as an XY Scatter Plot. Now add the College #2 data set to this graph applying the same steps you used to create your earlier graph in the section Two Data Sets with Overlay (Part 3). Add appropriate axis labels and a title. You may also want to adjust the x-axis and y- axis scales to improve the final look of your graph. Print out a full size copy of this prepared graph and staple it to your report. Analyze your scatter plot. Which of the data sets (from College #1 or College #2) has the greater standard deviation? Which data set consists of the more precise measurements? The original version of this lab is property of the chemistry department at Santa Monica College. We used the original version with their permission. This updated version has been revised to accommodate a more recent version of Microsoft excel. It is similar to the original version.

EXERCISE REPORT Using Excel for Graphical Analysis of Data Name Section Date Instructor Note: Only two graphs are required to be submitted with this report the graphs prepared for Part 1 and Part 5. Part 1: Simple Linear Plot Which set of data is plotted on the y axis? The x axis? Write below a list of all of the things that are wrong with the chart in Figure 11. Record the following information: The equation of the fitted trendline The value of the slope of this line The value of the y intercept of this line Is the fit of the trendline to your data good (circle one)? Briefly explain your response. Yes / No Determine the temperature (in Kelvin) of the gas in the cold room when it has a measured volume of 10.5 liters using a) Extrapolation and eyeballing b) The equation of the trendline Show your calculation for (b) below. Attach a copy of your graph to this report. Br sure that your axes are properly labeled (with units), that the line equation is visible, and that your graph has an appropriate title. Part 2: Using Functions Which set of data when plotted yields a straight line (circle one)? Time vs. ln(temp) Time vs. (Temp) 0.5 Time vs. (Temp) -0.5

Record the following information concerning the linearized data: The equation of the fitted trendline The value of the slpoe of this line Part 3: Two Data Sets with Overlay Record the equations of the trendlines fitted to Date set A: Date set B: Perform a simultaneous equations calculation to determine the x and y values for the point of intersection between these lines. Show your work below. x = y = Part 4: Choosing the Correct Parameters for Graphing Consider the linearized equation below, which relates the rate comnstant (k) of a hydrolysis reaction to temperature (T): Which term in this equation corresponds to y? Which term in this equation corresponds to m? Which term in this equation corresponds to x? Which term in this equation corresponds to b? Use the appropriate functions to manipulate the data provided and create a linear plot. Then record below the equation of the fitted trendline. Equation:

Show your complete work in the spaces provided. Using the data obtained from the equation on the previous page, determine: a) the value of E a (in kj/mol) b) the value of A (in S -1 ) Part 5: Statistical Analysis and Simple Scatter Plots For the College #1 data set, record the following values (determined using excel): the mean SO 4-2 concentration the median SO 4-2 concentration the standard deviation of this data set Calculate the standard deviation of the College #1 data set by hand. Show your work below.

Are there any outliers in the College #1 data set (circle one)? Yes / No If yes, which measurements are the outliers? Show the calculations you used to identify the outliers (or, if none, how you determined that there were none). Re-calculate the following values (using Excel) excluding the outliers: the mean SO 4-2 concentration the median SO 4-2 concentration the standard deviation of this data set Create a scatter plot showing both the College #1 and the College #2 data. Attach a copy of this graph to this report. Be sure that your axes are properly labeled, and that your graph has the appropriate title. Examine your plotted data. Which data set: has the largest standard deviation? contains the more precise measurements? The original version of this lab is property of the chemistry department at Santa Monica College. We used the original version with their permission. This updated version has been revised to accommodate a more recent version of Microsoft excel. It is similar to the original version.