Chem. 31 – 9/23 Lecture Guest Lecture Dr. Roy Dixon Announcements • Small renewable resources company looking for interns for chemical analysis work (see bulletin board outside 446) • Additional Problem with no name on it • Due Today – Pipet/Buret Calibration Lab Report • Today’s Lecture – Error and Uncertainty • Finish up Statistical Tests – Least Squares Calibration (last part of Chapter 4) Statistical Tests t Tests - Review • Case 1 – used to determine if there is a significant bias by measuring a test standard and determining if there is a significant difference between the known and measured concentration • Case 2 – used to determine if there is a significant differences between two methods (or samples) by measuring one sample multiple times by each method (or each sample multiple times) • Case 3 – used to determine if there is a significant difference between two methods (or sample sets) by measuring multiple samples once by each method (or each sample in each set once) Case 2 t test Example • A winemaker found a barrel of wine that was labeled as a merlot, but was suspected of being part of a chardonnay wine batch and was obviously mis-labeled. To see if it was part of the chardonnay batch, the mislabeled barrel wine and the chardonnay batch were analzyed for alcohol content. The results were as follows: – Mislabeled wine: n = 6, mean = 12.61%, S = 0.52% – Chardonnay wine: n = 4, mean = 12.53%, S = 0.48% • Determine if there is a statistically significant difference in the ethanol content. Case 3 t Test Example • Case 3 t Test used when multiple samples are analyzed by two different methods (only once each method) • Useful for establishing if there is a constant systematic error • Example: Cl- in Ohio rainwater measured by Dixon and PNL (14 samples) Case 3 t Test Example – Data Set and Calculations Calculations Conc. of Cl- in Rainwater (Units = uM) Step 1 – Calculate Difference Sample # Dixon Cl- PNL Cl- 1 9.9 17.0 7.1 2 2.3 11.0 8.7 3 23.8 28.0 4.2 4 8.0 13.0 5.0 5 1.7 7.9 6.2 6 2.3 11.0 8.7 7 1.9 9.9 8.0 8 4.2 11.0 6.8 9 3.2 13.0 9.8 10 3.9 10.0 6.1 11 2.7 9.7 7.0 12 3.8 8.2 4.4 13 2.4 10.0 7.6 14 2.2 11.0 8.8 Step 2 - Calculate mean and standard deviation in differences ave d = (7.1 + 8.7 + ...)/14 ave d = 7.49 Sd = 2.44 Step 3 – Calculate t value: tCalc d Sd tCalc = 11.5 n Case 3 t Test Example – Rest of Calculations • Step 4 – look up tTable – (t(95%, 13 degrees of freedom) = 2.17) • Step 5 – Compare tCalc with tTable, draw conclusion – tCalc >> tTable so difference is significant t- Tests • Note: These (case 2 and 3) can be applied to two different senarios: – samples (e.g. sample A and sample B, do they have the same % Ca?) – methods (analysis method A vs. analysis method B) F - Test • Similar methodology as t tests but to compare standard deviations between two methods to determine if there is a statistical difference in precision between the two methods (or variability between two sample sets) FCalc S1 > S2 S12 2 S2 As with t tests, if FCalc > FTable, difference is statistically significant Grubbs Test Example • Purpose: To determine if an “outlier” data point can be removed from a data set • Data points can be removed if observations suggest systematic errors •Example: •Cl lab – 4 trials with values of 30.98%, 30.87%, 31.05%, and 31.00%. •Student would like less variability (to get full points for precision) •Data point farthest from others is most suspicious (so 30.87%) •Demonstrate calculations Dealing with Poor Quality Data • If Grubbs test fails, what can be done to improve precision? – design study to reduce standard deviations (e.g. use more precise tools) – make more measurements (this may make an outlier more extreme and should decrease confidence interval) Statistical Test Questions 1. A chemist has developed a new test to measure gamma hydroxybutyrate that is expected to be faster and more precise than a standard method. What test should be used to test for improved precision? Are multiple samples needed or multiple analyses of a single sample? 2. The chemist now wants to compare the accuracy for measuring gamma hydroxybutyrate in alcoholic beverages. Describe a test to determine if the method is accurate. Calibration • • • • For many classical methods direct measurements are used (mass or volume delivered) Balances and Burets need calibration, but then reading is correct (or corrected) For many instruments, signal is only empirically related to concentration Example Atomic Absorption Spectroscopy – Measure is light absorbed by “free” metal atoms in flame – Conc. of atoms depends on flame conditions, nebulization rate, many parameters – It is not possible to measure light absorbance and directly determine conc. of metal in solution – Instead, standards (known conc.) are used and response is measured Light beam To light Detector Method of Least Squares • Purpose of least squares method: – determine the best fit curve through the data – for linear model, y = mx + b, least squares determines best m and b values to fit the x, y data set – note: y = measurement or response, x = concentration, mass or moles • How method works: – the principle is to select m and b values that minimize the sum of the square of the deviations from the line (minimize Σ[yi – (mxi + b)]2) – in lab we will use Excel to perform linear least squares method Example of Calibration Plot 300 Best Fit Line Equation Mannosan Calibration Best Fit Line y = 541.09x + 6.9673 2 R = 0.9799 250 Peak Area 200 150 Deviations from line 100 50 0 0 0.1 0.2 0.3 Conc. (ppm) 0.4 0.5 0.6 Assumptions for Linear Least Squares Analysis to Work Well • Actual relationship is linear • All uncertainty is associated with the yaxis • The uncertainty in the y-axis is constant Calibration and Least Squares - number of calibration standards (N) N 1 2 3 4 Conditions Must assume 0 response for 0 conc.; standard must be perfect; linearity must be perfect Gives m and b but no information on uncertainty from calibration Methods 1 and 2 result in lower accuracy, undefined precision Minimum number of standards to get information on validity of line fit Good number of standards for linear equation (if standards made o.k.) More standards may be needed for non-linear curves, or samples with large ranges of concentrations Use of Calibration Curve An unknown solution gives an absorbance of 0.621 Use equation to predict unknown conc. y = mx + b x = (y – b)/m x = (0.621 + 0.0131)/2.03 x = 0.312 ppm Can check value graphically Calibration “Curve” 1.0 0.8 Absorbance Mg Example: y = 2.0343x - 0.0131 R2 = 0.9966 0.6 0.4 0.2 0.0 0.00 0.10 0.20 0.30 Mg Conc. (ppm) 0.40 0.50 Use of Calibration Curve - Uncertainty in Unknown Concentration Uncertainty given by Sx (see below): Sy Sx m 1 1 ( yi y )2 k n m( xi x )2 Notes on equation: m = slope, Sy = standard error in y n = #calibration stds k = # analyses of unknown, xi = indiv std conc., yi = unknown response The biggest factors are Sy and m Two other parameters that often indicate calibration quality are R2 and b. R2 should be close to 1 (good is generally >0.999); b should be small relative to y of lowest standard. Use of Calibration Curve - Quality of Results – Calibration Results • R2 value (measure of variability of response due to conc.) • Reasonable fit PoorCalibration R^2 Value Good 0.25 12.0000 Relative Peak Absorbance (490Area nm) • Quality of Results Depends on: y = 0.3634x - 0.1009 R20.9998 = y = 0.0041x + 0.0107 10.0000 0.2 8.0000 R2 = 0.9622 0.15 6.0000 4.0000 0.1 2.0000 0.05 0.0000 0 0 0 5 10 10 20 15 20 30 40 Conc. (ppm) 25 30 50 60 Galactose Standard (ug) – Range of Unknown Concentrations Line fit through Curve 600 • next slide y = 262.44x + 37.034 R2 = 0.9772 500 Peak Area Better fit by curve 400 MN 300 Linear (MN) 200 100 0 0 0.5 1 1.5 LG Conc. (ppm ) 2 2.5 Use of Calibration Curve - Quality of Results 0.8 Absorbance – Calibration Results 1.0 0.0 0.00 0.10 0.20 0.30 0.40 0.50 Mg Conc. (ppm) Relative Uncertainty Absolute Uncertainty 60 0.014 50 % Uncertainty • Extrapolation outside of range of standards should be avoided • Best concentration range 0.4 0.2 • on last slide – Range of Unknown Concentrations y = 2.0343x - 0.0131 R2 = 0.9966 0.6 Uncertainty in Conc. (ppm) • Quality of Results Depends on: Range of Standards (0.02 to 0.4 ppm) 0.012 0.010 40 0.008 30 0.006 20 0.004 10 0.002 Best Range: upper 2/3rds of standard range 0.000 0 0.00 0.10 0.20 0.30 0.40 0.00 0.10 0.20 0.30 Mg Conc. (ppm) 0.40 Mg Conc. (ppm) 0.50 0.50 Calibration Question • A student is measuring the concentrations of caffeine in drinks using an instrument. She calibrates the instruments using standards ranging from 25 to 500 mg/L. The calibration line is: Response = 7.21*(Conc.) – 47 The response for caffeine in tea and in espresso are 1288 and 9841, respectively. What are the caffeine concentrations? Are these values reliable? If not reliable, how could the measurement be improved?