dispersion function

Measures dispersion