You are on page 1of 4

99

Using Excel

1. Entering data into Excel


This is a brief introduction to making tables and doing calculations in Excel and is
intended only for those who have not used Excel before – anyone else can skip to the
next section.
• Launch Excel
• Click on the cell where you want the title (“click” means move the cursor to the
cell and click the left mouse button)
• Type in the title and press Enter (Enter indicates you are finished putting
information in a cell).
• Type in each column title - use the →arrow button to move from one column to
another. See the sample table in the lab for titles and layout.
o Column widths can be adjusted so that words are not chopped off: move
the cursor to the bar with the column names A, B, C etc., put the cursor on
the line between letters so that it appears as a vertical line with arrows
pointing left and right, click and move the cursor right to increase the size
of the previous column.
• Use the arrow keys to move to the first column, below the title. Type in the data
(numbers only, units should be in the column header). Press Enter or the ↓ key to
move to the next data value.
• Type in all the raw data this way.
• To enter a formula for a calculated value: move to the cell you want the calculated
value in using the arrow keys, type = to indicate that you are doing a
calculation, click on the cell with the first piece of data, type in the operation to
use (e.g. +,-,*,/,^), click on the second cell, finish the equation by pressing enter.
(^ is for exponents)
• To enter a formula that has a reference to a constant value the $ symbol is used.
Example: A spreadsheet could be used to solve for the area of circles of given
radii. The formula for the area for a radius of unit 2 according to the figure below
would be: = $B$1*(A4^2)
A B

1 Pi = 3.14

2 radius area

3 1 3.14
4 2 12.57
5 3 28.27
100

• To copy a formula to a group of rows ( to get =A6/B6 in the sixth row etc.): move
the cursor to the bottom right corner of the cell with the original formula. The
cursor should turn black. Click and Drag (this means click the mouse button and
hold it down while you move the mouse) the cursor down to the bottom of the last
cell you want the formula in.
• Put lines around the cells so it looks like a table: Click and Drag to highlight the
table, right click and select Format Cells..., Border and then select whatever type
of lines seem appropriate.
• Adjust the number of decimal places displayed (sig figs): Click and Drag to
highlight the cells you want to format, right click and select Format Cells...,
Number, under category select number, and then type in the decimal places you
want in the box at the right. Format each column separately if the number of
decimal places varies.

2. Statistical analysis using Excel


The theory and equations used for statistical analysis can be found in Appendix 4. A
sample mean, sample standard deviation and the standard deviation of the mean (also
known as standard error) can all be determined using Excel. There is more than one way
of doing these calculations in Excel. In this Appendix we present one of these ways.
• At the top of the Excel window select the Customize Quick Access Toolbar
• Select More Commands...
• Select All Commands from the Choose commands from: drop down menu
• Add Add-Ins...
• Select OK
• Select the newly created Add-Ins icon at the top of the Excel window
• Check Analysis ToolPak
• Click OK
• On the Data tab select Data Analysis
• Select Descriptive Statistics
• Click on the input range icon and select the data for the sample from the worksheet
• Check box for summary statistics
• Click OK
The mean and standard error are given in the first two rows of the resulting table. These
represent the best estimate of the value being measured and the uncertainty of this
estimate. The standard deviation of the sample is also given in the output but this is not a
value that you will need in these experiments.
101

3. Graphical analysis using Excel


These instructions explain how to obtain 1. a plot of your data with error bars and a
model of the data (line of best fit and equation of the line), and 2. the error associated
with the slope and intercept of the line of best fit, as well as the residual plot.
Explanations of why you want these items and what to do with them can be found in
Tutorial Lab 1.

Graph and model of data (line of best fit)


• Enter the data and the error into an Excel table similar to the one in your lab book
• Plot the data by selecting the appropriate chart icon under the Insert tab
• Select xy (scatter) and click on the subtype with no line
• Under the Design, Layout and Format tabs of the Chart Tools
• Select the data to be plotted
• Add titles
• Remove the legend
• Remove background shading (i.e. set background to white)
• Add error bars
• Click on any point on the graph
• On the Layout tab select Error Bars, More Error Bars Options... and put in the
error using either the fixed value setting if the error is constant or the custom
section if errors are in a column of the chart (the little icon will allow you to select
the column from the chart). Repeat for the y error bars.
• Add the line of best fit and its equation to the graph.
• Right click on a data point and select add trendline
• Select linear for the type
• In options select display equation on chart (forecast can be used to extrapolate the
line of best fit)
• Click on the equation that appears and edit x and y to the appropriate variable
names.

Regression analysis to obtain errors and residual plot


• Select something outside the graph (you cannot get the right menus if you have a part
of the graph selected).
• Under the Data tab select Data Analysis (if this choice does not appear then go to Add
Ins and add the Analysis ToolPak).
• Select regression
102

• Click on the icons to select the x and y ranges


• Select residual plots
• The last table produced is the one of interest.
• The coefficient for the intercept should be the same as the intercept in the
trendline equation and the value next to it is the standard error on the intercept.
• The coefficient for the X variable should be the same as the slope in the trendline
equation and the value next to it is the standard error on the slope.

You might also like