Vous êtes sur la page 1sur 27

Department of Chemistry

Data Analysis
1. Uncertainties in Measurements
How to record experimental data?

2. Normal Distribution
What are mean and standard deviation?

3. Linear Regression using Excel


How to get the gradient and intercept of a linear trendline?

4. Linear Calibration using Excel


How to get the concentration of the unknown sample?
CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Data Analysis
1. Uncertainties in Measurements
2. Normal Distribution
3. Linear Regression using Excel
4. Linear Calibration using Excel

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Uncertainties in Measurements

Every measurement comes with an uncertainty.

Mistakes
Systematic error
Random error
35.00

35.00

30.00

30.00

Volume of NaOH (mL)

Volume of NaOH (mL)

at

25.00
20.00
15.00
10.00
5.00
0.00

25.00
20.00
15.00
10.00
5.00
0.00

10

15

20

25

Measurements

10

15

20

25

Measurements

How reliable is the result?


CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Uncertainties in Measurements

good accuracy, good precision


True
Value

Arbitrary values

Arbitrary values

Accuracy and Precision

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Arbitrary values

Arbitrary values

Repeated measurements

True
Value

Repeated measurements

Repeated measurements

poor accuracy, good precision True


Value

good accuracy, poor precision

poor accuracy, poor precision True


Value

Repeated measurements

Department of Chemistry

Significant Figures

Significant Figures when Recording a Measurement

Taipei 101
Ground to highest architectural structure: 509.2 m
Ascending elevator speed: designed to be 16.83 m/s.

23.84
mL
(4 s.f.)

Rule #1: The number of significant figures in the


result of a direct measurement should reflect the
precision of the instrument.

CM1191 Experiments in Chemistry 1 Prepared by XuHR

image from
http://en.wikipedia.org/wiki/Taipei_101#Height

Department of Chemistry

Precision

Rule #2: Precision in calculations


Addition (+) or subtraction ()

the result has the same number of decimal places as the least precise
measurement used in calculation
e.g. 15.40 + 12.5 0.097 = 27.803 = 27.8
Multiplication (x) and division(/)
the result have the same number of significant figures as the least precise
measurement used in calculation.
e.g. 15.40 x 12.5 / 0.097 = 1984.536082 = 2.0 x 103

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Significant Figures

Significant Figures when Recording a Measurement


Rules for counting the number of significant figures:
All non-zero digits are significant.
All leading zeros are not significant: 0.0058 (2 s.f.)
Zeros between non-zeros are significant: 1.067 (4 s.f.)

Tailing zeros two situations


Without decimal point: 1200 (2 s.f.); 5000 (1 s.f.)
With decimal point: 1.200x103 (4 s.f.); 1200. (4 s.f.); 120.0 (4 s.f.)

Exact numbers: 2 portions of 5.00 mL of solutions gives 10.00 mL


(same level of precision as the original data)

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Rounding Off Numbers

Rules of Rounding Off Numbers


Example 1 (subsequent digit < 5)
Round off 9.346 to 2 s.f.

9.3

Not sequentially: 9.346 9.35 9.4

Example 2 (subsequent digit > 5)


Round off 9.366 to 2 s.f.

9.4

Example 3 (subsequent digit = 5)


Round off 4.7508 to 2 s.f.

4.8

There are at least one non-zero digits


after the 3rd digit (5).

Round off 4.75 or 4.750 to 2 s.f.

4.8

No digit, or only 0, after the 3rd digit (5).


The 2nd digit (7) is an odd digit the
2nd digit (7) increases by 1.

Round off 4.65 or 4.650 to 2 s.f.

4.6

No digit, or only 0, after the 3rd digit (5).


The 2nd digit (6) is an even digit the
2nd digit (6) remains unchanged.

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Data Analysis
1. Uncertainties in Measurements
2. Normal Distribution
3. Linear Regression using Excel
4. Linear Calibration using Excel

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Department of Chemistry

Sample Distribution
Example of data obtained
by a group of students

Sample Distribution

Histogram of 24 Experimental Data


4.5
4

Frequency

3.5
3
2.5
2
1.5
1
0.5
0

Relative difference from average

Mean: 23.05 mL

xi x
x

=AVERAGE in Excel

Standard deviation: 2.19 mL

CM1191 Experiments in Chemistry 1 Prepared by XuHR

=STDEV in Excel

V(NaOH)/mL
23.00
23.04
22.86
23.06
22.90
22.76
23.00
22.88
31.12
22.82
24.38
24.44
22.86
18.40
22.68
18.72
23.10
22.84
23.54
22.92
23.16
22.96
22.88
22.78
10

Department of Chemistry

Sample Distribution

Sample Distribution The more data, the better?


Histogram of 25 Randomly Generated Data

2.5

Frequency

Frequency

Histogram of 10 Randomly Generated Data

1.5
1
0.5

3
2
1
0

Relative difference from average

Relative difference from average

12
10
8
6
4
2
0

Histogram of 100 Randomly Generated Data


20

Frequency

Frequency

Histogram of 50 Randomly Generated Data


15
10
5
0

Relative difference from average

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Relative difference from average

11

Department of Chemistry

Normal Distribution

Normal Probability Distribution


1
68.2%

Ultimate Goal is to find .


: population mean

i n
i 1

xi

: population standard deviation


2
(
x

)
i 1 i
i n

2
95.4%
Probability Density Function (pdf)

CM1191 Experiments in Chemistry 1 Prepared by XuHR

x 2
1
f (x | , )
exp

2
2

image from http://en.wikipedia.org/wiki/


File:Standard_deviation_diagram.svg

12

Department of Chemistry

Sample Mean and Standard Deviation

Sample Mean and Standard Deviation

i n

: sample mean (average)

When n ,

i 1

xi

n: the number of data


xi: the i th data

2
(
x

x
)
i 1 i
i n

s : sample standard deviation

s2 : sample variance

2
(
x

x
)
i 1 i

n 1

i n

s
2

n 1

Meaning of n1: No. of degrees of


freedom of the calculation = No. of
data No. of parameters calculated
from them.

RSD : relative sample standard deviation (or CV, coefficient of variation)

s
RSD 100 %
x
CM1191 Experiments in Chemistry 1 Prepared by XuHR

13

Department of Chemistry

Quoting Uncertainty

Reporting a Single Measurement Quoting Uncertainty


Expression: mean standard deviation of the mean
Example

V NaOH 23.05

2.19
(23.05 0.45) mL
24

It is important to explain the meaning of 0.45.

Sm

s
n

Sm tells how close

is to . n , Sm .

It can be indicated by writing:


VNaOH = (23.05 0.45) mL
(1 estimated standard deviation error limit, n = 24)
or e.s.d in short

Bare in mind: one standard deviation only includes 68% of the distribution!

CM1191 Experiments in Chemistry 1 Prepared by XuHR

14

Department of Chemistry

Data Analysis
1. Uncertainties in Measurements
2. Normal Distribution
3. Linear Regression using Excel
4. Linear Calibration using Excel

CM1191 Experiments in Chemistry 1 Prepared by XuHR

15

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel

(1) Plot the graph


(2) Display the trendline
(3) Get the gradient, intercept and their standard deviations using
the LINEST function in Excel.

Least-squares Linear Regression


The best-fit trendline should
minimize the sum of the
squares of the residuals: sy/x
reflects the quality of fitting.

i n

sy / x

i 1

(yi yi )

d.f.

CM1191 Experiments in Chemistry 1 Prepared by XuHR

Data Point

Trendline

yi

yi

Residual
x

16

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel

(1) Plot the graph

Plot the graph using Scatter


with only Markers.
Do NOT use any line.

CM1191 Experiments in Chemistry 1 Prepared by XuHR

17

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel

(1) Plot the graph

CM1191 Experiments in Chemistry 1 Prepared by XuHR

18

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel
(2) Display the trendline

Right click on a point and Add Trendline.


Choose Linear fit.
Do NOT Display Equation on chart and
Display R-squared value on chart. Why?
CM1191 Experiments in Chemistry 1 Prepared by XuHR

19

x
918
1650
2637
3478
4381

Limitation of using Display


Equation on chart in Excel

y
-2.94
-3.17
-3.55
-3.79
-4.12

Using =LINEST
-3.40E-04 -2.62
8.61E-06
0.02
0.99808 0.024
1560.89
3
0.88749 0.002

-2.5
0

500

1000

1500

2000

2500

3000

3500

4000

4500

5000

-2.7

Using Display Equation on chart


-2.9

-3.1
-3.3
-3.5
-3.7

-3.9

y = -0.0003x - 2.6249

-4.1
-4.3

Incorrect number of significant figures.


No information on the uncertainties of gradient and intercept.

-4.5

CM1191 Experiments in Chemistry 1 Prepared by XuHR

20

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel

(3) Get the gradient, intercept and their standard deviations using
the LINEST function.
For Y = a + bX
(1) Left click on an empty cell and drag
across a 2x5 block of cells.
(2) Type =LINEST( in the function
command.
(3) Follow the instruction, left click and drag
over the y range, type ,, click and drag
over the x range, type ,. Finish off with
1,1) *
(4) Complete by holding down Shift and
Ctrl and press Enter.
* Finish off with 0,1) if you do not want an
intercept (i.e. Y = bX)

CM1191 Experiments in Chemistry 1 Prepared by XuHR

21

Department of Chemistry

Linear Regression using Excel


Linear Regression using Excel

(See file: Linear Regression using Excel. xlsx)

sy/x

b sb = 0.920 0.028
a sa = 0.019 0.012
CM1191 Experiments in Chemistry 1 Prepared by XuHR

b & sb, a & sa should have


the same number of decimal places.
22

Department of Chemistry

Data Analysis
1. Uncertainties in Measurements
2. Normal Distribution
3. Linear Regression using Excel
4. Linear Calibration using Excel

CM1191 Experiments in Chemistry 1 Prepared by XuHR

23

Department of Chemistry

Linear Calibration using Excel


Linear Calibration using Excel
(See file: Linear Calibration using Excel.xlsx)

CM1191 Experiments in Chemistry 1 Prepared by XuHR

24

Department of Chemistry

Linear Calibration using Excel


Remarks:
(1) Be careful when using r2

r : correlation coefficient, between 1 and +1


r2 : between 0 and +1
Not a good indicator of the quality of the regression.
A better indicator is sy/x.

(See file: Uselessness of r-square.xlsx)

CM1191 Experiments in Chemistry 1 Prepared by XuHR

25

Department of Chemistry

Linear Calibration using Excel


Remarks (cont.):

(2) Choose the shortest possible range for the likely range of unknown samples.

(3) Choose sufficient calibration points with even space to cover the range.
(4) Make up calibration samples independently, e.g. serial dilution should be
avoided.
(5) Units of the gradient and intercept.

CM1191 Experiments in Chemistry 1 Prepared by XuHR

26

Department of Chemistry

Appendix
Equations (for your reference only)

i 1 x i

sb

i 1[(xi x)(yi y)]

i n

y
i 1 i

i n

( x x)
i 1 i

2
x
i 1 i
i n

sa sy / x

ni 1 (x i x)
i n

The ^ on y means the y value


calculated from the regression for
each xi: i = a + bxi

b sb
a sa

2
(
x

x
)
i 1 i

y0 a
b

sx0

y0 the mean of y values of the unknown


m number of repeated unknown measurements
CM1191 Experiments in Chemistry 1 Prepared by XuHR

d.f.

d.f. degree of freedom.

n
i n

sy / x

a y bx

sy / x

(
y

y
)
i 1 i i
i n

i n

i n

sy / x
b

(y0 y)2
1 1
2 i n
m n b (xi x)2
i 1

The unknown value x0 and


its standard deviation:

x 0 sx0

27

Vous aimerez peut-être aussi