Testing multimodal distribution

I am trying to find implementations of any statistical method to test whether a sample is unimodal or multimodal distributed.
From Wikipedia Multimodal Distribution, you can find multiple example of such tests. In particular:

An implementation of the dip test is available for the R programming language.[56] The p-values for the dip statistic values range between 0 and 1. P-values less than 0.05 indicate significant multimodality and p-values greater than 0.05 but less than 0.10 suggest multimodality with marginal significance [57].

Is there anything like this in julia?

1 Like

Not that I am aware of — maybe implement one of these methods and put it in a package. I recently came across the “folding” test

https://hal.archives-ouvertes.fr/hal-01951676/document

which looks intuitively appealing, haven’t used it yet though. But it should be easy to implement.

Maybe HypothesisTests.jl would be a good place?

3 Likes

Thanks for the link, I’ll give it a shot and present it to HypothesisTests if it works

1 Like

Just came across this while searching for a solution to the same problem. Did you ever implement the algorithm?

I tried different methods, and with my data, the results were inconsistent. Some methods identified the distribution as bimodal, and others didn’t. Therefore, I gave up and used a different approach.

In case it is helpful what I did to convince a reviewer that the distribution wasn’t bimodal, I used k-means to divide my dataset forcefully into 2 sets and show that the rest of the results in my study were consistent across the 2 sets.