I have a trimodal null distribution that looks like this:enter image description here

In order to calculate the significance we just check how extreme the values are respect to our null distribution.

We do it this way:

  find.pvalue <- function(value, null.dist, length(null.dist))  {
    if (value<0) {
      p = (sum(null.dist < value)+1)/length(null.dist)
    } else {
      p = (sum(null.dist > value)+1)/length(null.dist)

Then adjust FDR.

This is how I would do it for a normal distribution, but is this correct way to test for extreme values for a null distribution like this one?


  • $\begingroup$ What do you mean by p-value in here? It is a probability of what exactly? If you mean probability that something is greater then something else, then the shape of the distribution doesn't matter. $\endgroup$
    – Tim
    Nov 28 '18 at 12:03
  • $\begingroup$ In this case the p-value would be the probability of finding a value higher/lower than 0.05 (whatever) in the distribution. $\endgroup$ Nov 28 '18 at 12:04
  • $\begingroup$ Then this doesn't seem to have anything to do with p-value... $\endgroup$
    – Tim
    Nov 28 '18 at 12:05
  • $\begingroup$ It boils down to what you regard as "more extreme" (since that will then define rejection regions and p-values; it doesn't automatically mean 'further from the center' (though that may make sense for what you're doing) -- for example, one might base it directly on likelihood instead. $\endgroup$
    – Glen_b
    Nov 28 '18 at 12:25