first commit - hotelling stats calculation