0% found this document useful (0 votes)
5 views

Data Analysis Spreadsheets and Graphs Procedure

Uploaded by

a.tchantaev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Data Analysis Spreadsheets and Graphs Procedure

Uploaded by

a.tchantaev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

BCHEM 144 Data Analysis: spreadsheets and graphs

This is a dry lab


There is no preparation for this week and you do not need your notebook. This is a
dry lab. You do not need to attend lab in person. Your results and report from this data
analysis lab are due at your normal report time.

This handout walks you through several examples. It is entirely


for practice before completing the graded work. The data you
need for the graded work is available in the lab report template.
Do not submit any of this practice material for evaluation.

Overview
A huge amount of time in scientific fields is devoted to data analysis- chemical and
statistical calculations, organizing and displaying data (tables and graphs), and examining
data to find and explain relationships or patterns. Spreadsheets are a tool to make this
process easier, faster, and more productive.
This lab assumes you are using Microsoft Excel. It also assumes you have a basic
familiarity with spreadsheets- enough to open a file, save a file, and some terminology (cell,
column, row, etc). If you do not know these basics, you should get an early start. Excel is
used because it is ubiquitous, has a massive collection of on-line resources, and is available
on all campus computers. You may use whatever spreadsheet program you like but the final
work MUST be saved in the Excel format (.xlsx or .xls). We do not accept other formats
because they do not work well with Canvas. We do not accept links to exterior sources (like
Google Sheets) for security reasons.
Below are step-by-step directions to guide you through common spreadsheet tasks
and walk you through a complete and detailed example. Finish the example in its entirely
and verify that your results match the example. Save your work early and often.

NOTE: Excel is regularly changed and updated. There are significant differences
between Mac and PC versions as well as student and professional versions. Due to this,
some things (buttons, menus, etc) may be different for your version. It is up to you to know
how to do these things with your version. We can help, but only if you ask early.

Goals and outcomes


After completing this exercise you should be able to use Excel to:
• carry out arithmetic calculations using data in cells
• calculate averages and common statistics using data in cells
• create organized and formatted data tables
• repeat calculations that must be done multiple times
• format numbers for significant figures
• create a labeled scatter plot

Getting data into Excel


Open a new Excel file with a blank workbook. At the top of the spreadsheet you will
see lettered columns (A, B, C, etc) and along the left side you will numbered rows (1, 2, 3,
etc). Select the box, called a cell, in column A and row 1 (cell A1) and type “Trial 1” as
shown in Figure 1 and press Enter.

Amended 08/23/23 Page 1 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

Figure 1: A blank Excel


spreadsheet. Your version of Excel
may appear slightly different. In
all versions, however, you should
see the lettered columns and
numbered rows.

Now that you know how to select cells to type in information, enter the data from
Table 1 into the spreadsheet, including the column labels (Trial, Mass beaker (g), etc).
Missing labels make your table difficult to interpret. You do not need to format the table yet.
Just get the data and labels into Excel.

Table 1: Data to calculate the density of an unknown solution


Mass Mass Initial Final Volume Density
Mass beaker + liquid volume volume delivered (g/mL)
Trial beaker (g) liquid (g) (g) (mL) (mL) (mL)
1 132.113 163.267 0.02 32.30
2 132.121 163.123 0.01 32.10
3 132.124 163.387 0.02 32.40
4 132.118 163.532 0.01 32.30
5 132.117 163.357 0.01 32.20

Part I: Basic arithmetic


To calculate a value you must choose a cell to put the calculation in and you must
start the calculation with an = sign. The = sign tells Excel that this is a calculation. Without
=, Excel treats the value as text and will not calculate anything.

Calculate the mass of liquid for the first trial


1. Click on cell D2
2. Type the following in the cell, including the equal sign: =C2-B2
3. Press Enter. You should get the value 31.154 (possibly with more decimals).
(Figure 2)

Figure 2: The picture shows an


equation being typed into cell D2. In
this equation, the value in cell B2 is
being subtracted from the value in cell
C2. After typing the equation, hit
Enter to see the result (31.154).

Amended 08/23/23 Page 2 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

Calculate the volume of liquid delivered for the first trial


1. Click on cell G2
2. Type an = sign
3. Click on cell F2
4. Type a minus sign (-)
5. Click on cell E2
6. Press Enter. You should get the value 32.28 (possibly with more decimals).
(Figure 3)

Figure 3: Here you are subtracting the value


in cell E2 from the value in cell F2.

The two calculations you just completed provide two different methods for selecting
data to use for calculations. You can type the cells directly (Part A) or you can select each
cell individually (Part B). For one-step calculations (addition, subtraction, etc) typing is
usually faster. For multi-step calculations or calculations with data in different areas of the
spreadsheet, mouse clicking can be more efficient.

Calculate the density of the solution for the first trial


1. Click on cell H2.
2. Type the following: =D2/G2
3. Press Enter. You should get the value 0.9651 (possibly with more decimals).
(Figure 4)

Figure 4: Calculation of density.


Notice the use of color coding in
Excel. Cell D2 is colored blue and
the reference in cell H2 is also
colored blue. This makes it easy
to verify what numbers or cells
are being used in a calculation.

This section demonstrated two basic math operations, subtraction (-) and division
(/). You can also multiply cells (*) and add cells (+) by using the appropriate operator.

Part II: Repeating calculations


This is where spreadsheets save enormous amounts of time. Instead of typing calculations
repeatedly like a calculator, you can type a calculation once and copy to other cells.
In column D you repeat the same calculation for every row- it is always the value in
column C minus the value in column B. Because it is repeated, it's much faster to copy the
calculation than type it again.

Using the drag feature


1. Click on cell D2 (the cell that contains the calculation you want to copy)
2. Move your cursor so that it hovers over the bottom right corner of the cell. The
cursor will change to a + sign (Figure 5a).

Amended 08/23/23 Page 3 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

3. Click the mouse or pad, hold down the button, and drag down to cell D6. Now
release the button. (You could also double-click the mouse after it turns to a +
sign. This is a handy shortcut, but has some limitations.)

a) + b)
Figure 5: a) Screenshot of the + sign that will allow you to copy
formulas across rows and columns. b) Screenshot of the filled cells.

Notice that the cells from D3 to D6 now contain the same formula but using their
respective rows (Figure 5b). For example, cell D3 contains the calculation C3-B3, cell D4
contains the calculation C4-B4, etc. Instead of typing each calculation, the drag feature
saves time and reduces typing mistakes. If you do the first calculation correctly all of the
copied ones are correct too.

Repeat this process for columns G and H


1. Click on cell G2.
2. Put the mouse cursor over the bottom right corner until it becomes a + sign.
3. Click the mouse and drag it to cell G6. Release the mouse button. (Or double
click after the + sign appears.)
4. Repeat this for the final column (H) for the density. You completed the exercise
correctly if the density column has the values shown in Figure 6.

Note: always click on a few cells after you copy a formula and double
check that the calculation is using the correct values. It is your
responsibility to verify the accuracy of calculations. If you make a
mistake in the initial calculation, that mistake will be distributed through all
columns and subsequent calculations. The calculation in column H depends
on the values calculated in Columns D and G. If D or G is incorrect it means
H is also wrong. Good practice is to do a few calculations by hand to double
check. This is another power of spreadsheets- if you do make a mistake in
one place, fixing will automatically fix any other cells that rely on that Figure 6: correct
value. In other words, you do not have to update every cell manually if density values
you set up your calculations correctly!

Part III: Calculating the mean (average) and % error

Adding new data and labels.


1. Click on cell G7
2. Type the following: Mean
3. Click on cell G8
4. Type the following: %diff
5. Click on cell G9
6. Type the following: True density
7. Click on cell H9
8. Type the following: 0.97

Amended 08/23/23 Page 4 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

The labels in cells G7, G8, and G9 tell the reader what information is contained in the
cell next to it. The value in cell H9 is the "true" or "known" density value. This value is
important to record in the table since it is the value you are comparing your measurement
to. (Figure 7)

Calculate the mean density


1. Click on cell H7
2. Type the following: =AVERAGE(
3. Click on cell H2, hold the mouse button down, and drag it
down to cell H6. Release the mouse button. Cell H7 should
now look like Figure 7 below.
4. Press Enter. You should get the value 0.968015012 (the
Figure 7: Calculation
exact number of decimals may vary). This is the mean or
of an average.
average of cells H2 through H6.

In Step 3 you selected multiple cells by clicking on one and then dragging the mouse
down the column. This is an efficient method of selecting data. It will work any time
you need to select data that is in consecutive cells (horizontally or vertically).

Calculating % error
1. Click on cell H8 and type the following: =((H7-H9)/H9)*100
2. Press Enter. You should get the value -0.2046 (possibly with more decimals).
(Figure 8)

Figure 8: Calculation
of % error.

Step 1 is the equation for percent error: ((average-true)/true)*100. Instead of


"average" and "true", you substituted the appropriate cells. The "average" value is in cell H7
(the mean) and the "true" value is in cell H9.
The percent error between the average density and the true density is negative
because the measured value is lower than the true value.
Notice the use of parentheses! If you do not use parentheses correctly, you will
get wrong answers! It's a good idea to place parentheses around each part of any multi-part
calculation. If you did not use any parentheses in Step 1 and typed: H7-H9/H9*100, you
would get a value of -99. The value is correct mathematically (following order of
operations), but it is not the correct equation for percent error.
You must use parentheses to control the order that Excel carries out a calculation.
Excel always follows PEMDAS!
1. parentheses (this is why they're important…they are considered first!)
2. exponents
3. multiplication
4. division
5. addition
6. subtraction

Amended 08/23/23 Page 5 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

Part IV: Formatting numerical values


The significant figures in a number provide important
information about precision. Unfortunately, Excel does not know
anything about significant figures. It is up to the user to format
numbers correctly. In your results so far, most values have far too
many digits and some have too few because Excel drops trailing zeros
that may actually be significant.

Formatting Numbers in Column D


1. Click on cell D2, hold down the mouse button, and drag
down to cell D6. This will select all of the numbers in this
column.
2. Right click anywhere in your selection. A small menu will
pop up similar to the one in Figure 9.
3. In the menu, click on Format Cells. This opens the
formatting options (Figure 10).
4. In the tabs at the top of the Format Cells window, click on
Number
5. In the Category box on the left, click on Number.
Figure 9: Selecting
Format Cells. Your menu
may have different
options shown but
Format Cells... should be
in the list.
Figure 10: Box that shows how
to set the decimal places to 3.
You should be in the tab
“Number” and the Category
“Number”. The decimal place box
is circled in red.

6. In the Decimal Places box on the right, set it to 3. (You can use this option to set
any number of decimal places you would like. In this example, the balance gives
three decimal places.)
7. Click OK. All of your numbers in column D should now show three decimal places,
including the value in D6, which should show the trailing zero (31.240).

Column F should have two decimal points (common for a burette) but if the second
digit is zero, Excel does not automatically show it. You must format the cell properly to
show the correct number of decimals.
Note: Many versions of Excel have a short-cut button on the default toolbar that will
adjust the number of decimal places without the need to use the menu. The menu option is
presented here because there are many other powerful tools in this menu.

Formatting values in Column F


8. Click on cell F2, hold down the mouse button, and drag down to cell F6. This will
select all of the numbers in this column.
9. Right click anywhere in your selection. A small menu will pop up.
10. In the menu, click on Format Cells.
11. In the tabs at the top of the Format Cells window, click on Number

Amended 08/23/23 Page 6 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

12. In the Category box on the left, click on Number


13. In the Decimal Places box on the right, set it to 2.
14. Click OK. All of your numbers in column F should now show two
decimal places.
15. Repeat steps 8-14 for all of the values in column H (density
and the statistics calculations) to make them show only two
decimal points. You know you are correct when column H looks
like Figure 11.
Figure 11: Density and
Part V: Formatting tables statistics formatted
So far you have input data, calculated values, formatted values correctly to two decimals.
for significant figures, and labeled everything. This looks very much
like a data table. There is a problem though. If you print out the document now, you have
no idea how it will look. The table may be so wide (or long) that rows or columns fall on
different pages. It is your responsibility to create a table that is readable and professional.
(Figure 12)

Figure 12: Image showing what a good table should look like, with gridlines and labels. It
may also be helpful to use formatting to differentiate column labels from data and
calculated data (mean, %diff).

Placing columns and rows on one page


When you print a data table you want it to be on one complete page. If that is not
possible (because the table is very wide, very long, or both) then you want the columns and
rows to break at logical points. You must do this…Excel will not do it for you.
Press Ctrl-P to bring up the printing options and select Preview. Check to be sure
data tables fit entirely onto one page. You may put multiple tables on the same page, but
each table should be completely on a single page with no breaks in the middle of a table.
If the data table is too wide, there are a few options:
1) Try using shorter (but still understandable) labels.
2) Press Ctrl-P to bring up the printing options and change the page formatting to
Landscape format (instead of Portrait). This will give you some extra width.

Creating grid lines


For small tables like the ones you create in this lab, gridlines can help a reader find
information quickly. For very large tables gridlines can actually make reading the table very
difficult and are usually not included. Ultimately, it is up to the author to determine how
many and what type of lines to use. You want your tables to look professional as well as be
informative. To turn on grid lines:

Amended 08/23/23 Page 7 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

1. Click cell A1, hold down the mouse button, and drag to cell H9. This will select all
of the data in the spreadsheet.
2. Right click anywhere in the area you selected.
3. In the menu that pops up, click on Format Cells.
4. In the tabs at the top of the Format Cells window, click on Border.
5. In the Border box at the lower left, select which lines you would like to show. For
small tables, you want to turn on all of the vertical and horizontal lines.
6. Click OK.
7. Press Ctrl-P and go to the Print Preview option to see the gridlines.

Table titles and captions


Every table should have a table number and an informative caption or title. Table
numbers allow you to refer to the table (e.g. "see Table 1") rather than repeating data. The
title or caption tells the reader exactly what is in table rather than making them figure it
out. To include these items:
1. Move the cursor over the Row 1 label (on the left side of the screen). The cursor
should change to an arrow pointing to the right.
2. Click once. This will select the entire row.
3. Right click anywhere in the area you selected and on the menu click Insert. This
will insert one row above the row you selected.
4. In cell A1 (which is now blank) type the following: Table 1- Data to calculate
density of an unknown solution.
5. Press Enter. When printed your table now includes a table number and title.

Notice that after adding a row for the table number and caption all of the calculations
automatically update and are still correct even though the row numbers for the data
changed. This is another advantage to spreadsheets- you can add, remove, and change
formatting and data without affecting the calculations.

Part VI: Graphing data


Data tables are great for summarizing a small amount of data in a concise and useful
way. Unfortunately they are not useful for showing large amounts of data, patterns, or
complex relationships. Spreadsheets address this problem by giving you tools to visualize
data.
Visualizing data refers to creating charts, graphs, or other visual representations of
numbers. Graphs and charts help readers see patterns, trends, and relationships that are
not obvious in a table. This is the most important piece of an analysis- presenting results in
an understandable way.

Creating a graph # of candles Heat (J)


1. Start with a fresh worksheet. There are
several options- close and then open 1 111
Excel, click on a different sheet (there are 2 212
Table 2: Heat
small tabs near the bottom of the 3 434
produced by
workbook labeled "Sheet 1," "Sheet 2," 6 654
etc), or click File (typically in the upper
varying numbers
9 976
left) and select New. of candles.
18 1657
2. Enter the data from Table 2 into Excel
32 2876
until it looks like the upper left corner of
Figure 13.

Amended 08/23/23 Page 8 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

Figure 13: Image of Excel plot.


Your plot may appear slightly
different depending on the exact
version of Excel.

Note: Excel will always assume the left-most column of data you select is the x-axis
(horizontal, independent variable) and the right-most column you select is the y-axis
(vertical, dependent variable). Flipping your axes will give graphs that are very confusing!

3. Select the data you want to graph. Click on cell A1, hold down the mouse
button, and drag to cell B7.
4. In the menu at the top of the screen, click on Insert.
5. In the Charts area, select Scatter. (Note, if you do not see a charts area, you
may need to search for instructions on how to add a scatter plot for your
particular version of Microsoft Excel.)
6. Choose the Scatter with Only Markers plot (upper left option in the Scatter
menu). A plot will appear on top of the worksheet. All the data you selected is
treated as a set of coordinates and those points are plotted. Your plot should look
like the one in Figure 13.
7. A new tab called Chart Tools has been added to the menu bar at the top.In the
Chart Tools menu, choose Layout.
8. Give the plot a title:
a. Click on Chart Title. (In some versions of Excel you can click on the text
box called “Chart Title” at the top of the plot and edit the text.)
b. Choose Centered Overlay Tile. A Title is now added to the plot.
c. Change the title to Graph 1: Heat produced vs Number of Candles
9. Label the independent variable (x-axis):
a. Click on Axis Titles.
b. Now choose Primary Horizontal Axis Title.
c. Choose Title Below Axis.
d. Replace Axis Title with Number of Candles.
e. Note: if the values have units you should include the units with the label.
10. Label the dependent variable axis (y-axis).
a. Click on Axis Titles.
b. Now choose Primary Vertical Axis Title.
c. Choose Rotated Tile.
d. Replace Axis Title with Heat produced (J).
e. Note: if the values have units you should include the units with the label,
usually units are placed in (parentheses).

After completing step 10, your plot should look like Figure 14.

Amended 08/23/23 Page 9 of 10


BCHEM 144 Data Analysis: spreadsheets and graphs

Figure 14: Example plot of data


with a descriptive chart title and
axis labels.

The plot you created visually shows the relationship between the number of candles and the
amount of heat produced. The points appear to form a line (i.e. they have a linear
relationship, meaning that as you increase the number of candles, the amount of heat
increases proportionally.)

Part VII: Copying Excel data to a document


To copy data from Excel to a word processor, use your mouse to select the item you
want to copy. To copy cells, select all the cells you want to copy, then right click and select
copy. To copy a graph or table, select the graph, right click, and select copy.
After you copy the data or graph, select where you want to put the data or graph in
your word processor, right click, and select paste. You can move the object you copied
around as you choose.

You are now ready to complete the report. Download the report template
from Canvas. It contains all of the data and questions for the report.

Do NOT submit any of this practice material for evaluation.

Amended 08/23/23 Page 10 of 10

You might also like