On the Distributions of Scan Statistics