calculating S and p-value. Not working yet.

Need to put in the minimum-sighting criteria.