370 likes | 566 Vues
Design of Experiments and Data Analysis. Let’s Work an Example. Data obtained from MS Thesis Studied the “bioavailability” of metals in sediment cores We’ll analyze chromium data. Pt. Mugu Marsh. Analytical Techniques. Sediment samples were taken with cores Sliced into 1 cm slices
E N D
Let’s Work an Example • Data obtained from MS Thesis • Studied the “bioavailability” of metals in sediment cores • We’ll analyze chromium data
Analytical Techniques • Sediment samples were taken with cores • Sliced into 1 cm slices • Sediment in each slice was extracted using a strong acid • Extracts were analyzed using an Inductively Coupled Plasma Mass Spectrometer (ICP-MS) • Calibrations were also conducted • Surfaces areas (SA) and organic carbon (OC) contents of sediment in each slice were also measured
Objectives • To determine if there is a correlation between sediment surface area and organic carbon content • To determine if there is a relationship between concentration of a specific metal and sediment SA and/or OC • To determine if there is a relationship between or among metal concentrations
Data File • Create a folder entitled “REU” in the C:\My Documents folder • Create a folder entitled “2006” in this REU folder • Create a folder entitled “Data Analysis Workshop” in this 2006 folder • Download Excel File REU_dataanalysis_data.xls from instructional1.calstatela.edu/ckhachi into the Data Analysis Workshop folder • Open the file
Data File Structure • There should be 2 worksheets in the workbook: • Data: raw SA, OC, and metals concentration data • Calibration Curves: ICP-MS calibration data (relating raw metals concentrations to known calibration concentrations) • Data for the cores are separated by yellow bands
Data File Structure • Data Columns include: • ID: Random sample ID • Ave Depth: Ave depth of each slice • Solid Mass: Mass of sediments in each slice • Raw ICP-MS data for each of five metals • Calibration Columns include: • Conc: Concentration of standards in parts per billion (ppb) • ICP-MS responses for the 5 metals
Let’s Start with Calibration Curves • Most instruments over reasonable ranges have linear responses (i.e., calibration curves are straight lines) • We need to “model” the data – regression analysis to determine the best-fit line that relates ICP-MS response to concentrations • We will then use these calibration equations to calculate concentrations for our samples • Note: because we know that calibrations are usually linear, we will choose a linear regression model…if you don’t know the relationship b/w 2 variables, it sometimes helps to start with plots
Calibration Curve for Cr • Linear response • We know slope and intercept • R2 value provided • Best-fit line drawn (looks good to me) • Not enough statistical information provided to be able to conduct proper error analysis
Regression Analysis for Cr Rename Worksheet “Cr Analysis”
Assumptions • On average, errors are not consistently positive nor negative. • Linear Model: yi = mx + b + ei, where ei is the error associated with each observation • Line goes through the middle of data • Variance of error terms the same across all observations • Data are independent of each other • Error terms are normally distributed (not that important)
Residual Plot Look at data and linear fit carefully; points lie above the line for smaller values of concentration. If you delete the last point, you get a very different result
Regression Statistics • Multiple R (or just r) is the correlation: • +1 perfectly positively correlated (as x goes up, so does y) • 0 not correlated • -1 perfectly negatively correlated (as x goes up, y goes down)
Regression Statistics • R Square (R2): coefficient of determination • Between 0 and 1 • 0 no linear relationship • 1 perfect linear relationship (+ or -) • Square of the r value • Theoretically, as the number of data points ∞, R2 1 (denominator is fixed) • Adjusted R Square: fixes this problem…is probably a better measure of how strong the linear relationship is (R2 more common) • Use 2 or 3 significant figures to report these #s
Regression Statistics • Standard Error: a measure of the amount of error in the prediction of y for an individual x. • Observations: # of data points
ANOVA • ANalysis Of VAriance (sometimes called an F test) • df: degrees of freedom • SS: sum of squares R2 = (1-SSresidual)/SStotal • MS: Mean squares = SS/df • F = MSregression/MSresidual larger reject null hypothesis (no correlation) • Not very useful for single treatment
Correlation results • Linear Calibration: y = mx + b • Slope (m) = 259.0709 • Intercept (b) = 1787.2679 • Standard Error: used for hypothesis testing and confidence band formation
Correlation results • Confidence intervals • Intercept • Lower: 1787.2679 – 70.2724 (2.571) = 1606.597 • 2.571 standard two-tale t-test table with df = 5 and probability = 0.05 • Slope • Lower: 259.079 – 3.6280(2.571) = 249.74 • Upper: 259.079 + 3.6280(2.571) = 268.40 • t stat: = Coefficient/Standard Error
Correlation results • P-value: probability of wrongly rejecting the null hypothesis (Ho), in this case no correlation, if it is in fact true • p > 0.10 null hypothesis maybe OK • 0.10 < p < 0.05 slight evidence against null hypothesis • p < 0.05 moderate evidence against null hypothesis • p < 0.01 strong evidence against null hypothesis
Consult statistical tables again: For df = 5 and t stat = 25.4, p < 0.000005 For df = 5 and t stat = 71.4, p < 0.0000001 Very, very strong evidence that Ho is false the calibration curves are linear! Linear Model: Correlation results
Using Calibration Equations • Now we have an equation that relates the response of our equipment to concentrations • Let’s use this equation to determine concentrations in our samples
Measurement Errors • Add 2 columns to the right of the Cr data • Assume instrument has a 3% error (in reality, you need to run sample 3 times to get the proper error)
Propagation of Errors • Let us assume that X is dependent upon the experimental variables p, q, and r, which fluctuate in a random and independent way. • Addition or Subtraction: X = p + q - r: • Where “s” is the standard deviation or error for each of the variables
Propagation of Errors (cont’d) • Multiplication or Division: X = p * (q/r) • Other equations exist for logs, etc. • Round +/- to the # of decimal places of the component number with the fewest number of decimal places • Round x/÷ to the number of significant digits of the component number with the fewest significant digits.
Let’s use the Calibration Eqn • Response detector output • Concentration what we are looking for in the column labeled “Cr Conc (ppb)”
Let’s use the Calibration Eqn • Let’s look at the first line: • Rearrange to solve for Conc: • Let’s look at the numerator
Let’s use the Calibration Eqn • Num = 8156.35-1787.27 = 6369.08 • Error in Num: • Recall for +/-: • Error in Conc = • So now:
Let’s use the Calibration Eqn • Conc = • Recall, for x/÷: or • So, ErrConc = • Final result Conc = 24.58 ± 1.04
Final Results • Use error bars in the plots
Plotting Error Bars • Error bars can be: • 1-3 standard deviation(s) • Standard error • etc… • Just be clear in your figure caption what your error bar represents
Next Presentation • A little about design of experiments • A little more about errors, hypothesis testing, etc…