.Appendix 5C:   Graphing With Excel:

 

1.  Introduction:

2.  Creating a Spreadsheet

3.  Creating a Graph

4.  Mathematical Fits to Graphs

5.  Mathematical Manipulation of Data

 

1. Introduction:

 

A graph can be used to show the Relationship between two related values, the independent and the dependent variables.  In this exercise we shall use graphing techniques to describe the temperature dependence of the solubility of aqueous sodium nitrate.

 

          -Independent Variable: A measurable value that you can change during the experimental data collection process (Temperature)

          -Dependent Variable:  A measurable value which changes as a function of the independent variable during the data collection process (Solubility)

 

In accordance with the scientific method, one of the objectives in graphing is to find the mathematical relationship between the dependent and the independent variables, and relate this to our theoretical understanding.  In so doing we derive a mathematical relationship where y is a function of x.  In this statement Y is the dependent variable and plotted on the ordinate (vertical) axis and X is the independent variable and plotted on the abscissa  (horizontal) axis.  Without computational software we can determine linear relationships and so we often mathematically manipulate are data to create linear relationships.  In this course we shall look at linear, reciprocal, power and single exponential functions.

 

Note, a graph can explain any type of two variable relationship, even if the mathematical relationship is not known.  Because the solubility of a salt is a very complex function chemists use graphs (solubility curves) to express the temperature dependence of solubility of a salt and not mathematical expressions.  But since there are so many types of solubility curves, this is an excellent subject to cover the different types of graphs we will be using this semester.

 

 

 

 

 

 

 

Overview:  Y = Function of X

 

1.  Linear Function:  Y=mX+b

              

Example:  T(Fahrenheit) = 1.8T(Celsius) + 32o

 

2. Power Function:   Y =aXm

              

               Example:  Rate =[Concentration]2

Creating a log/log plot gives a linear relationship (it does not matter what base  you use).

                    LogY = mlogX + loga

 

          Example:  log rate  =  2log[concentration] + log a

 

Where m is the slope of the line when plotting log rate as a function of log concentration and m represents the order of reaction.

 

3. Exponential Function  Y=aemx

 

               Example  Concentration = [Initial concentration]e-kt

          Creating a log plot gives a linear relationship

 

                    lnY = mX + lna

 

          Example:  ln[concentration] = -kt  + ln[initial concentration}

 

Where m is the slope of the line when plotting natural log of the concentration as a function of time, and m is the rate constant for the appearance of a compound in kinetics.

 

We should realize that when a simple equation does not adequately describe the relationship, we can still use the graph to predict the value of the dependent variable when we alter the independent variable over a range of known values.  In the following exercise we shall use the regression analysis software in Excel to calculate linear, power and exponential fits to the solubility of salts as a function of temperature.

 

 

 

 

 

 

2.  Creating a Spread Sheet:

 

 


Open Excel:

          -Double Click the Excel Icon

                              or

          -Click: Start/Programs/Microsoft Excel

You should see the following empty

spread sheet

 

 

Each cell is specified by its column and row.

 Here, Cell A1 is highlighted

 

-Label Your Spread Sheet

 

All data in this class must be properly

labeled and you are required to submit

the data with all graphs.  Before inputting

data you need to identify

         

 

 

-The Experiment

          -The Student

          -The Date

 

 

 

In Cell A1 type your experiment,

in cell A2 your name and in cell A3 type the date.

 

-Insert Titles for the Two Data Columns. 

Place the X-axis (vertical axis) data

to the left of the Y-axis (horizontal axis).

 

In cell B5 type:

Temperature oC

 

In cell C5 type:

Solubility of

KNO3 (g/100gH2O)

 

Note how the default value has only 1 row per

cell and the C5 cell covers the B5 cell.  First

we will Wrap text (which is like a soft return inside

of the cell) and then we will change the

cell size

-Wrap Text:

Highlight the two cells by

left clicking and dragging

the mouse over them.  With

the cells highlighted

 

Click:

 

-Format/Cells/

-Alignment/Wrap Text/OK

 

 

 

-Adjust Cell Size:

 

 


-Drag the column and

row borders as shown

until all the data can

be seen

 

 

 

 

-Center Data

Highlight the two cells

 

click:

 

Format/Cells/Alignment/

(Horizontal/Center)/

(Vertical/Center)/OK

 

 

 

 

-Create Super & Subscripts

Highlight the "o" of (oC)  in cell B5

click:

 

Format/Cells/Superscript

Repeat for cell C5 using

the subscript option. 

 

Your Spread

sheet should

look like:

 

 

 

 

 

 

 

 

 

 

 

 


-Insert Data

         

 

Note: This is a

good time to save

your data.

 

 

Always save your

data before you

start working it up!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Creating a Graph

 

 

 

 

 

 


Highlight Data by

left clicking mouse

and dragging from

cell B6 to cell C15

 

         

 

 

 

 

Choose the XY Scatter option:

You now can see what your graph will look like:

 

Click Next

 

 

 
 

 

 

 


Click

 

Next

 

 

 

 

 

 

 

 

 


 -Add labels

 

Type in title and axis descriptions, we will fix sub

and superscripts later.  Be sure to include  units!

 

You have two options  for saving the graph.

 

1. As object saves the

 graph in the original spreadsheet

 

2. As new sheet, saves the graph as a
separate sheet. (You can switch back in

forth between sheets by the file tabs in the

bottom left corner of the excel program.)

 

Click Finish

 

-Insert sub/superscripts:

 

Highlight the text in the title or axis

you wish to script. 

If you left click 2 times on the Y-axis,

it will become horizontal during this editing process

 

-Right click/ choose Format Chart (or Axis) Title/Choose the desired command (subscript or superscript) like you did when formatting the Spreadsheet. 

 

Your Graph Should look like:

 

 

 

Note:   The scales automatically start at 0.   You can change the range of the scale by right clicking on the axis, then go to the scale option and adjust your scale so that it is appropriate for your data.   

 

 

 

 

4.  Mathematical Fits to Graphs

 

We will look at three types of mathematical relationships which we will be using this semester: 

 

4A.  Linear:  Y = mX+b

4B.  Power function:  Y = aXm

Note: the log plot of a single exponential is linear

                              Y = aXm  => lnY=mlnX + lna

So the slope of the log plot is the power of the exponential

4C. Exponential Fit

                    Y=aemx è  lnY=mX + lna

 

4A. Linear Fit:

 

 

Choose

 

linear

 

 
-right click

any data pt.

 

Choose

Add

 trend line

 

 

-Adding an equation to graph:

-Click Options/toggle the display equation option (you can relocate the equation by dragging and dropping).

Your graph should look like this:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


4B.  Power Fit:

 


Right click

Data pt.

 

 

 

Format

trend line

Choose:

Power

Options

Show Eq.

 

Note, you can not graph the

 first data pt. With a zero in it.

 

 

 

 


4C.  Exponential Fit:

 

Right click

data pt.

format

trend line

exponential

 

 

 

 

 

 

 

 

 

 


Clearly the exponential fit is better for this salt, but it is not an exact fit.  It is important to realize at this point that different salts have different solubility curves.  Some appear linear, some exponential.  Some increase with temperature, others decrease.  Therefore a solubility curve is one of the best ways to describe the temperature dependence of the solubility.

 

 

 

 

 

5.  Mathematical Manipulation of Data

 

In this exercise we will convert the data to logs and reciprocals.