Statistics for Method of aligning a template with a substrate employing moire patterns