Drawing random realisation from quantity with poisson error












1












$begingroup$


How would I draw a random realisation of a variable with an upper and lower error determined from Poisson statistics using the Gehrels 1986 formula?
See: http://adsabs.harvard.edu/abs/1986ApJ...303..336G



For example, I have a count of:



$x = 3^{+5.9}_{-1.3}$



and I want to draw many random realisations of this to use in a Monte Carlo simulation. How do I do this, please?



If it were a Gaussian variable I'd use a random Gaussian (or split-normal) distribution centred on $mu=3$ with a standard deviation $sigma^+=5.9$ and $sigma^-=1.3$.



Thanks for any help here.










share|cite|improve this question











$endgroup$












  • $begingroup$
    If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:05












  • $begingroup$
    Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:14
















1












$begingroup$


How would I draw a random realisation of a variable with an upper and lower error determined from Poisson statistics using the Gehrels 1986 formula?
See: http://adsabs.harvard.edu/abs/1986ApJ...303..336G



For example, I have a count of:



$x = 3^{+5.9}_{-1.3}$



and I want to draw many random realisations of this to use in a Monte Carlo simulation. How do I do this, please?



If it were a Gaussian variable I'd use a random Gaussian (or split-normal) distribution centred on $mu=3$ with a standard deviation $sigma^+=5.9$ and $sigma^-=1.3$.



Thanks for any help here.










share|cite|improve this question











$endgroup$












  • $begingroup$
    If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:05












  • $begingroup$
    Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:14














1












1








1


0



$begingroup$


How would I draw a random realisation of a variable with an upper and lower error determined from Poisson statistics using the Gehrels 1986 formula?
See: http://adsabs.harvard.edu/abs/1986ApJ...303..336G



For example, I have a count of:



$x = 3^{+5.9}_{-1.3}$



and I want to draw many random realisations of this to use in a Monte Carlo simulation. How do I do this, please?



If it were a Gaussian variable I'd use a random Gaussian (or split-normal) distribution centred on $mu=3$ with a standard deviation $sigma^+=5.9$ and $sigma^-=1.3$.



Thanks for any help here.










share|cite|improve this question











$endgroup$




How would I draw a random realisation of a variable with an upper and lower error determined from Poisson statistics using the Gehrels 1986 formula?
See: http://adsabs.harvard.edu/abs/1986ApJ...303..336G



For example, I have a count of:



$x = 3^{+5.9}_{-1.3}$



and I want to draw many random realisations of this to use in a Monte Carlo simulation. How do I do this, please?



If it were a Gaussian variable I'd use a random Gaussian (or split-normal) distribution centred on $mu=3$ with a standard deviation $sigma^+=5.9$ and $sigma^-=1.3$.



Thanks for any help here.







random poisson-distribution standard-deviation monte-carlo error-propagation






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Feb 5 at 23:37







alex_lewis

















asked Jan 31 at 13:25









alex_lewisalex_lewis

206




206












  • $begingroup$
    If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:05












  • $begingroup$
    Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:14


















  • $begingroup$
    If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:05












  • $begingroup$
    Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
    $endgroup$
    – Ron Kaminsky
    Feb 10 at 22:14
















$begingroup$
If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
$endgroup$
– Ron Kaminsky
Feb 10 at 22:05






$begingroup$
If you want to simulate that random variable, I don't see what is the connection to the confidence limits. Why wouldn't you just use the unbiased estimator for $lambda$ which is the number of events divided by the length of the interval measured?
$endgroup$
– Ron Kaminsky
Feb 10 at 22:05














$begingroup$
Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
$endgroup$
– Ron Kaminsky
Feb 10 at 22:14




$begingroup$
Possibly what is confusing you is that the normal distribution has two parameters and therefore the variance can be "reverse engineered" using the confidence limits. Poisson only has one parameter, so there is no second parameter to "reverse engineer", nor any necessity to do so.
$endgroup$
– Ron Kaminsky
Feb 10 at 22:14










1 Answer
1






active

oldest

votes


















0












$begingroup$

Since you give no information how the confidence interval should affect your simulation (said confidence interval being something you have arbitrarily chosen via choosing its probability cutoffs), I see only two possible answers to your question.



The first is that you should just use the rate which was observed as the parameter for a random variable with a Poisson distribution (since the observed rate is an unbiased estimator for $lambda$).



The second and more interesting possibility is Bayesian in nature. Given an observation of $k$ events, the probability distribution for $lambda$ is a gamma distribution with parameters $alpha = k+1$ and $beta = 1$. Therefore, you can use a two-step method: generate a value for $lambda$ from that distribution, and then generate a random value for $k$ from the Poisson distribution with that choice for $lambda$. (I suppose if you really want your choice of confidence interval to have some effect, you could limit the possible values for $lambda$ generated by that gamma distribution to your confidence interval, by rejecting any values outside of the interval.)






share|cite|improve this answer











$endgroup$














    Your Answer





    StackExchange.ifUsing("editor", function () {
    return StackExchange.using("mathjaxEditing", function () {
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    });
    });
    }, "mathjax-editing");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3094875%2fdrawing-random-realisation-from-quantity-with-poisson-error%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    Since you give no information how the confidence interval should affect your simulation (said confidence interval being something you have arbitrarily chosen via choosing its probability cutoffs), I see only two possible answers to your question.



    The first is that you should just use the rate which was observed as the parameter for a random variable with a Poisson distribution (since the observed rate is an unbiased estimator for $lambda$).



    The second and more interesting possibility is Bayesian in nature. Given an observation of $k$ events, the probability distribution for $lambda$ is a gamma distribution with parameters $alpha = k+1$ and $beta = 1$. Therefore, you can use a two-step method: generate a value for $lambda$ from that distribution, and then generate a random value for $k$ from the Poisson distribution with that choice for $lambda$. (I suppose if you really want your choice of confidence interval to have some effect, you could limit the possible values for $lambda$ generated by that gamma distribution to your confidence interval, by rejecting any values outside of the interval.)






    share|cite|improve this answer











    $endgroup$


















      0












      $begingroup$

      Since you give no information how the confidence interval should affect your simulation (said confidence interval being something you have arbitrarily chosen via choosing its probability cutoffs), I see only two possible answers to your question.



      The first is that you should just use the rate which was observed as the parameter for a random variable with a Poisson distribution (since the observed rate is an unbiased estimator for $lambda$).



      The second and more interesting possibility is Bayesian in nature. Given an observation of $k$ events, the probability distribution for $lambda$ is a gamma distribution with parameters $alpha = k+1$ and $beta = 1$. Therefore, you can use a two-step method: generate a value for $lambda$ from that distribution, and then generate a random value for $k$ from the Poisson distribution with that choice for $lambda$. (I suppose if you really want your choice of confidence interval to have some effect, you could limit the possible values for $lambda$ generated by that gamma distribution to your confidence interval, by rejecting any values outside of the interval.)






      share|cite|improve this answer











      $endgroup$
















        0












        0








        0





        $begingroup$

        Since you give no information how the confidence interval should affect your simulation (said confidence interval being something you have arbitrarily chosen via choosing its probability cutoffs), I see only two possible answers to your question.



        The first is that you should just use the rate which was observed as the parameter for a random variable with a Poisson distribution (since the observed rate is an unbiased estimator for $lambda$).



        The second and more interesting possibility is Bayesian in nature. Given an observation of $k$ events, the probability distribution for $lambda$ is a gamma distribution with parameters $alpha = k+1$ and $beta = 1$. Therefore, you can use a two-step method: generate a value for $lambda$ from that distribution, and then generate a random value for $k$ from the Poisson distribution with that choice for $lambda$. (I suppose if you really want your choice of confidence interval to have some effect, you could limit the possible values for $lambda$ generated by that gamma distribution to your confidence interval, by rejecting any values outside of the interval.)






        share|cite|improve this answer











        $endgroup$



        Since you give no information how the confidence interval should affect your simulation (said confidence interval being something you have arbitrarily chosen via choosing its probability cutoffs), I see only two possible answers to your question.



        The first is that you should just use the rate which was observed as the parameter for a random variable with a Poisson distribution (since the observed rate is an unbiased estimator for $lambda$).



        The second and more interesting possibility is Bayesian in nature. Given an observation of $k$ events, the probability distribution for $lambda$ is a gamma distribution with parameters $alpha = k+1$ and $beta = 1$. Therefore, you can use a two-step method: generate a value for $lambda$ from that distribution, and then generate a random value for $k$ from the Poisson distribution with that choice for $lambda$. (I suppose if you really want your choice of confidence interval to have some effect, you could limit the possible values for $lambda$ generated by that gamma distribution to your confidence interval, by rejecting any values outside of the interval.)







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Feb 12 at 19:14

























        answered Feb 11 at 21:03









        Ron KaminskyRon Kaminsky

        1678




        1678






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3094875%2fdrawing-random-realisation-from-quantity-with-poisson-error%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            MongoDB - Not Authorized To Execute Command

            in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

            Npm cannot find a required file even through it is in the searched directory