Results 1 to 4 of 4

Math Help - Drawing from a semi-log distribution

  1. #1
    Newbie
    Joined
    May 2008
    Posts
    8

    Drawing from a semi-log distribution

    Hello all. I have a paper that gives the number of binary stars as a function of period. The period is given in a log scale. I want to create at random a list of binary stars, with their period coming from this distribution. The problem is, I am not sure quite how to do this properly with a log distribution. What I currently do is choose at random, based on the cumulative probability, one of the edges of the histogram. I then the actual period is calculated from a uniform random distribution between this edge and the next edge to the left. I always figured this would be an approximation, but it is really scewing the distribution I draw. Can someone please give me some advice? I have attached images of the distribution taken from the paper, a Matlab plot of it (so basically the same thing) and then a histogram of the distribution I draw, which you can see is skewed. Note that the data was taken off the histogram by eye.

    Thank you in advance!
    Drawing from a semi-log distribution-screen-shot-2013-02-10-11.02.54-pm.png
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    3,664
    Thanks
    606

    Re: Drawing from a semi-log distribution

    Hey aussiedave.

    Do you want to sample for an analytic distribution or from an empirical distribution (like the one listed in your graphic)?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    May 2008
    Posts
    8

    Re: Drawing from a semi-log distribution

    Quote Originally Posted by chiro View Post
    Hey aussiedave.

    Do you want to sample for an analytic distribution or from an empirical distribution (like the one listed in your graphic)?
    Hey Chiro,

    I want to sample from an empirical distribution. As you can see by comparing the right plot to the other two, I am drawing something that is somewhat similar but just a bit scewed. This is drawn over 10,000 binary stars so the number of statistics is pretty good. Repeated attempts all give me the same approximate result.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Sep 2012
    From
    Australia
    Posts
    3,664
    Thanks
    606

    Re: Drawing from a semi-log distribution

    Try look at re-sampling technique code in something like R (which is open source):

    R Tutorials--Resampling Techniques
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. semi-metric spaces and qausi-semi developable
    Posted in the Differential Geometry Forum
    Replies: 3
    Last Post: July 18th 2011, 01:38 AM
  2. [SOLVED] Semi Linear PDE
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: February 15th 2011, 02:55 AM
  3. Semi-Ellipse
    Posted in the Geometry Forum
    Replies: 1
    Last Post: March 24th 2010, 04:02 AM
  4. Drawing from i.i.d. distribution. An analytical solution?
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: February 17th 2010, 11:26 PM
  5. Replies: 2
    Last Post: October 5th 2009, 02:29 AM

Search Tags


/mathhelpforum @mathhelpforum