1
$\begingroup$

I would like to match a probability distribution to the observed data by Hubé and Francastel (2015)

enter image description here

The mean is 5889 bp and the median is 1520 bp.

Can you help to match a distribution to these data? The log scale makes things harder to me. I tried mixture of one gamma distributions and a reversed gamma distribution both adding or subtracting from the observed median (1520 bp) but fail to find something that match nicely these data.

$\endgroup$
6
  • 1
    $\begingroup$ What is the purpose of such matching? $\endgroup$
    – Glen_b
    Commented May 31, 2016 at 0:33
  • $\begingroup$ I am using performing numerical simulation and want to use a realistic distribution of intron length. I am willing to draw the length of introns I simulate based on this distribution. $\endgroup$
    – Remi.b
    Commented May 31, 2016 at 0:35
  • 2
    $\begingroup$ 1. With so much data could not not simply sample the data? 2. Even if you need a fitted probability distribution, why would it need to be some particular parametric choice rather than some nonparametric estimate (e.g. a log-spline density estimate, perhaps, or a kernel density estimate or some mixture of right-skew distributions - possibly after a convenient transformation in any of those cases). Note that sampling a kernel density estimate can be regarded as resampling "fuzzed" data. $\endgroup$
    – Glen_b
    Commented May 31, 2016 at 1:18
  • $\begingroup$ Well.. I should maybe just email the authors to ask for their data then. I was hoping to be able to extract an accurate enough function that I would not have to bother with emailing the author and hoping for nicely formatted data. $\endgroup$
    – Remi.b
    Commented May 31, 2016 at 1:25
  • $\begingroup$ You ask the impossible: to reproduce the mean, you need much more detailed information about the values exceeding it than shown here. $\endgroup$
    – whuber
    Commented May 31, 2016 at 2:19

1 Answer 1

2
$\begingroup$

From your comments, it sounds like you have a plot of the data from a figure in a paper (but not the data itself), and your goal is to sample points from the distribution. Besides emailing the authors (which might be wiser than the alternative I'm going to describe), you could try something like this:

  1. Draw a series of dots along the curve. If you strung them together, they'd give a line of best fit. You'll need the coordinates of each dot you draw. The more dots, the more accurate the representation will be.

  2. Connect the dots to obtain a piecewise linear approximation of the the function in the plot (or you could use something fancier like splines). This approximates the unnormalized PDF.

  3. Integrate the unnormalized PDF, then shift/scale it to have minimum value 0 and maximum value 1. This gives an approximation of the CDF. You should now have a set of intron values (a vector $x$) and the corresponding values of the CDF at those points (a vector $c$)

  4. Use the inverse CDF method to draw samples. Draw $n$ random values ($u_i, ..., u_n$) from the uniform distribution on $(0, 1)$. For each $u_i$, find the two values of $c$ that it falls between. Interpolate linearly (using the corresponding values of $x$) to find the intron length corresponding to $u_i$. This treats the CDF as a piecewise linear function, but you could do something fancier.

  5. You now have $n$ intron lengths sampled from the distribution in the plot.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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