APPENDIX A Using Microsoft Excel for Error Analysis



Similar documents
1. Go to your programs menu and click on Microsoft Excel.

Calibration and Linear Regression Analysis: A Self-Guided Tutorial

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

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

Data Analysis. Using Excel. Jeffrey L. Rummel. BBA Seminar. Data in Excel. Excel Calculations of Descriptive Statistics. Single Variable Graphs

Appendix 2.1 Tabular and Graphical Methods Using Excel

Step 3: Go to Column C. Use the function AVERAGE to calculate the mean values of n = 5. Column C is the column of the means.

To create a histogram, you must organize the data in two columns on the worksheet. These columns must contain the following data:

Updates to Graphing with Excel

Bill Burton Albert Einstein College of Medicine April 28, 2014 EERS: Managing the Tension Between Rigor and Resources 1

STC: Descriptive Statistics in Excel Running Descriptive and Correlational Analysis in Excel 2013

Dealing with Data in Excel 2010

Curve Fitting in Microsoft Excel By William Lee

Assignment objectives:

Microsoft Excel Tutorial

Bowerman, O'Connell, Aitken Schermer, & Adcock, Business Statistics in Practice, Canadian edition

seven Statistical Analysis with Excel chapter OVERVIEW CHAPTER

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

Introduction to Statistical Computing in Microsoft Excel By Hector D. Flores; and Dr. J.A. Dobelman

Data exploration with Microsoft Excel: univariate analysis

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

Microsoft Excel. Qi Wei

Call Centre Helper - Forecasting Excel Template

Microsoft Excel Tutorial

0 Introduction to Data Analysis Using an Excel Spreadsheet

MICROSOFT EXCEL FORECASTING AND DATA ANALYSIS

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

How To Analyze Data In Excel 2003 With A Powerpoint 3.5

PERFORMING REGRESSION ANALYSIS USING MICROSOFT EXCEL

WEB APPENDIX. Calculating Beta Coefficients. b Beta Rise Run Y X

Tutorial 2: Using Excel in Data Analysis

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

Figure 1. An embedded chart on a worksheet.

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

If there is not a Data Analysis option under the DATA menu, you will need to install the Data Analysis ToolPak as an add-in for Microsoft Excel.

Getting started in Excel

Table of Contents TASK 1: DATA ANALYSIS TOOLPAK... 2 TASK 2: HISTOGRAMS... 5 TASK 3: ENTER MIDPOINT FORMULAS... 11

Engineering Problem Solving and Excel. EGN 1006 Introduction to Engineering

How to Create a Data Table in Excel 2010

Data exploration with Microsoft Excel: analysing more than one variable

Data Analysis Tools. Tools for Summarizing Data

NONLINEAR INTERPOLATION WITH EXCEL TO CONSTRUCT U.S. TREASURY BOND YIELD CURVE

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

Using Excel 2003 with Basic Business Statistics

Using Microsoft Excel for Probability and Statistics

SECTION 2-1: OVERVIEW SECTION 2-2: FREQUENCY DISTRIBUTIONS

Years after US Student to Teacher Ratio

EXCEL Analysis TookPak [Statistical Analysis] 1. First of all, check to make sure that the Analysis ToolPak is installed. Here is how you do it:

Graphing Parabolas With Microsoft Excel

Generating ABI PRISM 7700 Standard Curve Plots in a Spreadsheet Program

Directions for using SPSS

Session 10. Laboratory Works

Descriptive Statistics

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

XPost: Excel Workbooks for the Post-estimation Interpretation of Regression Models for Categorical Dependent Variables

Guidelines for Completing the VDOT Form C 13CPM

An introduction to using Microsoft Excel for quantitative data analysis

How To Run Statistical Tests in Excel

Preface of Excel Guide

APPLYING BENFORD'S LAW This PDF contains step-by-step instructions on how to apply Benford's law using Microsoft Excel, which is commonly used by

Activity 3.7 Statistical Analysis with Excel

Doing Multiple Regression with SPSS. In this case, we are interested in the Analyze options so we choose that menu. If gives us a number of choices:

How To Use A Spreadsheet Excel for the Mac and PC-Windows by John D. Winter

Microsoft Excel 2013: Using a Data Entry Form

business statistics using Excel OXFORD UNIVERSITY PRESS Glyn Davis & Branko Pecar

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

How to Use a Data Spreadsheet: Excel

ESTIMATING THE DISTRIBUTION OF DEMAND USING BOUNDED SALES DATA

Using Microsoft Excel to Plot and Analyze Kinetic Data

Excel Tutorial. Bio 150B Excel Tutorial 1

Installing and Using the Monte Carlo Simulation Excel Add-in. Software for

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

Excel Math Project for 8th Grade Identifying Patterns

Excel 2010: Create your first spreadsheet

How To Use Excel With A Calculator

Using SPSS, Chapter 2: Descriptive Statistics

Forecasting in STATA: Tools and Tricks

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

RA MODEL VISUALIZATION WITH MICROSOFT EXCEL 2013 AND GEPHI

When to use Excel. When NOT to use Excel 9/24/2014

Scientific Graphing in Excel 2010

Statistical Data analysis With Excel For HSMG.632 students

GeoGebra Statistics and Probability

E x c e l : Data Analysis Tools Student Manual

A Guide to Using Excel in Physics Lab

Course Advanced Life Science 7th Grade Curriculum Extension

Step Sheet: Creating a Data Table and Charts

Using Excel for Statistics Tips and Warnings

ADD-INS: ENHANCING EXCEL

Lab 1: The metric system measurement of length and weight

Drawing a histogram using Excel

Activity 5. Two Hot, Two Cold. Introduction. Equipment Required. Collecting the Data

Graphing in excel on the Mac

Word 2010: Mail Merge to with Attachments

Simple Linear Regression, Scatterplots, and Bivariate Correlation

Using Analysis Tools: Goal Seek, Solver, and Data Tables

03 The full syllabus. 03 The full syllabus continued. For more information visit PAPER C03 FUNDAMENTALS OF BUSINESS MATHEMATICS

A Quick Guide to Using Excel 2007 s Regression Analysis Tool

In this example, Mrs. Smith is looking to create graphs that represent the ethnic diversity of the 24 students in her 4 th grade class.

Transcription:

89 APPENDIX A Using Microsoft Excel for Error Analysis This appendix refers to the sample0.xls file available for download from the class web page. This file illustrates how to use various features of Microsoft Excel for error analysis purposes. It will also be useful if you reread Graph and Fit Data with MS Excelsection from the University/General Physics laboratory manual before working through this appendix. It will help to recall how to enter data and perform editing and formatting of data in MS Excel. Suppose that you have performed a series of measurements of two physical quantities x and y. Quantity x is measured in some imaginary units draps and quantity y is measured in some imaginary units cooms. We will begin with the Main Data -worksheet of the file, sample0.xls. Only one measurement was performed for each value of x. These values are entered in column A. If the measuring device, which was used to collect x-values, has the smallest increment on its scale of 0.2 draps then the instrumental uncertainty of this device is at least 0.1 draps 1. This minimum instrumental uncertainty is entered into column C in the same worksheet. Depending on the circumstances, the instrumental uncertainty can be even greater. For instance, it may be that you were not able to read the device s scale clearly or the reading was fluctuating. If this is the case, you can increase the instrumental uncertainty as you feel appropriate. Since every value of x was only measured once, the instrumental uncertainty is the only source of uncertainty we have for this quantity. Next, every value of y was measured 9 times. These values are entered in columns D through L of the same worksheet. The measuring device used to measure y has the smallest scale increment of 0.15 cooms. So, the instrumental uncertainty for this device is 0.08 cooms (half of the smallest increment rounded to one significant figure). This uncertainty is entered in column N. Often, you will be required to average a set of data points. The statistical theory term for average is called the mean. The built-in MS-Excel function =AVERAGE(Range) is used to do this. These values are calculated in column O. 1 Note that it does not matter if you have an analog or digital measuring device. The instrumental uncertainty is at least half of the smallest increment on the scale of the analog device and at least half of the last digit read by the digital device.

90 The mean value of y (equation 0.1) is calculated based on all 9 measurements for each x- data point. Standard deviation measures how widely spread the values in a data set are. If the data points are close to the mean, then the standard deviation is small. As well, if many data points are far from the mean, then the standard deviation is large. If all the data values are equal, then the standard deviation is zero. The standard deviation (equation 0.4) among the measurements is calculated in the Main Data worksheet. The built-in MS-Excel function =STDEV(Range) is used to do that in column P. In order to calculate the statistical uncertainty for each of the y-values based on equation (0.11), the appropriate Student s coefficient has to be chosen from the table from my introductory lecture. For each set of 9 measurements, its value is 2.3. Column Q in the same worksheet contains the function, =IF(COUNT(Range)>15,2,LOOKUP(COUNT(Range),{2,3,4,5,6,7,8,9,10,11,12,13,14,1 5},{12.7,4.3,3.2,2.8,2.6,2.4,2.4,2.3,2.3,2.2,2.2,2.2,2.1,2})), which illustrates how complex operations can be completed automatically using built in MS-Excel functions If you do not want to copy this rather long statement, you can use a special function =STU(Range) (see column R ). This function is not a part of the standard MS-Excel package, as its code was written by me. If you know how to program in Visual Basic program language, you can take a look at this code by activating Visual Basic Editor ([Alt]-[F11]) in your MS-Excel window. The code is located in the StudentCoefficients -module. If you do not know how to program in Visual Basic you can still use this function. To do this you shall download the StudentCoefficients.bas file from the class web page and then import it into any of your MS-Excel file. To import, open the Visual Basic Editor,,go to the Import file option ([Ctrl]-[M]), then finish by clicking on appropriate file. Now we can calculate the statistical uncertainty of y-values according to equations (0.9) and (0.11). This is done in column S using standard MS-Excel functions or in column T using my own =DELTAS(Range) function. You can use this function by downloading and installing the StatisticalUncertainty.bas-file, using the same procedure as for StudentCoefficients.bas file. Note that both these modules have to be installed in order for the second one to work.

91 The total uncertainty of y-value, which according to equation (0.12) depends on both instrumental and statistical uncertainty, is calculated in column U. In column V the same uncertainty is found in one step with the help of my own function =DELTAT(Range, Value), which is also available for download as Uncertainty.bas file. It has to be installed in a same way as previous two modules and only works when those two previous modules are installed. Now when we have collected all the data and determined the uncertainty for these data, we are ready to graph y vs. x dependence. Refer to the directions in Graph and Fit Data with MS Excel-section from the University/General Physics laboratory manual on how to do that. The results are presented in the Chart (Y vs. X) worksheet of the sample0.xls file. The x-values for this graph are taken from column A of the Main Data -worksheet, the y-values are taken from column O of the Main Data -worksheet, the x-error bars are from column C, and the y-error bar are from columns U or V. Note that the built-in options of MS-Excel best-fit Trendline allow you to display the R-squared value for the correlation coefficient from equation (0.14) to see how well your data actually fit the linear pattern. Also note that the built-in MS-Excel function =INDEX(INDEX(LINEST(Yrange, Xrange, TRUE, TRUE),1),1) allows you to find the slope of the best-fit line (see cell E15 in the Main Data -worksheet), the built-in MS-Excel function =INDEX(INDEX(LINEST(Yrange, Xrange, TRUE, TRUE),1),2) allows you to find the intercept of the best-fit line (see cell E16 in the Main Data - worksheet), the built-in MS-Excel function =INDEX(INDEX(LINEST(Yrange, Xrange, TRUE, TRUE),2),1) allows you to find the uncertainty of the slope for the best-fit line (see cell G15 in the Main Data -worksheet) and the built-in MS-Excel function =INDEX(INDEX(LINEST(Yrange, Xrange, TRUE, TRUE),1),2) allows you to find the uncertainty of the intercept for the best-fit line (see cell G16 in Main Data - worksheet). This simple, automatic, best-fit line is listed in the legend on our graph as Linear (Y vs. X). Even though these built-in MS-Excel functions are very handy in calculating slopes, intercepts, and their uncertainties, they do not reflect the whole picture as it is described by equations (0.16). The standard MS-Excel functions do not take into account the fact that different y-values may have different uncertainties, which is the case, as we can see

92 from columns U or V on our worksheet. So we can only use these functions when uncertainties of y-values are unknown, alike, or negligible. In these cases the uncertainties of each y-value should not affect the uncertainties of the slope and intercept of the linear graph because the uncertainties for the slope and intercept are only calculated based on the spread of the data points near the best-fit line. In our case, however, the complete analysis, according to equations (0.16), is necessary. The Extra Data worksheet in sample0.xls file illustrates how to do that manually. Columns A, B, C, D and E in this worksheet are intermediate results necessary for different parts of equations (0.16). The quantity from these equations is calculated in the cell B14. The slope of the linear graph is found in the cell B15, the intercept in the cell B16, the uncertainty of the slope in the cell D15 and the uncertainty of the intercept in the cell D16. You can notice that all these values are slightly different from the ones found using the simplified model. Of course all the calculations presented in the Extra Data worksheet are very time consuming. This is why I have created my own MS-Excel functions to fasten the process. The function =SL(Xrange, Yrange, DELTAYrange) calculates the value of the slope in the cell E18 of the Main Data worksheet and is available for download and installation as Slope.bas file from the class web page. The function =INTE(Xrange, Yrange, DELTAYrange) calculates the value of the intercept in the cell E19 of the Main Data worksheet and is available for download and installation as Intercept.bas file from the class web page. The function =DSL(Xrange, Yrange, DELTAYrange) calculates the value of the uncertainty for the slope in the cell G18 of the Main Data worksheet and is available for download and installation as SlopeUncertainty.bas file from the class web page. Finally, the function =DINTE(Xrange, Yrange, DELTAYrange) calculates the value of the uncertainty for the intercept in the cell G19 of the Main Data worksheet and is also available for download and installation as InterceptUncertainty.bas file from the class web page. This more accurate best-fit line is also listed in the legend on our graph as Linear 2 (Y vs. X) in the Chart (Y vs. X) worksheet.

93 Using Microsoft-Excel to Study Distribution of Data Suppose that you have performed a series of measurements for the same value of the physical quantity C. This quantity C is measured in the same imaginary units cooms. The measurements are entered in column A of the Distribution Data - worksheet of the file sample0.xls. Together there are 150 measurements performed to measure the value of quantity C, as it can be seen from cell D5 of the worksheet. There are significant fluctuations between the measurements, as it can be seen from the minimum (=MIN(Range)), the maximum (= MAX(Range) ), and the mean (=AVERAGE(Range)) values calculated in cells D2, D3 and D4 for this distribution. If you are using MS-2003, the sample distribution for this data set can be found using the special Data Analysis tool package available under the Tools -menu of MS-Excel. If you can not find this tool in the menu, you should install it by clicking Add-Ins under Tools menu and choose Analysis ToolPak to be installed. Once the Data Analysis tool is installed, you should run it and choose Histogram from the list of analysis tools. If you are using MS-2007, the sample distribution for this data set can be found using the special Data Analysis tool package available under the Analysis -group of the Data-tab. If you can not find this tool in the menu, you should install it by clicking Click the Microsoft Office Button, and then click Excel Options. Click Add- Ins,and then in the Manage box, select Excel Add-ins. Click Go. In the Add-Ins available box, select the Analysis ToolPak check box, and then click OK. After you load the Analysis ToolPak, the Data Analysis command is available in the Analysis group on the Data-tab. Once the Data Analysis tool is installed, you should run it and choose Histogram from the list of analysis tools. The Histogram tool requires the input range of data. This range consists of the C- values from column A in the worksheet. It will also require the bin range. This range has been created in advance in column F of the Distribution Data -worksheet. I have chosen the size of the bin as 10 cooms. So the data points in column F are starting just below the minimum value of quantity C from the measured data, changing by 10 cooms

94 from the previous cell to the next cell, and ending just above the maximum value of quantity C from the measured data. Column F is used as the bin range for the Histogram tool. The output results are placed in columns G and H. Column G contains the same bin range, column H indicates how many times the values from the bin range were detected during the experiment among the values from the input range from column A. The data in column H is not normalized. This distribution can be normalized if all the values in column H are divided by the total number of coom measurements. These normalized frequencies are entered into column I of the worksheet. The distribution data from columns G and I are then graphed as a histogram in the Histogram chart of the sample0.xls file. This is done based on the standard graphing directions from the Graph and Fit Data with MS Excel-section of the University/General Physics laboratory manual. Columns G and I are now representing the sample distribution of our data, which we just graphed, and it is ready for further analysis to see what parent distribution it fits the best.