effect of day-to-day noise on uv-visible spectrophotometric control analyses of mixtures by...

7
Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression MARCELO BLANCO,* JORDI COELLO, HORTENSIA ITURRIAGA, SANTIAGO MASPOCH, and SMAIL ALAOUI-ISMAILI Departamento de Qufmica, Unidad de Qufmica Analftica, Universidad Autdnoma de Barcelona, E-08193 Bellaterra, Spain It is demonstrated that noise in UV spectral recordings obtained by using a diode array UV-visible spectrophotometer on different days may conform to a defined pattern. Such structured noise leads to the acceptance, as significant, of components containing noise alone, in calibrations by principal component regression (PCR)--which impedes the detection of outliers at the unknown sample prediction stage and considerably diminishes the potential of this methodology for control analyses. As shown in this paper, the effect of the noise structure can be substantially decreased by recording the spectra for the calibration samples on different days. Also, a procedure for distinguishing between correct samples and outliers is proposed. The procedure fits the distribution of the squared residuals of the absorbances for the calibration samples to an exponential function and uses a 99.9% probability as the acceptable limit. It was applied to analysis of ketoprofen and methylparaben mixtures. Index Headings: UV-vis spectrophotometry; Mixture analysis; PCR; Outlier detection. INTRODUCTION The need to obtain expeditious results in control anal- yses of complex mixtures has turned multivariate cali- bration procedures (MCPs) into frequently used analyti- cal tools that are usually applied to spectroscopic data. Their consolidation in routine UV-visible spectrophoto- metric analysis has been somewhat slower than in other spectroscopic techniques owing to the established tradi- tion of searching for specific analytical methods using absorbance readings at the maximum absorption wave- length as the measured parameter. However, the picture is changing very rapidly at present, and MCP-UV com- binations are being increasingly used, particularly in pharmaceutical control analyses. 1-6 In addition to the ability to resolve and precisely quan- tify mixture components, the application of MCPs to con- trol analysis allows the detection of outliers (samples with absorption spectra that are significantly different from those one would expect and, hence, call for careful analysis of the situation in order to identify potential in- strumental malfunctioning, manufacturing flaws, or the presence of impurity levels that are higher than desired). This type of detection is impossible with traditional uni- variate calibration. The main problem arising from the use of MCPs in control analyses is that the basic assumption that calibra- tion samples are identical to analyzed samples is incor- rect, because the conditions where the two are analyzed are not exactly the same. Calibration is carefully per- Received 10 August 1995; accepted 2 January 1996. * Author to whom correspondence should be sent. formed in the analytical laboratory, whereas routine con- trol analyses can be carried out in a rapid, less strictly controlled manner at the production plant. This consid- eration is significant in UV-vis spectrophotometry, since the intrinsic noise level of spectra is very low. In previous work] the effect of baseline drift on rou- tine UV-vis spectrophotometric control analyses and cal- ibration by principal component regression (PCR) meth- odology was discussed. In this paper, the ability of PCR to model sources of variations that have minimal effects on spectra but are statistically significant owing to the high reproducibility and low noise levels of UV spectra is demonstrated. The result is errors and/or uncertainty in the determination of the number of principal components actually defining the system, which in turn gives rise to quantitation errors and detection of false outliers (i.e., to exclude samples that are correct). The potential origin of such false outliers is discussed, and ways of avoiding them are suggested. We used a diode array spectrophotometer because the lack of moving optical pans ensures a high reproducibil- ity in wavelength settings and hence in absorbance mea- surements at the sides of absorption bands; this advan- tage, together with the expeditiousness with which spec- tra can be recorded, makes this type of spectrophotometer highly suitable for control mixture analyses) ,8 THEORY Principal Component Regression. The principles of PCR are well known and widely documented; 9 therefore, only some essential aspects related to its use for mixture analysis from UV spectra are discussed here. Essentially, PCR calibration involves recording the spectra for m mixtures of known composition at k dif- ferent wavelengths. The mixtures must unavoidably be representative of the samples to be subsequently ana- lyzed. The spectral data matrix, A(m,k), is resolved into the product of a scores matrix, T(m,a), and a loadings matrix, P(a,k): A = TP + E (1) where E(m,k) is the residuals matrix and a the number of principal components (PCs). PCR assumes a linear re- lationship between scores and concentrations: C = TB + F (2) where B is the regressors matrix, which is obtained by 576 Volume 50, Number 5, 1996 0003-v028/96/5005-057652.0o/0 APPLIED SPECTROSCOPY © 1996 Societyfor Applied Spectroscopy

Upload: smail

Post on 02-Oct-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

MARCELO BLANCO,* JORDI COELLO, HORTENSIA ITURRIAGA, SANTIAGO MASPOCH, and SMAIL ALAOUI-ISMAILI Departamento de Qufmica, Unidad de Qufmica Analftica, Universidad Autdnoma de Barcelona, E-08193 Bellaterra, Spain

It is demonstrated that noise in UV spectral recordings obtained by using a diode array UV-visible spectrophotometer on different days may conform to a defined pat tern. Such structured noise leads to the acceptance, as significant, of components containing noise alone, in calibrations by principal component regression (PCR)--which impedes the detection of outliers at the unknown sample prediction stage and considerably diminishes the potential of this methodology for control analyses. As shown in this paper, the effect of the noise structure can be substantially decreased by recording the spectra for the calibration samples on different days. Also, a procedure for distinguishing between correct samples and outliers is proposed. The procedure fits the distribution of the squared residuals of the absorbances for the calibration samples to an exponential function and uses a 99.9% probability as the acceptable limit. It was applied to analysis of ketoprofen and methylparaben mixtures.

Index Headings: UV-vis spectrophotometry; Mixture analysis; PCR; Outl ier detection.

INTRODUCTION The need to obtain expeditious results in control anal-

yses of complex mixtures has turned multivariate cali- bration procedures (MCPs) into frequently used analyti- cal tools that are usually applied to spectroscopic data. Their consolidation in routine UV-visible spectrophoto- metric analysis has been somewhat slower than in other spectroscopic techniques owing to the established tradi- tion of searching for specific analytical methods using absorbance readings at the maximum absorption wave- length as the measured parameter. However, the picture is changing very rapidly at present, and MCP-UV com- binations are being increasingly used, particularly in pharmaceutical control analyses. 1-6

In addition to the ability to resolve and precisely quan- tify mixture components, the application of MCPs to con- trol analysis allows the detection of outliers (samples with absorption spectra that are significantly different from those one would expect and, hence, call for careful analysis of the situation in order to identify potential in- strumental malfunctioning, manufacturing flaws, or the presence of impurity levels that are higher than desired). This type of detection is impossible with traditional uni- variate calibration.

The main problem arising from the use of MCPs in control analyses is that the basic assumption that calibra- tion samples are identical to analyzed samples is incor- rect, because the conditions where the two are analyzed are not exactly the same. Calibration is carefully per-

Received 10 August 1995; accepted 2 January 1996. * Author to whom correspondence should be sent.

formed in the analytical laboratory, whereas routine con- trol analyses can be carried out in a rapid, less strictly controlled manner at the production plant. This consid- eration is significant in UV-vis spectrophotometry, since the intrinsic noise level of spectra is very low.

In previous work ] the effect of baseline drift on rou- tine UV-vis spectrophotometric control analyses and cal- ibration by principal component regression (PCR) meth- odology was discussed. In this paper, the ability of PCR to model sources of variations that have minimal effects on spectra but are statistically significant owing to the high reproducibility and low noise levels of UV spectra is demonstrated. The result is errors and/or uncertainty in the determination of the number of principal components actually defining the system, which in turn gives rise to quantitation errors and detection of false outliers (i.e., to exclude samples that are correct). The potential origin of such false outliers is discussed, and ways of avoiding them are suggested.

We used a diode array spectrophotometer because the lack of moving optical pans ensures a high reproducibil- ity in wavelength settings and hence in absorbance mea- surements at the sides of absorption bands; this advan- tage, together with the expeditiousness with which spec- tra can be recorded, makes this type of spectrophotometer highly suitable for control mixture analyses) ,8

THEORY

Principal Component Regression. The principles of PCR are well known and widely documented; 9 therefore, only some essential aspects related to its use for mixture analysis from UV spectra are discussed here.

Essentially, PCR calibration involves recording the spectra for m mixtures of known composition at k dif- ferent wavelengths. The mixtures must unavoidably be representative of the samples to be subsequently ana- lyzed.

The spectral data matrix, A(m,k), is resolved into the product of a scores matrix, T(m,a), and a loadings matrix, P(a,k):

A = T P + E (1)

where E(m,k) is the residuals matrix and a the number of principal components (PCs). PCR assumes a linear re- lationship between scores and concentrations:

C = TB + F (2)

where B is the regressors matrix, which is obtained by

576 Volume 50, Number 5, 1996 0003-v028/96/5005-057652.0o/0 APPLIED SPECTROSCOPY © 1996 Society for Applied Spectroscopy

Page 2: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

solving the previous equation using a least-squares pro- cedure, and F is the residuals matrix:

B = (TtT)-~TtC, (3)

superscript t denoting the transpose matrix. In order to resolve an unknown mixture giving a spec-

trum a,, its scores vector is calculated from

t~ = auP t (4)

and the analyte concentrations in the sample are obtained by multiplying the scores for the sample by the regressors matrix, B:

Cu = tu B. (5)

Correct calibration entails appropriate selection of the mixtures used for calibration and the number of actually significant principal components.

Detec t ion of Outl iers . Identifying outliers is important for both calibration and unknown samples. The former pose a much more complex problem than the lat ter9--a topic which is beyond the scope of this work, aimed at detecting outliers in control analyses (after calibration with known samples). Formally, this latter problem is a typical supervised pattern recognition problem.

Calibration samples occupy a given volume in the PC space, the size of which is given by the residuals of such samples. I f a new sample lies within such a volume, it is assumed to be similar to the calibration samples; other- wise, it is labeled as an outlier, as it will hardly be quan- tified reliably (also, the source of the anomaly should be carefully traced).

On the basis of the above approach, the problem with detecting outliers involves defining the critical distance beyond which a sample should be rejected. From a sta- tistically formal point of view, the critical significance distance can be determined from an F-test comparing the variance of the residuals for the sample concerned and the calibration samples.

The variance arising f rom the samples used in the cal- ibration step is given by

2 ~ e } Vcal = j = 1 i - 1 (6)

(m - a - [ ) ( k - a)

where eu is the difference between the experimental ab- sorbance and that calculated by the model for each wave- length and sample, all other symbols having the same meaning as in Eq. 1.

The variance of an unknown sample can be expressed as

k

d _ i=1 (7)

Vu k - a "

Therefore, an experimental value of statistic F can be calculated as

v. F = (8)

V e a l '

I f such a value exceeds the critical F value at a given confidence level, the sample can be said to depart f rom the calibration samples and, hence, to be an outlier.

In practice, detecting outliers in spectrophotometry is

0,8

E v

Z 0.6 r..t.l

0.4

E~

0.2

O

0 0 0 0 0

[] [] [] []

v 0 A ( ~ A 0 v O

A A A

0 v 0 A ( ~ A 0 v O

A A A

o o A ( Z x A O 0 E] [] [] []

V V

d, .s @ o ~ o o s

I I I ~ 1

4 8 12 16 20

KETOPROFEN (mg/L)

FIG. 1. Composition of samples studied coded with different symbol according to preparation day. (©, D, A, V) Spectra recorded on day 1, 2, 3, and 4, respectively.

made difficult by the large number of degrees of freedom involved (the many mixtures and wavelengths to be pro- cessed), so that the critical F value is close to unity. Any small spectral difference without actual physical signifi- cance may thus lead to a sample being labeled as an outlier. Linberg et al) ° suggest using ( k - a ) ( m - a

- 1)/2 and (k - a ) / 2 as the number of degrees of f reedom in calculating F, while Haaland and Thomas ~l recom- mend defining a practical threshold for each gpecific problem.

E X P E R I M E N T A L

Apparatus . Absorbance spectra were recorded on a Hewle t t -Packard HP 8452A diode array spectrophotom- eter furnished with cuvettes of l - cm light path and con- nected to an IBM PC-AT computer via an HP-IB inter- face. The bundled software, HP8930 MS-DOS UV/Vis, includes programs for operating the instrument, recording and processing spectra, and obtaining their derivatives; it also allows spectra to be printed on an HP 7470A plotter, also from Hewlet t -Packard.

Reagents . Methanol and sodium hydroxide were pur- chased in analytical-reagent grade from Panreac and Pro- bus, respectively. Methyi-4-hydroxybenzoate (methylpar- aben) was obtained from Aldrich, and 2-(3-benzylphen- yl)propionic acid (ketoprofen) was supplied by Labora- torios Menarini.

S a m p l e Preparat ion . The composit ion of the calibra- tion samples was chosen f rom a factor design consisting of two components and five concentration levels. A 1:1 methanol/0.1 M NaOH medium was used to prepare 25 samples containing 5 -20 mg/L ketoprofen (ket) and 0 .2 - 0.8 mg/L methylparaben (mpb), the spectra of which were recorded the same day. On three other days, with an interval of two between, a further 39 samples were similarly prepared and their spectra recorded. Figure 1 shows the composi t ion of the 64 samples studied, coded with different symbols according to preparation day. Eight control samples (with the following concentration ranges: ket, 10-16 mg/L; mpb, 0.38-0.64 mg/L) were also prepared, approximately two years later. Figure 2

A P P L I E D S P E C T R O S C O P Y 5 7 7

Page 3: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

0.8 / ~ Mixture sample

Ketoprofen

0.6 Methyl paraben

0.4

< 0.2

I I - I ' - - T - - --I-

210 240 270 300 330

WAVELENGTH (nm)

Fro. 2. Absorbance spectra for ketoprofen (12 mg/L), methyl paraben (0.48 mg/L), and one of their mixtures (12 mg/L of ketoprofen and 0.48 mg/L of methyl paraben).

shows the spectra for pure ketoprofen and methylparaben and one of their mixtures.

Processing of Spectra. The spectral data used for cal- ibration were the absorbance values obtained at 2-nm in- tervals over the wavelength range from 250 to 320 nm (an overall 36 wavelengths). Data were processed by us- ing the PCR algorithm in the program Unscrambler v. 3.54 (CAMO A/S, Trondheim, Norway). The absorbance values obtained at each wavelength were used as such (unscaled).

The model was constructed by using the cross-vali- dation method, and as many cancellation groups as mixtures were included in the calibration matrix. The number of significant components was chosen to be the lowest possible, the mean squared error of prediction (MSEP) for which

1 2 2 MSEP - - - (~ij - C0)2 (9) m × n ::1 i:1

should not be significantly different from the absolute MSEP minimum value. 1~ C o denotes the concentration calculated by the model, and C o the reference concentra- tion.

In order to determine the precision in the quantitation of an analyte, we calculated the relative standard error of prediction (RSEP):

c )2 RSEP (%) = g=l × 100. (10)

2 i=1

This value will be denoted by RSEPC or RSEPV when the samples predicted belong to the calibration or vali- dation sets, respectively.

The program used in this work (Unscrambler) labels as an outlier any sample whose standard deviation is a given number of times the mean value for the standard deviations of the residuals for the calibration samples. The analyst selects the desired threshold; the default is 3,

T A B L E I. M S E P v a r i a t i o n w i t h r e s p e c t t o t h e n u m b e r o f p r i n c i p a l c o m p o n e n t s .

PCs Mode A Mode B

0 9.67100 10.4740 1 0.04100 0.0450 2 0.00150 0.0022 3 0.00140 0.0024 4 0.00140 0.0022 5 0.00058 0.0020 6 0.00028 0.0017 7 0.00028 0.0022 8 0.00023 0.0022 9 0.00023 0.0029

10 0.00023 0.0030 II 0.00025 0.0032

which is equivalent to using a critical F value of 9, in- stead of the tabulated value for (k - a ) ( m - a - 1) and (k - a) degrees of freedom.

The exponential function was fitted to the distribution of the squares of the residuals by means of the program Statgraphics 5 (STSC, Inc., Rockville, MD).

RESULTS AND DISCUSSION

Table I lists the MSEP values as a function of the num- ber of principal components used to build up the model and the two different ways (mode A or B) of selecting the samples to make up the calibration set. In mode A, the calibration samples were selected by following a 52 factor design, the 25 samples being prepared in a random sequence and their spectra recorded the same day. In mode B, 25 mixtures were also used, following approx- imately the same design, but samples were prepared and their spectra recorded on four different days.

Because the mixtures contained only two absorbing species with no mutual interaction and the concentrations lay within the linear range, the resulting calibration model should include only two principal components. However, as shown in Table I, the minimum MSEP was obtained for eight PCs when mode A was used. While two PCs decreased the MSEP considerably relative to 1 PC, ap- plication of a significance criterion 11,7 revealed the pres- ence of six statistically significant PCs.

If mode B was used, the minimum error of prediction was obtained for six PCs, but only two were significant, as expected from the nature of the problem studied.

To prepare calibration samples for UV-vis spectropho- tometry is very easy, since in most cases the sample re- duces to an adequate dilution from stock solutions. Therefore, a large number of samples can be prepared, and their spectra recorded, in one day. In that sense, mode A would be the choice in many laboratories.

If we focus the discussion on the results provided, we found as a first problem the uncertainty in choosing the correct number of PCs to model the system. The argu- ment would be between two (the more conservative cri- terion, first local minimun) or six, the number recom- mended by a statistical significance criterion that has proved to be very useful in the application of PCR to UV-visible spectrophotometry. 7,1~ Table II shows the rel- ative prediction errors obtained by both models.

The use of six PCs was found to result in overfitting, particularly for methylparaben (increasing the number of

578 Volume 50, Number 5, 1996

Page 4: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

T A B L E II. Relat ive s tandard e r r o r of predict ion and the n u m b e r 0.010 of out l iers found."

Results for Results found during samples prepared 0.005

procedure setup two years later

Mode A Mode B Mode A Mode B Z 2 PCs 6 PCs 2 PCs 2 PCs 2 PCs "<

0.000 RSEPC (%) Ket: 0.4 0.3 0.5

Mpb: 2.4 0.7 3.6

Ket: 0.5 0.6 0.5 0.8 0.8 "< Mpb: 3.9 10.5 2.8 3.7 3.4 -0.005

17 22 0 1 0 39 39 11 5 3 22 25 0 3 0

RSEPV (%)

Unsc b F b Proposed b

a Ket: ketoprofen, Mpb: methylparaben. RSEPC, RSEPV: relative stan- dard error of prediction of calibration and validation samples respec- tively.

b Outliers found by Unscrambler (Unsc), F test (Eq. 8), and proposed criterion in this work.

PCs for the model from two to six decreased the RSEP for the calibration samples from 2.35% to 0.69% but in- creased that for the validation samples from 3.85% to 10.54%). Using only two PCs ensured seemingly correct results, but that selection lacked statistical justification.

On the other hand, the number of outliers found in the prediction stage was exceptionally high and dubious, es- pecially taking into account the consideration that the samples contained accurately known concentrations and were prepared in the laboratory. The application of a pure F criterion (Eq. 8) led to all 39 validation samples being outliers with both two and six PCs models, while the Unscrambler criterion found 17 and 22, respectively. These results indicated that there was a small but statis- tically significant difference between the spectra of the calibration and validation samples.

If calibration was performed by mode B (calibration sample spectra recorded on different days), then only two PCs appeared as statistically significant, as expected from the nature of the problem studied. Quantitation of valida- tion samples produced very good results, and no outliers were detected by Unscrambler and only 11 by test F.

The obvious conclusion was that the source of spectral differences was the day the spectra were recorded. In order to distinguish between the effect of the sample preparation and that of recording the spectrum, 100 spec- tra for distilled water were recorded over a 5-day period (20 spectra each day), the spectrophotometer cuvette be- ing emptied prior to loading each fresh sample. This ex- periment was intended to reproduce routine work con- ditions; i.e., the cuvette had previously been carefully cleaned and was used on the same day to record the spec- tra for different products (always in aqueous solutions), with distilled water flushing as the sole cleaning treat- ment.

Figure 3 shows the 100 spectra obtained. As can be seen, noise was not of a fully random nature; rather, the spectrum set exhibited rather structured noise revealing four distinct phenomena:

1. Noise increased significantly below 210 nm. 2. Some narrow and well-defined peaks were detected,

which can be ascribed to the fact that diodes exhibit

-0.010

200 250 300 350 400 450

WAVELENGTH (nm)

FIG. 3. One hundred absorbance spectra for distilled water recorded over a five-day period; 20 spectra each day.

a distinct, individual behavior (some can be noisier than othersl2).

3. Some spectra had a markedly drifted baseline as the likely result of the outer walls of the cuvette not be- ing fully dry.

4. There were some pseudo-bands in the region f rom 200 to 275 nm that could not be accounted for.

A principal component analysis of this spectra set re- vealed the presence of up to five significant PCs. Obvi- ously, this conclusion can be statistically correct, but it lacks physical significance. Thus, it takes no account of the fact that, except for some appreciable baseline drift, the absorbance values being measured were very low (lower than 0.005). However, we should emphasize that, because of the low level of intrinsic noise in UV-vis spec- tra, the presence of nonrandom noise may given rise to several statistically significant components with no chem- ical significance in PCR treatments.

Another way of visualizing the problem is illustrated in Fig. 4, where plots of the average spectra for each day and the corresponding standard deviation spectra are

0.012

0.008

z < 0.004

O

0.000

-0.004

0.010

o,oos

0.000

~ - ~ ~ 0 250 300 350 400 450

I I I I I ~ q

200 250 300 350 400 450

W A V E L E N G T H (nm)

FIG. 4. Day-average spectra and corresponding standard deviation of the spectra of Fig. 3.

APPLIED SPECTROSCOPY 579

Page 5: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

shown. It can be seen that the influence of the above- mentioned phenomena changed with the day; therefore two spectra recorded on different days may contain a different noise pattern. The magnitude of this noise is low, measured in terms of absorbance, so that good pre- dictions can be obtained by quantifying with calibration samples recorded the same day, if a conservat ive criterion is used in selecting the number of principal components. However, the magnitude of noise is high enough to make the spectra statistically different, and consequently to la- bel as outliers the spectrum of a correct sample recorded another day.

In using multivariate calibration procedures in analyt- ical quality control, it is important, obviously, to get ac- curate results, but it is also important to detect outlier samples with precision. Once a good calibration matrix has been constructed, correct samples will be accurately quantified, but such accuracy is not certain for outlier samples, which must be detected and carefully analyzed by reference methods. One cannot ever be sure of results if an unknown sample is labeled as an outlier.

Most commercia l ly available chemometr ic software in- cludes some criterion for detecting outliers in the predic- tion step. The criterion usually involves defining arbitrary empirical limits. As a general rule, all these practical pro- cedures normally provide good results but have the dis- advantages that they rely on an arbitrarily defined value and that they usually compare mean values with no ac- count of their distribution, which introduces a degree of uncertainty in the results.

A more systematic way to define the threshold limit can be obtained f rom a plot of the distribution of the frequency for the summation of the squares of the resid- uals for each spectrum (SCRj):

k

SCR: = ~ e~ (11) i=1

where eij has the same meaning as in Eq. 6. Figures 5 A - 5 F show the SCRj frequency histogram

obtained for calibration and validation samples by the three models used in this work (mode A, two and six PCs; mode B, two PCs). These plots allow a better un- derstanding of the results found above and facilitate the establishment of a practical threshold for outlier labeling.

In studying the distribution of residuals, one should bear in mind the interpretation of the physical signifi- cance of the SCR obtained. In the example studied, where the number of wavelengths used was k = 36, a difference between the experimental and calculated absorbance of _+ 0.001 would result in SCR = 3.6 × 10 -5 .

Figure 5A shows the SCRj histogram obtained for the samples of the calibration set using mode A (two PCs). Because calibration was done with samples whose spectra were recorded the same day, they had the same noise pattern, and consequently the SCR values were very small (<6 × 10-5). Only one of the samples departed markedly from the rest. The source of this difference could be attributed to a baseline shift of about 0.005 ab- sorbance units. The residuals of the validation samples (Fig. 5B) were much greater, which can be now inter- preted by the fact that the noise pattern was different. Therefore, unsurprisingly, many validation samples have

to be labeled as "dif ferent" from the calibration samples by any procedure.

Using six PCs to model the system (Figs. 5C-5D) gave rise to extremely low SCRs (<0.03 × 10 -5) (such a low value is, in fact, a red light that indicates overfitting) for the calibration samples, and, even though those for the validation samples were also decreased, the difference between the two sample sets increased considerably.

The distribution of residuals for the calibration and val- idation sets (Figs. 5E-5F) was very similar when cali- bration was performed with samples measured on differ- ent days (mode B; two PCs), with SCR values in the range that could be expected as a practical, good spectral fitting (differences between measured and calculated ab- sorbance -~ _+0.003). From these plots it is evident that both sample sets belong to the same class; however, ap- plication of the pure F criterion provided 11 outliers, which was utterly unjustifiable and again showed that using purely statistical criteria with a large number of degrees of f reedom does not allow significant physical distinction.

The reason for the difference in results between mode A and B is now made evident. In mode A, all the cali- bration samples contained the same noise pattern, which is mostly included in the calibration model. Good quan- titative results are found, but many correct samples are identified as outliers, only because their spectra have been recorded on another day. In mode B, samples with dif- ferent noise patterns (recorded on different days) are in- cluded in the calibration set; the noise is better detected and excluded from the calibration model in a more effi- cient way (Eq. 1) when the absorbance data matrix is broken down. Good predictions are found, and no correct sample is labeled as an outlier.

The roughness of the calibration procedure has been tested by analyzing eight control samples prepared about two years after the calibration samples. The results (rel- ative standard error of prediction and the number of out- liers detected) are shown in Table II. A perfect agreement with previous results has been found.

It seems clear that, if a proper calibration has been performed, the best way to detect outliers is to compare the SCR of a new sample with the SCR distribution of the calibration samples. In our case, it was found that the distribution of residuals for the calibration mixtures fitted an exponential curve tightly. Assuming this type of dis- tribution allows one to determine the threshold values at various probability levels. In order to avoid detecting false outliers, we though it advisable to set a threshold so that the area underneath was 99.9% of the overall area. I f new analyzed samples had an SCR above the threshold, then they would be considered outliers. The thresholds thus determined are denoted by arrows in Fig. 5A, 5C, and 5E.

The result of using this criterion (Table II) was that no validation sample was incorrectly labeled as an outlier, provided that a properly defined calibration matrix was used. In this way, the results obtained from strict appli- cation of the F criterion were substantially improved.

C O N C L U S I O N

It is well known that the precision of results obtained on different days is worse than that for those obtained

580 Volume 50, Number 5, 1996

Page 6: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

b

10'

8

b 6

4

2

0

15

12

9

6

3

0

A

~ ~ 99.9%

• • - • - _ _ . •

0 2 4 6 8 Sum Squared Residuals * 10 5

| I

c

t

\ ~ 99.9%

I I r " , . , . . . . . . _ - -

• • • - _ _ , •

0 0.02 0.04 0.06 0.08 Sum Squared Residuals * 10 s

20

16

12

8

4

0

12

10

8 b

6

4

2

B

h--h d-I n 0 - -3()- -60- -90- i20- i50

Sum Squared Residuals * 105

D

6-0.? 0.4 0.6 0.8 i Sum Squared Residuals * 10 5

15

12

9

6

0

E

i \

99.9%

"fq'~__El__ "~ . . - . . . - - . .

0 10 20 30 40 50 60 Sum Squared Residuals * l0 s

20'

16'

b 12'

e 8

4

,

F

n

()- i() 2 0 30-4() 5 ; 60 Sum Squared Residuals * 10 5

FIG. 5. Frequency histograms of the sum of squared spectral residuals. Mode A with two PCs: (A) calibration; (B) validation samples. Mode A with six PCs: (C) calibration; (D) validation samples. Mode B, with two PCs: (E) calibration; (F) validation samples.

the same day. This discrepancy is usually attributed to different sources of noise, mainly related to sample prep- aration or manipulation. The results obtained in this work reveal that even the spectra recorded on different days may contain a different noise pattern. Even though the magnitude of this noise is very small (typically below

0.005), it results in the inclusion of statistically significant components in PCR models that actually lack physical significance. This problem considerably hinders selection of the number of PCs required to model the system in question and increases the risk of overfitting in the quan- titation process. In addition, it restricts the use of this

APPLIED SPECTROSCOPY 581

Page 7: Effect of Day-to-Day Noise on UV-Visible Spectrophotometric Control Analyses of Mixtures by Principal Component Regression

technique for detecting outliers in quality control analy- ses (correct samples would be labeled as outliers). Both effects can be substantially reduced if calibration samples are measured on different days so that the noise is in- cluded and detected as in the calibration process.

The mere visual comparison of the distribution of the summation o f the squares of the residuals for the calibra- tion and validation samples, together with a physical in- terpretation of their magnitude, provides a good method for checking the quality of a model (both distributions should be similar) and may be useful for detecting outliers.

Once the model has been confirmed to be well defined, the proposed threshold for classing samples as "normal" involves fitting the distribution of SCRs for the calibra- tion samples to a known distribution function and choos- ing the threshold limit value for a given probability level. In this work it has been found that SCR values fitted to an exponential function. The acceptable limit was taken to be the SCR corresponding to a probability o f 99.9%. Samples with higher SCRs would be labeled as outliers.

This criterion has as a main advantage the fact that it is defined from the spectral distribution o f the samples included in the calibration matrix and al lows the defini- tion o f statistically meaningful thresholds that can be de- termined individually for each problem.

ACKNOWLEDGMENTS

The authors are grateful to the Spanish Direeei6n General de Inves- tigaci6n Cientffica y Tecnol6gica (DGICyT) for financial support award- ed for the realization of this study within the framework of Project PB93-0899.

1. H. Ueda, R. Pereira-Rosario, C. M. Reilly, and J. H. Perrin, Drug Develop. Industrial Pharm. 11, 833 (1985).

2. G. Sala, S. Maspoch, H. Iturriaga, M. Blanco, and V. Cerd& J. Pharm. Biomed. Anal. 6, 765 (1988).

3. H. Ueda, R. Pereira-Rosario, C. M. Rilley, and J. H. Perrin, J. Pharm. Biomed. Anal. 7, 309 (1989).

4. A. Bozdogan, A. Mert Acar, and G. K. Kandemir Kunt, Talanta 8, 977 (1992).

5. S. Lo, S. M. Donahue, and C. W. Brown, J. Pharm. Sci. 82, 350 (1993).

6. M. Blaneo, J. Coello, E Gonzalez, H. Iturriaga, S. Maspoch, and X. Tomas, J. Pharm. Biomed. Anal. 12, 509 (1994).

7. M. Blanco, J. Coello, H. Iturriaga, S. Maspoch, and M. Redon, Appl. Spectrosc. 48, 37 (1994).

8. A. J. Owen, The Diode-Array Advantage in UV-Visible Spectros- copy (Hewlett-Packard, Avondale, Pennsylvania, 1988).

9. H. Martens and T. Ntes, Multivariate Calibration (John Wiley and Sons, Chichester, 1989).

10. W. Lindberg, J. /~. Persson, and S. Wold, Anal. Chem. 55, 643 (1983).

11. D. M. Haaland and E. V. Thomas, Anal. Chem. 60, 1193 (1988). 12. M. Blanco, J. Coello, H. Itun'iaga, S. Maspoch, and J. Riba, Anal.

Chim. Acta. 234, 395 (1990).

582 Volume 50, Number 5, 1996