I tried the hartigans dip test, and it works well for univariate distributions. However, when i tried taking each variable (dimension) and applied hartigans dip test (assuming that if along one dimension/variable its bimodal the whole distribution is bimodal) it did not work. As an example, this is how my bimodal distribution looks like.enter image description here

Can you please help me with any other way in which i can detect multimodality in my data?


1 Answer 1


You could apply the hartigans dip test on the data projected onto the first principle components (PCA) explaining most of the variance. Especially for the bimodal scenario this allows to highlight the multimodality.

  • $\begingroup$ Thanks for the response. So do you mean, find the first principal component using PCA on the complete multivariate data, and then project each dimension onto the principal component and then apply hartigans to each? or apply hartigans test to the principal component itself? $\endgroup$ Feb 28, 2017 at 8:35
  • $\begingroup$ I was a little confused, i multiplied the resulting coefficients (Rotational matrix) with the original data and obtained the desired data. Thanks for the help. $\endgroup$ Feb 28, 2017 at 11:33
  • $\begingroup$ You are welcome, happy that I could answer your question. Would you mind to rate it +1? ;-) $\endgroup$
    – Jojo
    Mar 1, 2017 at 17:18
  • $\begingroup$ Sorry, i am not reputed enough for my +1 to be displayed. But thanks for the help. $\endgroup$ Apr 4, 2017 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.