Median from probability density function












2














I have a probability density function:



$f(x) = begin{cases} frac 1 4xe^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



To add more detail, cdf is:



$F(x) = begin{cases} 1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



Find the $Med(x)$.



Solving



$$int_{-infty}^{x} f(x) dx=1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}=frac 12$$



I found 2 values $3.3567$ and $-1.5361$, and my book said that the answer is $-1.5361$. This is confusing because I thought $Med(X)ge 0$.










share|cite|improve this question









New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • The median is unique. So you can’t find two values.
    – mathcounterexamples.net
    Dec 26 at 13:16










  • I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
    – Tjh Thon
    Dec 26 at 13:17










  • Which equation did you solve? Please update the question with what you did.
    – mathcounterexamples.net
    Dec 26 at 13:18










  • I have edited my post.
    – Tjh Thon
    Dec 26 at 13:24






  • 2




    Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
    – StubbornAtom
    Dec 26 at 13:46


















2














I have a probability density function:



$f(x) = begin{cases} frac 1 4xe^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



To add more detail, cdf is:



$F(x) = begin{cases} 1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



Find the $Med(x)$.



Solving



$$int_{-infty}^{x} f(x) dx=1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}=frac 12$$



I found 2 values $3.3567$ and $-1.5361$, and my book said that the answer is $-1.5361$. This is confusing because I thought $Med(X)ge 0$.










share|cite|improve this question









New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • The median is unique. So you can’t find two values.
    – mathcounterexamples.net
    Dec 26 at 13:16










  • I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
    – Tjh Thon
    Dec 26 at 13:17










  • Which equation did you solve? Please update the question with what you did.
    – mathcounterexamples.net
    Dec 26 at 13:18










  • I have edited my post.
    – Tjh Thon
    Dec 26 at 13:24






  • 2




    Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
    – StubbornAtom
    Dec 26 at 13:46
















2












2








2







I have a probability density function:



$f(x) = begin{cases} frac 1 4xe^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



To add more detail, cdf is:



$F(x) = begin{cases} 1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



Find the $Med(x)$.



Solving



$$int_{-infty}^{x} f(x) dx=1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}=frac 12$$



I found 2 values $3.3567$ and $-1.5361$, and my book said that the answer is $-1.5361$. This is confusing because I thought $Med(X)ge 0$.










share|cite|improve this question









New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have a probability density function:



$f(x) = begin{cases} frac 1 4xe^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



To add more detail, cdf is:



$F(x) = begin{cases} 1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}, & xge0 \ 0, & x < 0end{cases}$



Find the $Med(x)$.



Solving



$$int_{-infty}^{x} f(x) dx=1+frac{-1}2xe^{frac {-x}2}-e^{frac {-x}2}=frac 12$$



I found 2 values $3.3567$ and $-1.5361$, and my book said that the answer is $-1.5361$. This is confusing because I thought $Med(X)ge 0$.







probability probability-theory probability-distributions






share|cite|improve this question









New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited Dec 26 at 13:38





















New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 26 at 13:14









Tjh Thon

112




112




New contributor




Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tjh Thon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • The median is unique. So you can’t find two values.
    – mathcounterexamples.net
    Dec 26 at 13:16










  • I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
    – Tjh Thon
    Dec 26 at 13:17










  • Which equation did you solve? Please update the question with what you did.
    – mathcounterexamples.net
    Dec 26 at 13:18










  • I have edited my post.
    – Tjh Thon
    Dec 26 at 13:24






  • 2




    Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
    – StubbornAtom
    Dec 26 at 13:46




















  • The median is unique. So you can’t find two values.
    – mathcounterexamples.net
    Dec 26 at 13:16










  • I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
    – Tjh Thon
    Dec 26 at 13:17










  • Which equation did you solve? Please update the question with what you did.
    – mathcounterexamples.net
    Dec 26 at 13:18










  • I have edited my post.
    – Tjh Thon
    Dec 26 at 13:24






  • 2




    Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
    – StubbornAtom
    Dec 26 at 13:46


















The median is unique. So you can’t find two values.
– mathcounterexamples.net
Dec 26 at 13:16




The median is unique. So you can’t find two values.
– mathcounterexamples.net
Dec 26 at 13:16












I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
– Tjh Thon
Dec 26 at 13:17




I solve the equation and it gives me 2 $x$ values, I haven't determined which $Med(X)$ is yet.
– Tjh Thon
Dec 26 at 13:17












Which equation did you solve? Please update the question with what you did.
– mathcounterexamples.net
Dec 26 at 13:18




Which equation did you solve? Please update the question with what you did.
– mathcounterexamples.net
Dec 26 at 13:18












I have edited my post.
– Tjh Thon
Dec 26 at 13:24




I have edited my post.
– Tjh Thon
Dec 26 at 13:24




2




2




Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
– StubbornAtom
Dec 26 at 13:46






Only the non-negative solution should be median since you used that part of the cdf for which $xge 0$; $F(x)$ cannot be $1/2$ for any $x<0$.
– StubbornAtom
Dec 26 at 13:46












1 Answer
1






active

oldest

votes


















0














Your PDF is for the distribution $mathsf{Gamma}(text{shape}=2,text{rate}=frac 1 2).$
See the relevant Wikipedia page (or your textbook) for details. You seek $F_X^{-1}(frac 1 2) = 3.356694.$



In R statistical software, the inverse CDF (quantile function)
is denoted qgamma with appropriate arguments.



qgamma(.5,2,1/2)
[1] 3.356694


I agree with the comment of @StubbornAtom, that the median
cannot be negative. The "answer" −1.5361 is simply wrong.



Here is a graph of the PDF, with the location of the median
shown by a dotted red line.



enter image description here






share|cite|improve this answer





















    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
    });


    }
    });






    Tjh Thon is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3052932%2fmedian-from-probability-density-function%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














    Your PDF is for the distribution $mathsf{Gamma}(text{shape}=2,text{rate}=frac 1 2).$
    See the relevant Wikipedia page (or your textbook) for details. You seek $F_X^{-1}(frac 1 2) = 3.356694.$



    In R statistical software, the inverse CDF (quantile function)
    is denoted qgamma with appropriate arguments.



    qgamma(.5,2,1/2)
    [1] 3.356694


    I agree with the comment of @StubbornAtom, that the median
    cannot be negative. The "answer" −1.5361 is simply wrong.



    Here is a graph of the PDF, with the location of the median
    shown by a dotted red line.



    enter image description here






    share|cite|improve this answer


























      0














      Your PDF is for the distribution $mathsf{Gamma}(text{shape}=2,text{rate}=frac 1 2).$
      See the relevant Wikipedia page (or your textbook) for details. You seek $F_X^{-1}(frac 1 2) = 3.356694.$



      In R statistical software, the inverse CDF (quantile function)
      is denoted qgamma with appropriate arguments.



      qgamma(.5,2,1/2)
      [1] 3.356694


      I agree with the comment of @StubbornAtom, that the median
      cannot be negative. The "answer" −1.5361 is simply wrong.



      Here is a graph of the PDF, with the location of the median
      shown by a dotted red line.



      enter image description here






      share|cite|improve this answer
























        0












        0








        0






        Your PDF is for the distribution $mathsf{Gamma}(text{shape}=2,text{rate}=frac 1 2).$
        See the relevant Wikipedia page (or your textbook) for details. You seek $F_X^{-1}(frac 1 2) = 3.356694.$



        In R statistical software, the inverse CDF (quantile function)
        is denoted qgamma with appropriate arguments.



        qgamma(.5,2,1/2)
        [1] 3.356694


        I agree with the comment of @StubbornAtom, that the median
        cannot be negative. The "answer" −1.5361 is simply wrong.



        Here is a graph of the PDF, with the location of the median
        shown by a dotted red line.



        enter image description here






        share|cite|improve this answer












        Your PDF is for the distribution $mathsf{Gamma}(text{shape}=2,text{rate}=frac 1 2).$
        See the relevant Wikipedia page (or your textbook) for details. You seek $F_X^{-1}(frac 1 2) = 3.356694.$



        In R statistical software, the inverse CDF (quantile function)
        is denoted qgamma with appropriate arguments.



        qgamma(.5,2,1/2)
        [1] 3.356694


        I agree with the comment of @StubbornAtom, that the median
        cannot be negative. The "answer" −1.5361 is simply wrong.



        Here is a graph of the PDF, with the location of the median
        shown by a dotted red line.



        enter image description here







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 27 at 8:52









        BruceET

        35.1k71440




        35.1k71440






















            Tjh Thon is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Tjh Thon is a new contributor. Be nice, and check out our Code of Conduct.













            Tjh Thon is a new contributor. Be nice, and check out our Code of Conduct.












            Tjh Thon is a new contributor. Be nice, and check out our Code of Conduct.
















            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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.


            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%2f3052932%2fmedian-from-probability-density-function%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

            Human spaceflight

            Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

            張江高科駅