A method for analyzing a sample of wafers includes identifying F failure
metrics applicable to at least one pattern on each wafer within the
sample. Z spatial and/or reticle zones are identified on each wafer,
where Z and F are integers. Values are provided for each failure metric,
for each zone on each wafer. A point is defined for each respective wafer
in an N-dimensional space, where N=F*Z, and each point has coordinates
corresponding to values of the F failure metrics in each of the zones of
the corresponding wafer. The sample of wafers is partitioned into a
plurality of clusters, so that the wafers within each clusters are close
to each other in the N-dimensional space. A plurality of clusters is thus
identified from the sample of wafers so that within each individual
cluster, the wafers have similar defects to each other.