Two Way ANOVA Gage R R Working Exam
Two Way ANOVA Gage R R Working Exam
Two Way ANOVA Gage R R Working Exam
103–117
DOI: 10.24425/mms.2020.131715
1) Centro de investigaciones en Óptica A.C., Loma del Bosque 115, Colonia Lomas del Campestre, León, C.P. 37150,
Guanajuato, México (B moi@cio.mx, +52 477 441 4200, etnay@cio.mx)
2) Centro Nacional de Metrología, km 4.5 Carretera a Los Cués, Municipio El Marqués, C.P. 76246, Querétaro, México
(dcywiak@cenam.mx)
Abstract
We present computer simulations of a two-way ANOVA gage R&R study to determine the effects on the
average speckle width of intensity patterns caused by scattered light reflected from random rough surfaces
with different statistical characteristics. We illustrate how to obtain reliable computer data that properly
simulate experimental measurements by means of the Fresnel diffraction integral, which represents an
accurate analytical model for calculating the propagation of spatially-limited coherent beams that have been
phase-modulated after being reflected by the vertical profiles of the generated surfaces. For our description
we use four differently generated vertical profiles and five different vertical randomly generated roughness
values.
Keywords: speckle pattern, ANOVA and gage R&R, autocorrelation, Fresnel diffraction integral.
© 2020 Polish Academy of Sciences. All rights reserved
1. Introduction
Copyright © 2020. The Author(s). This is an open-access article distributed under the terms of the Creative Commons Attribution-
NonCommercial-NoDerivatives License (CC BY-NC-ND 4.0 https://creativecommons.org/licenses/by-nc-nd/4.0/), which permits use, dis-
tribution, and reproduction in any medium, provided that the article is properly cited, the use is non-commercial, and no modifications or
adaptations are made.
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
Speckle intensity patterns that result from the reflection of an illuminating coherent source
on a rough surface have many applications in different fields, as the measurement of deformation
of large objects [2], studies on rough surfaces [3], astronomy [4], biological tissue imaging [5],
studies of coagulation processes [6], acoustics [7] etc.
As it is not possible to control exhaustively the roughness characteristics of real materials used
in speckle experiments, it becomes necessary to perform calculations based on numerical models
to validate some particular findings [8]. Most of the simulations on rough surface models are
based on vertical height distributions that follow random Gaussian probability density functions
[9] and it is difficult to find reports dealing with non-Gaussian density probability functions as
for example is included in [10–12].
It is commonly accepted that the average speckle width does not depend on the statistical
profile of the reflecting rough surface that causes an intensity speckle pattern. However, it may be
more natural to assume that the statistical characteristics of the vertical profiles of the simulated
rough surfaces may affect the average lateral speckle width. To provide a robust answer to
this question, in this report we present a two-way analysis of variances (ANOVA) and gage
repeatability and reproducibility (R&R) studies, using well-known equations for these methods.
We present a complete worked example, applied to evaluate the average speckle width due to
the reflection of a spatially-limited coherent beam from random-rough-surfaces with different
statistical characteristics. We focus on the shape of the histograms and the autocorrelations of the
intensity speckle patterns. For our description, a spatially limited illuminating coherent beam,
phase-modulated by reflection from a rough surface, is propagated up to an observation plane
by means of the Fresnel diffraction integral. The rough surface profiles considered in this report
are obtained by an algorithm that has been described in [13, 14]. This algorithm provides ample
flexibility to attain different random characteristics of the simulated surfaces by simply changing
the analytical expression of a generating function. In the following sections we describe our
ANOVA and gage R&R simulations.
2. Analytical description
104
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
introducing an appropriate phase term in the Fourier process. Finally the vertical height of h(x)
is properly scaled to attain a desired RMS value of the vertical height distribution.
It is important to mention that once a rough surface represented by h(x) is numerically
obtained as described above, it has to be plotted for evaluation. If the plot of h(x) exhibits isolated
sharp peaks, then this particular function must be discarded as this type of peaks represent
flaws or scratches on the corresponding surface altering the diffraction patterns with undesired
ripples. Thus, we implemented a numerical routine to discard non-desired surfaces. This routine
consists in calculating the magnitude of the maximum and minimum of their corresponding height
distributions symmetrically positioned around the horizontal axis. If any of these two amplitudes
is greater than three times the RMS value, this surface is discarded. By using this criterion, we
found that surfaces exhibiting isolated sharp peaks were efficiently discarded.
Figure 1 depicts a plot of a simulated rough surface free of defects. The vertical profile was
properly scaled to attain an RMS value of 0.1 µm.
Fig. 1. One of the simulated one-dimensional surfaces with RMS value of 0.1 µm.
The normalized autocorrelation plot that corresponds to the surface of Fig. 1 is plotted in
Fig. 2.
Fig. 2. The normalized autocorrelation corresponding to the surface plotted in Fig. 1. In the following section
we describe the optical process and the automated method used to measure the width of the central peak.
105
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
Once a set of valid surfaces is properly generated as described above, each surface is placed
on an object plane of an optical setup similar to the one depicted in Fig. 3 to illuminate normally
a region of the surface by a spatially-limited coherent source.
Fig. 3. An optical setup for illuminating and propagating the beam reflected from
a numerically generated rough surface (BS is a beam splitter).
On the object plane, the amplitude distribution Ψ(x) of the reflected beam is calculated as:
In (1) a rectangle function, rect (x, A) is introduced to spatially limit the extent of the illumi-
nating source on the object plane. The rectangle function is equal to one if | x| ≤ A/2, and to zero
otherwise. The parameter λ is the wavelength of the illuminating source. The plane of observation
is placed at a distancezfrom the object plane. Both planes are parallel to each other. The amplitude
of the propagated beam, ΨF (ξ), on the plane of observation with the spatial coordinate ξ (Fig. 3)
is calculated by means of the one-dimensional Fresnel diffraction integral [15] given as:
∫∞
1 i2πz iπ 2
ΨF (ξ) = √ exp Ψ(x) exp (x − ξ) d x. (2)
iλz λ λz
−∞
106
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
It is worth mentioning that for each intensity distribution obtained on the plane of observation
we verified that the intensity histograms follow a decreasing exponential behavior in accordance
with well-known analytical equations [16].
Figure 5 depicts a plot of the autocorrelation that corresponds to the intensity distribution on
the plane of observation plotted in Fig. 4.
Fig. 5. The normalized autocorrelation for the speckle pattern plotted in Fig. 4.
To calculate a representative value of the width of the central peak of the autocorrelations
obtained avoiding possible errors of appreciation of an operator and also to automate the cal-
culations, we implemented a simple numerical method. First, the position of the central peak
maximum and the position of the first two minima at both sides of this peak are calculated.
107
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
Then, following [16, 17] the horizontal distance between the referred two minima is taken as
the autocorrelation width.
The following four different generating functions f (x) were considered:
√ 2 ! 2α
x
Generator I : f (x) = exp − ;
α = 1.2. (4)
L
√ ! 2α
x2
Generator II : f (x) = exp − ;
α = 0.8. (5)
L
−N
1 x 2
Generator III : f (x) = 1 + ; N = 6000. (6)
N L
x
Generator IV : f (x) = J0 . (7)
L
In (7) J0 is the Bessel function of order zero of the first kind.
The functions given by (4)–(7) were selected to achieve surfaces with the most dissimilar
statistical characteristics between them. Although it may seem unusual, a Bessel generating
function was included to magnify differences between the random surfaces.
It is important to remark that the value of a typical average speckle width anticipated as
2λz/A = 6.328 × 10−3 m [16], does not necessarily have to coincide exactly with the width of
the autocorrelation obtained as described above, 5.7 × 10−3 m in the example. The discrepancy
obviously obeys statistical reasons and is irrelevant for the statistical purposes presented here. The
fundamental factor in our study resides in performing measurements always in strictly the same
conditions. Under this assumption, the statistical parameters being measured, such as repeatability
and reproducibility, will be demonstrated as highly reliable, as confirmed by the results given in
the following sections.
To compare the effect that results from using different generating functions f (x) along with
different correlations and different RMS roughness values, we used the four different generating
functions described in the former section, (4)–(7). For each of the generating functions we assigned
five different L values, equally spaced, ranging from 3.0 × 10−6 to 3.8 × 10−6 m. Additionally,
there are five different equally spaced RMS values ranging from 1 × 10−7 to 1.8 × 10−7 m as
indicated in Tables 1–4.
It is worth mentioning that it would be desirable to present the data arranged in a single table.
However, due to the limitation of space, the data are presented in four tables instead of only
one. Each entry in the tables represents the average autocorrelation width of 20 processes. Each
process comprises: generation of a random surface profile, reflection of the illuminating beam
from the generated surface, propagation of the reflected beam up to the plane of observation by
means of the discrete Fresnel diffraction integral, calculation of the intensity distribution on the
plane of observation and calculation of the width of the central peak of the autocorrelation of
the speckle pattern according to the method described above. Each process was carried out using
6000 pixels and took approximately one minute using a two-core computer running at 1.8 GHz
each. As indicated above, we used A = 200 µm, λ = 0.6328 µm and z = 1 m. In the following
108
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
√ 2 ! 2α
x
Generating function I: f (x) = exp − ; α = 1.2
L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10 (m) L = 3.6 10−6 (m)
−6 L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 6.000 6.619 6.526 5.753 5.926
1.2 6.206 5.906 6.126 5.959 6.419
1.4 6.473 5.540 6.133 6.266 6.033
1.6 6.066 6.286 5.986 6.433 5.880
1.8 6.160 6.013 5.860 5.573 6.226
√ 2 ! 2α
x
Generating function II: f (x) = exp − ; α = 0.8
L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10 (m) L = 3.6 10−6 (m)
−6 L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 6.130 5.945 6.075 6.053 6.052
1.2 5.980 5.972 6.188 6.085 6.022
1.4 6.052 5.990 6.067 6.157 5.990
1.6 6.022 5.970 6.108 6.100 6.005
1.8 6.063 6.147 6.007 6.032 5.990
Tables 1–4, the averages of the autocorrelation widths corresponding to each generating function
are presented.
In each of Tables 1–4 a generating function has K = 5 columns. Each column corresponds to
a different L value. There are M = 5 rows for each generating function; each row corresponding
109
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
to a different vertical RMS height. As there are four different generating functions, we introduce
the variable NN = 4 to represent the number of generating functions or, equivalently, the number
of tables.
For the calculations, it is necessary to construct an overall single table, formed by concate-
nating each one of the above tables at the right of the other. This general table has a total of
N = NN × K = 20 columns. Under this assumption we can refer to each entry in this general table
as x p,s , where p = 1, 2, ..M and s = 1, 2, ..N. An entry x p,s in the general table can be related to
an entry in a table that corresponds to a specific generating function by the parameter denoted
as x p,q,k = x p,(q−1)K+k , where q = 1, 2, ..NN and k = 1, 2, ..K. Equivalently, in the parameter
x p,q,k the sub-indexes (p, q, k) represent an entry corresponding to an RMS value, a generating
function and an L value respectively and enables to describe the corresponding ANOVA and
R&R calculations.
We will follow the well-established ANOVA model known as “two-factor factorial with
random factors”. This is a two-way model with interactions where the parameters are chosen
randomly. This model, as indicated in [18] is stricter and more exhaustive for examining main
effects even in the presence of interactions as compared with models with fixed effects. To attain
the described two-way ANOVA, following [19], we propose:
x p,q,k = µ + αp + βq + γ p,q + ε p,q,k . (8)
In (8), αp , βq , γ p,q , and ε p,q,k are random variables with zero mean and variances σα2 , σβ2 ,
σγ2 , and σ 2 , respectively. Additionally, E {µ} = µ, where the symbol E { . } represents an expected
value.
In the following Table 5, there are presented the required ANOVA mean value parameters.
Mean value for each Mean column value Mean row value of Mean total value
generating function for each generating the four generating
at row p function functions at row p of all the entries
K M NN NN
1 Õ 1 Õ 1 Õ 1 Õ
y p, q = x p, q, k XCMM q = y p, q XRM p = y p, q XMT = XCMM q
K M NN NN
k=1 p=1 q=1 q=1
In Table 6, using the data from Tables 1–4, the following required mean parameters are
obtained.
110
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
1 × 10−3 m
XCMM q 6.094 6.048 6.050 6.102
XRM p 6.094 6.065 6.066 6.082 6.058
XMT 6.073
The data of Table 6 can now be used in the ANOVA sum of squares of parameters and their
corresponding mean squares given in the following Table 7.
It is straightforward but lengthy to demonstrate the following relations given in Table 8 [17].
E {MSA} = σ 2 + KNNσα
2 + K σ2
γ
E {MSB} = σ 2 + KMσβ2 + K σγ2
E {MSAB} = σ 2 + K σγ2
E {MSE } = σ 2
Using Table 7 and the data from Tables 1–4 the results of the following Table 9 are obtained.
(m2 )
SSA = 1.662 × 10−8 MSA = 4.155 × 10−9
SSB = 6.114 × 10−8 MSB = 2.038 × 10−8
SSAB = 1.273 × 10−7 MSAB = 1.060 × 10−8
SSE = 2.286 × 10−6 MSE = 2.857 × 10−8
The mean values given in Table 9 will be used in the following equations for calculating
repeatability r, reproducibility R and gage repeatability-and-reproducibility R&R:
√
r = σ = MSE, (9)
111
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
q r
MSB (M − 1) MSE
R= σβ2 + +σγ2 MSAB −
= , (10)
kM KM K
q r
MSB (M − 1) (K − 1)
R&R = σ 2 + σβ2 + σγ2 = + MSAB + MSE . (11)
kM KM K
In a special case of (10), when the data are highly concentrated around the mean, the radicand
approaches to zero or it may even be negative. In this particular case, the value assigned to R is
zero, see for example [20].
Using (9)–(11) and the data from Table 9 the following results are obtained:
The results given in Table 10 are complemented with corresponding ANOVA F-tests. The
F-distribution is given as:
N1 + N2
Γ N21 ∫x0 N1
2 N1 x 2 −1
F (N1, N2, x0 ) = N1 +N dx. (12)
N1 N2 N2 2
Γ Γ 0 N1
2
2 2 x+1
N2
Table 11 enables to compare the measured F values with their corresponding x0 values ob-
tained by means of (12), setting a confidence interval of 95%, equivalently, F(N1, N2, x0 ) = 0.95.
Table 11 contains relevant information. The three measured F quantities are smaller than
their corresponding x0 values. As a consequence, it is not possible to reject the null-hypothesis.
Thus, we conclude that the ample differences on the characteristics of the random rough surfaces
considered do not affect the average speckle width of the propagated intensity speckle patterns
calculated by means of the Fresnel diffraction integral. Neither the autocorrelation surface length
of the rough surfaces nor their different vertical RMS heights affected the average speckle width.
This result may be attributed to the quadratic phase in the Fresnel diffraction integral as it averages,
upon propagation, the phase of the reflected beam modulated by the main structural characteristics
of the rough surfaces such as asperity, roughness and waviness spacing.
The above one-dimensional study can, in principle, be extended to two dimensions. To carry
out this task it is necessary to generate two-dimensional surfaces with random vertical heights
on the initial plane and then calculate the propagation of the reflected beam up to a plane of
observation by means of the two-dimensional discrete Fresnel diffraction integral. However, the
processing time at these conditions would dramatically increase, making it necessary to devise
112
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
an alternative approach to obtain some insight into whether the above results are valid in two
dimensions; therefore, we made use of the following approach. We generated one-dimensional
distributions exhibiting random vertical heights arranged on the initial plane in four different
directions: 0, 45, 90 and 135 degrees as the one shown in Fig. 6. For our purposes, these
distributions may be visualized as linear slices or sub-samples of random surfaces spatially
limited on the initial plane by a circular aperture.
Fig. 6. One of the randomly generated sliced surfaces as described in the text (units in m).
We now use the two-dimensional discrete Fresnel diffraction integral to calculate the propa-
gation of the reflected beam on the sliced surfaces along one axis on the plane of observation. For
brevity, we will refer to this method as a 2D-sliced approach. Fig. 7 shows one of the obtained
intensity profiles.
In Fig. 8 there is shown a normalized autocorrelation corresponding to the profile plotted in
Fig. 7.
Fig. 7. A normalized intensity profile along one axis on the plane of observation of an illuminating
beam reflected from one of the generated surfaces obtained with the 2D-sliced approach.
113
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
In Tables 12–15, there are shown the speckle widths obtained using the 2D-sliced approach.
Table 12. Data corresponding to the generating function I using the 2D-sliced approach.
√ 2 ! 2α
x
Generating function I: f (x) = exp − ; α = 1.2
L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10 (m) L = 3.6 10−6 (m)
−6 L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 8.817 10.022 10.017 8.767 8.800
1.2 7.467 8.600 8.355 7.633 7.783
1.4 8.967 9.900 7.850 8.516 8.016
1.6 9.000 9.417 8.533 9.783 9.933
1.8 9.517 9.983 8.400 7.516 8.050
Table 13. Data corresponding to the generating function II using the 2D-sliced approach.
√ 2 ! 2α
x
Generating function II: f (x) = exp − ; α = 0.8
L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10−6 (m) L = 3.6 10−6 (m) L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 9.511 9.777 8.911 9.844 7.511
1.2 9.177 9.733 8.311 7.022 7.688
1.4 7.911 8.067 6.711 7.622 7.577
1.6 8.755 8.555 9.555 7.022 8.577
1.8 9.155 9.533 7.377 9.200 9.311
114
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
Table 14. Data corresponding to the generating function III using the 2D-sliced approach.
1 x 2 −N
Generating function III: f (x) = 1 + ; N = 6000
N L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10−6 (m) L = 3.6 10−6 (m) L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 8.528 8.444 9.244 8.422 8.111
1.2 9.999 8.999 8.622 7.555 9.333
1.4 8.733 9.178 8.200 7.244 9.755
1.6 8.578 7.955 9.489 10.155 7.577
1.8 8.111 10.012 9.799 8.577 8.977
Table 15. Data corresponding to the generating function IV using the 2D-sliced approach.
x
Generating function IV: f (x) = J0
L
L = 3.0 10−6 (m) L = 3.2 10−6 (m) L = 3.4 10−6 (m) L = 3.6 10−6 (m) L = 3.8 10−6 (m)
Roughness
Speckle width. 1 × 10−3 (m)
1 × 10−7 (m)
1.0 9.867 8.422 8.533 7.133 10.000
1.2 9.222 9.177 9.133 8.022 8.577
1.4 9.044 8.000 9.200 8.889 8.777
1.6 7.599 7.911 8.822 7.622 8.755
1.8 7.600 8.999 8.555 7.600 9.933
It should be noticed that the speckle widths in Tables 12–15 are greater than those obtained in
Tables 1–4. This result is in accordance with [15], where it is analytically demonstrated that for the
case of surfaces with random Gaussian distributions, spatially limited by a circular aperture, the
average speckle widths are approximately 1.2 times greater than the widths of the one-dimensional
case.
The processing time for each two-dimensional calculation took approximately 4 minutes and
each entry in a table was obtained by averaging three of these calculations. Tables 16–19 show
the obtained ANOVA and R&R results.
Table 16. Mean values obtained as defined in Table 5 using the 2D-sliced approach.
1 × 10−3 m
XCMM q 8.785 8.496 8.784 8.616
XRM p 8.934 8.520 8.408 8.679 8.810
XMT 8.6704
Table 19 reveals that the three measured F values are smaller than their corresponding x0
values. Thus, similarly to the one-dimensional case, it is not possible to reject the null-hypothesis.
As a consequence, it appears that the aforementioned one-dimensional results can be extended to
two dimensions.
115
M. Cywiak, D. Cywiak, E. Yáñez: TWO-WAY ANOVA GAGE R&R WORKING EXAMPLE . . .
Table 17. Measured mean and sum of squares obtained with the 2D-sliced approach.
(m2 )
Table 18. Repeatability, reproducibility and gage R&R obtained with the 2D-sliced approach.
Table 19. Measured F values and their corresponding x0 values obtained with the 2D-sliced approach.
4. Conclusions
We have presented an illustrative working example of an ANOVA gage R&R study for
speckle statistics. Four types of random rough surfaces were generated with different statistical
characteristics. The intensity speckle patterns produced by the reflection of a spatially-limited
coherence illuminating beam on the generated surfaces were calculated on a plane of observation
by means of the discrete Fresnel diffraction integral. We verified that, on the plane of observation,
all the accomplished intensity histograms exhibited the well-known exponentially decreasing
behavior. To assure that all the measurements were performed in strictly identical conditions an
automated method was implemented. The ANOVA and R&R results showed satisfactory values
of repeatability and gage-reproducibility. The corresponding F factors were adequate within a
confidence interval of 95%. Thus, the ANOVA and R&R results did not give any evidence for
rejecting the null hypothesis. In consequence, random rough surfaces exhibiting different random
characteristics do not appear to affect the average speckle width or the exponential decreasing
behavior.
Acknowledgements
We are grateful to two reviewers that anonymously revised our manuscript providing us with
valuable suggestions.
The authors thank CONACYT for their partial support.
116
Metrol. Meas. Syst.,Vol. 27 (2020), No. 1, pp. 103–117
DOI: 10.24425/mms.2020.131715
References
117