1 - Saddleback College

Chem 1B
Saddleback College
Dr. White
1 Activity 1: Graphing with Excel 


Objectives To graph linear relationships by hand and using Microsoft Excel To use the graphs to solve for unknowns To practice manipulating data to get a linear relationship between variables Introduction Graphs are a useful tool for displaying scientific data because they show relationships among variables in a compact, visual form. You may have used x-­y graphs, or Cartesian graphs, in your math classes. Expressing mathematical relationships in a graphical format is fundamental to the presentation of data both to the technological and lay audience. Natural and virtual phenomena obey physical laws that are expressed by equations. The equations are represented by graphs in 2-­‐, 3-­‐, 4-­‐ or more dimensions. In several labs for Chemistry 1B, a primary goal will be to find the mathematical or geometric relationship between two variable physical parameters. For example, you might wish to know the relationship between the pressure exerted by a gas and its temperature. Graphs are tools we use to aid our understanding of the relationships among variables. Plotting a graph provides us with a visual image of the data and the relationship(s) between variables and the ability to predict the results of changes in the system. DETERMINING THE INDEPENDENT VARIABLE In an experiment, the independent variable is the property that is under control and can be varied. The dependent variable is the property that is measured, observed, counted or found. The dependent variable changes when the independent variable changes. The independent variable is usually assigned to be the x value, and the dependent variable is usually assigned to be the y value. THE LINE OF BEST FIT A line of best fit (or "trend" line) is a straight line that best represents the data on a scatter plot. This line may pass through some of the points, none of the points, or all of the points. The trend line shows the relationship between the variables that were graphed. It also gives a way to calculate an unknown variable. As you know, the equation of a straight line is represented by y = mx + b (1) where y is the dependent variable, x is the independent variable, m is the slope and b is the y-­‐intercept. Today we will be graphing by hand and using Microsoft Excel. Microsoft Excel can be used to find the trend line, but for your graph done by hand, you need to determine the slope and the y-­‐intercept so that you can determine the equation of your trend line. Finding b is easy; just see where the line crosses the y-­‐axis. In order to find m, we must do a calculation: (2) The following picture shows how the slope is determined: Once you have your graph with a trend line and an equation, you can determine an unknown x or y value using 2 techniques. The first technique is to use the line on the graph. For example, if you are given a x value and you want to find the corresponding y value, find the x value on the axis, draw a vertical line to get the to the trend line and Chem 1B
Saddleback College
Dr. White
2 then draw a horizontal line to the y-­‐axis to find the y value. The second technique is to use the equation of the line. For example, if you are given an x value, plug the x-­‐value into the equation and solve for y. This technique is preferred since it gives more accurate results. The following 3 exercises will give you practice with graphs and graphing. You will create 3 graphs as described below and use the graphs to answer questions in the results section on page 6. You will turn in your graphs along with the results section. Exercise #1: Graphing Data by Hand SCENARIO: The pressure in atmospheres was measured at different temperatures for a gas at a constant volume. The following data was obtained. Temperature (K) Pressure (atm) 50. 0.1314 100. 0.2632 200. 0.5263 300. 0.7895 400. 1.0526 450. 1.1814 500. 1.3161 Graph the data on the grid provided in the results section. Make the scales so that the maximum amount of graph paper along each axis is utilized. Also, be sure to label each axis with the type of measurement and units used. Draw a best-­‐fit line through the points. Determine the slope and intercept and then the equation of the line. Finally, determine the pressure at 350. K using the two methods described above. Graphing Exercise #2: Graphing Data Using Excel SCENARIO: You are given five solutions which contain different concentrations of cobalt (II) chloride. You analyze these samples using spectrophotometry, a technique which measures light absorption and transmittance. Below are the relevant data: Concentration of CoCl2 (M) 2.4 x 10-­‐4 4.8 x 10-­‐4 7.2 x 10-­‐4 9.6 x 10-­‐4 1.2 x 10-­‐3 Absorbance 0.101 0.272 0.389 0.542 0.681 1.
Launch Excel by clicking on the icon and enter the data into the spreadsheet. Reserve the first row for column labels. The independent variable Put the x values into the spreadsheet to the left of the y values as shown to the left. (NOTE: A way of expressing an exponent in Excel is "E" to the respective power. For example, 2.4 x 10-­‐4 should be input into Excel as "2.4E-­‐4") 2. Highlight the set of data which you wish to graph and choose Charts from the Insert tab at the top of the page. Chem 1B
Saddleback College
Dr. White
3 3. Choose Scatter chart type, then the scatter chart with points, no lines as shown below: 4. From the Design tab, choose black points with a white background: 5. From the Layout tab, you can add the Chart Title and the Axis Titles by clicking on those icons. Also, you can delete the legend by clicking on the Legend icon since it is not needed when only one set of data is plotted on a graph. Always label all axes and graphs with meaningful, self-­explanatory titles. Your titles should not include"vs.". For the graph you are creating in this part, a good title might be something like “Absorbance as a Function of Concentration for Cobalt (II) Chloride”. Also, always label the axes and include the units in parentheses. I will look for these titles and labels in all the graphs you create this semester. Chem 1B
Saddleback College
Dr. White
6. Select the graph (do this by clicking it), then click on the Trendline icon on the top right of the toolbar. Select “Linear Trendline.” (the second option) 7. Under the Trendline icon select "More Trendline Options": 8. Select the last 2 options in the dialog box that appears (“Display Equation of chart” and “Display R-­squared value on chart”): 9. You will now see an equation and R2* value on your chart. 4 Chem 1B
Saddleback College
Dr. White
5 *NOTE: the program will fit a straight line to the data no matter how good or how awful the data. You must judge the quality of the fit and the suitability of this type of fit to your data set. Along with the curve fit and equation, the program generates an R2 value which gives an indication of how well the data is fit by the equation. The closer the R2 value is to 1, the better the fit. Generally, R2 values of 0.95 or higher are considered reasonable fits. Also note that Microsoft Excel does not consider significant figures in the given slope and y-­‐intercept. You muct look at the data you used to create the graph to determine sig figs! 10. Type your name into a cell on the graph (so that you can claim your graph once you print it). Print the graph by selecting the File tab at the top left of the screen. Be sure that your data, name, and graph appears in the preview (I had to change the orientation option to landscape to get everything to fit): Exercise #3: Choosing the Correct Parameters for Graphing SCENARIO: The following represents data from an experiment which measures the rate constant for the gas phase decomposition of hydrogen iodide as a function of temperature. This data set is not linear, so you must linearize it. That is, you must perform different functions on both T and k before you plot the data. (First convince yourself that this data is not linear by plotting it as is in Excel using the steps in Exercise #2) Temperature, T (K) Rate Constant, k (s-­1) 556 3.52 x 10-­‐7 629 3.02 x 10-­‐5 666 2.19 x 10-­‐4 700 1.16 x 10-­‐3 781 3.95 x 10-­‐2 Given the following equation: ln k = −E a ⎛⎜ 1 ⎞⎟ + ln A (3) R ⎝ T ⎠
decide what to graph to get a straight line (Hint: relate equation 3 to y=mx + b). Plot the data in the correct form and fit a trendline using Excel. Determine the value of Ea and A. R is a constant and is equal to 8.314J/mol K. Note: when € you take the natural log of something, the units disappear
Chem 1B
Saddleback College
Name: ______________________________________ Dr. White
6 Lab Day/Time: ___________________ Activity 1: Graphing with Excel Exercise #1: Graphing Data by Hand Independent Variable _______________________________Dependent Variable ____________________________________ Calculation for m: Calculation for b: Chem 1B
Saddleback College
Slope:____________________ Dr. White
(include units) Intercept: ___________________ (include units) Equation of the line: ____________________________________ •
Report the pressure at 350. K seconds using •
extrapolation/eyeball method: ____________________________ •
the equation of the line (show your work below) ____________________________ Exercise #2: Graphing Data Using Excel Which data go on the: x-­‐axis? y-­‐axis? •
Would you say the fit of the line to your data is good? Why? •
Report the concentration (in M) of an unknown solution with an absorbance of 0.60 using •
extrapolation/eyeball method: ____________________________ •
the equation of the line (show your work below) ____________________________ Print your graph and attach it to the report. Remember to include the equation for the fit to the data, to label the axes and to provide a descriptive title for this graph. 7 Chem 1B
Saddleback College
Dr. White
Exercise #3: Choosing Correct Parameters for Graphing In order to get a linear graph from the given data (see equation 3) what goes on the: x-­‐axis? y-­‐axis? •
Which term in the given equation corresponds to the slope of the line? •
From your linear plot, determine a. the value of Ea (kJ/mol) b. the value of A (no units) Please show your work in the space below. a. b. Print your graph and attach it to the report. Remember to include the equation for the fit to the data, to label the axes and to provide a descriptive title for this graph. 8