I wonder if there is any statistical test to "test" the significance of a bimodal distribution. I mean, How much my data meets the bimodal distribution or not? If so, is there any test in the R program?
Hypothesis Testing in R – Test for Bimodal Distribution
bimodaldistributionshypothesis testingr
Related Solutions
What makes a test statistic "extreme" depends on your alternative, which imposes an ordering (or at least a partial order) on the sample space - you seek to reject those cases most consistent (in the sense being measured by a test statistic) with the alternative.
When you don't really have an alternative to give you a something to be most consistent with, you're essentially left with the likelihood to give the ordering, most often seen in Fisher's exact test. There, the probability of the outcomes (the 2x2 tables) under the null orders the test statistic (so that 'extreme' is 'low probability').
If you were in a situation where the far left (or far right, or both) of your bimodal null distribution was associated with the kind of alternative you were interested in, you wouldn't seek to reject a test statistic of 60. But if you're in a situation where you don't have an alternative like that, then 60 is unsual - it has low likelihood; a value of 60 is inconsistent with your model and would lead you to reject.
[This would be seen by some as one central difference between Fisherian and Neyman-Pearson hypothesis testing. By introducing an explicit alternative, and a ratio of likelihoods, a low likelihood under the null won't necessarily cause you to reject in a Neyman-Pearson framework (as long as it performs relatively well compared too the alternative), while for Fisher, you don't really have an alternative, and the likelihood under the null is the thing you're interested in.]
I'm not suggesting either approach is right or wrong here - you go ahead and work out for yourself what kind of alternatives you seek power against, whether it's a specific one, or just anything that's unlikely enough under the null. Once you know what you want, the rest (including what 'at least as extreme' means) pretty much follows from that.
While I am not aware of anything that can be called ''standard'' bimodal distribution, in this particular case, mixture normal distribution seems to be appropriate at first glance. The pdf of such distribution is essentially the linear combination of two (or more) - not necessarily equal means or equal variances - normal distribution's pdf. (Thus the mixing weight is also a further parameter.)
R package mixtools provides tools for estimating such distributions.
Best Answer
Another possible approach to this issue is to think about what might be going on behind the scenes that is generating the data you see. That is, you can think in terms of a mixture model, for example, a Gaussian mixture model. For instance, you might believe that your data are drawn from either a single normal population, or from a mixture of two normal distributions (in some proportion), with differing means and variances. Of course, you don't have to believe that there are only one or two, nor do you have to believe that the populations from which the data are drawn need to be normal.
There are (at least) two R packages that allow you to estimate mixture models. One package is flexmix, and another is mclust. Having estimated two candidate models, I believe it may be possible to conduct a likelihood ratio test. Alternatively, you could use the parametric bootstrap cross-fitting method (pdf).