Difference between function and distribution?












2












$begingroup$


I know this is dumb question, but i am confused to understand it.



I have constant function as $$y = exp(-x^2)$$



This also represent gaussian distribution with mean zero and variance of 0.5 Now if we take sample from this function, which will always be from this distribution.



Now, if we estimate the behaviour of this function by taking few sample from it and fit a curve. Then we generally say that this is function not a distribution.



Is this because of we are not considering mean and variance while estimating?










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
    $endgroup$
    – Tim
    Jan 21 at 7:54










  • $begingroup$
    My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
    $endgroup$
    – Ankish Bansal
    Jan 21 at 9:30


















2












$begingroup$


I know this is dumb question, but i am confused to understand it.



I have constant function as $$y = exp(-x^2)$$



This also represent gaussian distribution with mean zero and variance of 0.5 Now if we take sample from this function, which will always be from this distribution.



Now, if we estimate the behaviour of this function by taking few sample from it and fit a curve. Then we generally say that this is function not a distribution.



Is this because of we are not considering mean and variance while estimating?










share|cite|improve this question









$endgroup$








  • 1




    $begingroup$
    Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
    $endgroup$
    – Tim
    Jan 21 at 7:54










  • $begingroup$
    My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
    $endgroup$
    – Ankish Bansal
    Jan 21 at 9:30
















2












2








2


2



$begingroup$


I know this is dumb question, but i am confused to understand it.



I have constant function as $$y = exp(-x^2)$$



This also represent gaussian distribution with mean zero and variance of 0.5 Now if we take sample from this function, which will always be from this distribution.



Now, if we estimate the behaviour of this function by taking few sample from it and fit a curve. Then we generally say that this is function not a distribution.



Is this because of we are not considering mean and variance while estimating?










share|cite|improve this question









$endgroup$




I know this is dumb question, but i am confused to understand it.



I have constant function as $$y = exp(-x^2)$$



This also represent gaussian distribution with mean zero and variance of 0.5 Now if we take sample from this function, which will always be from this distribution.



Now, if we estimate the behaviour of this function by taking few sample from it and fit a curve. Then we generally say that this is function not a distribution.



Is this because of we are not considering mean and variance while estimating?







distributions estimation density-estimation function






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 21 at 6:24









Ankish BansalAnkish Bansal

1847




1847








  • 1




    $begingroup$
    Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
    $endgroup$
    – Tim
    Jan 21 at 7:54










  • $begingroup$
    My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
    $endgroup$
    – Ankish Bansal
    Jan 21 at 9:30
















  • 1




    $begingroup$
    Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
    $endgroup$
    – Tim
    Jan 21 at 7:54










  • $begingroup$
    My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
    $endgroup$
    – Ankish Bansal
    Jan 21 at 9:30










1




1




$begingroup$
Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
$endgroup$
– Tim
Jan 21 at 7:54




$begingroup$
Could you expand "Then we generally say that this is function not a distribution"? What do you mean by this?
$endgroup$
– Tim
Jan 21 at 7:54












$begingroup$
My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
$endgroup$
– Ankish Bansal
Jan 21 at 9:30






$begingroup$
My mean by this is by fitting a best curve, we say it function, but there are many possibilities of curves with different variance, then we use term distribution.
$endgroup$
– Ankish Bansal
Jan 21 at 9:30












1 Answer
1






active

oldest

votes


















4












$begingroup$

Small corrections and notes:




  • y should be $frac{1}{sqrt{pi}}exp(-x^2)$ to be a density function. This density, as you say, represents a Gaussian distribution with specific mean/variance.

  • Distribution function is referred as CDF, which is the integral of the density function.


Now, let's clear the ambiguity. Sampling from a function means calculating a couple of outputs given a couple of inputs, i.e. you'll have samples like $f(x_1),f(x_2)...,f(x_n)$ given $x_1,...,x_n$. You can fit a curve to these samples and say that this is a function, yes. This is like sampling a signal, and is unrelated to the sampling we do in probabilistic framework.



When you create samples from distributions, you create random numbers whose histogram resembles the density function they're sampled from. This random number creation (sampling) process is often tedious. A common approach is Inverse Transform Sampling, which is first creating a uniform RV $u$ (between 0,1), which is another problem, and applying $F^{-1}(u)$, where $F(x)$ is CDF of the random variable we're interested in. For creating Gauss RV, there is Box-Muller method.



To sum up, sampling from a distribution is like making up a histogram, other than plotting $y$ curve.






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: "65"
    };
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f388324%2fdifference-between-function-and-distribution%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









    4












    $begingroup$

    Small corrections and notes:




    • y should be $frac{1}{sqrt{pi}}exp(-x^2)$ to be a density function. This density, as you say, represents a Gaussian distribution with specific mean/variance.

    • Distribution function is referred as CDF, which is the integral of the density function.


    Now, let's clear the ambiguity. Sampling from a function means calculating a couple of outputs given a couple of inputs, i.e. you'll have samples like $f(x_1),f(x_2)...,f(x_n)$ given $x_1,...,x_n$. You can fit a curve to these samples and say that this is a function, yes. This is like sampling a signal, and is unrelated to the sampling we do in probabilistic framework.



    When you create samples from distributions, you create random numbers whose histogram resembles the density function they're sampled from. This random number creation (sampling) process is often tedious. A common approach is Inverse Transform Sampling, which is first creating a uniform RV $u$ (between 0,1), which is another problem, and applying $F^{-1}(u)$, where $F(x)$ is CDF of the random variable we're interested in. For creating Gauss RV, there is Box-Muller method.



    To sum up, sampling from a distribution is like making up a histogram, other than plotting $y$ curve.






    share|cite|improve this answer









    $endgroup$


















      4












      $begingroup$

      Small corrections and notes:




      • y should be $frac{1}{sqrt{pi}}exp(-x^2)$ to be a density function. This density, as you say, represents a Gaussian distribution with specific mean/variance.

      • Distribution function is referred as CDF, which is the integral of the density function.


      Now, let's clear the ambiguity. Sampling from a function means calculating a couple of outputs given a couple of inputs, i.e. you'll have samples like $f(x_1),f(x_2)...,f(x_n)$ given $x_1,...,x_n$. You can fit a curve to these samples and say that this is a function, yes. This is like sampling a signal, and is unrelated to the sampling we do in probabilistic framework.



      When you create samples from distributions, you create random numbers whose histogram resembles the density function they're sampled from. This random number creation (sampling) process is often tedious. A common approach is Inverse Transform Sampling, which is first creating a uniform RV $u$ (between 0,1), which is another problem, and applying $F^{-1}(u)$, where $F(x)$ is CDF of the random variable we're interested in. For creating Gauss RV, there is Box-Muller method.



      To sum up, sampling from a distribution is like making up a histogram, other than plotting $y$ curve.






      share|cite|improve this answer









      $endgroup$
















        4












        4








        4





        $begingroup$

        Small corrections and notes:




        • y should be $frac{1}{sqrt{pi}}exp(-x^2)$ to be a density function. This density, as you say, represents a Gaussian distribution with specific mean/variance.

        • Distribution function is referred as CDF, which is the integral of the density function.


        Now, let's clear the ambiguity. Sampling from a function means calculating a couple of outputs given a couple of inputs, i.e. you'll have samples like $f(x_1),f(x_2)...,f(x_n)$ given $x_1,...,x_n$. You can fit a curve to these samples and say that this is a function, yes. This is like sampling a signal, and is unrelated to the sampling we do in probabilistic framework.



        When you create samples from distributions, you create random numbers whose histogram resembles the density function they're sampled from. This random number creation (sampling) process is often tedious. A common approach is Inverse Transform Sampling, which is first creating a uniform RV $u$ (between 0,1), which is another problem, and applying $F^{-1}(u)$, where $F(x)$ is CDF of the random variable we're interested in. For creating Gauss RV, there is Box-Muller method.



        To sum up, sampling from a distribution is like making up a histogram, other than plotting $y$ curve.






        share|cite|improve this answer









        $endgroup$



        Small corrections and notes:




        • y should be $frac{1}{sqrt{pi}}exp(-x^2)$ to be a density function. This density, as you say, represents a Gaussian distribution with specific mean/variance.

        • Distribution function is referred as CDF, which is the integral of the density function.


        Now, let's clear the ambiguity. Sampling from a function means calculating a couple of outputs given a couple of inputs, i.e. you'll have samples like $f(x_1),f(x_2)...,f(x_n)$ given $x_1,...,x_n$. You can fit a curve to these samples and say that this is a function, yes. This is like sampling a signal, and is unrelated to the sampling we do in probabilistic framework.



        When you create samples from distributions, you create random numbers whose histogram resembles the density function they're sampled from. This random number creation (sampling) process is often tedious. A common approach is Inverse Transform Sampling, which is first creating a uniform RV $u$ (between 0,1), which is another problem, and applying $F^{-1}(u)$, where $F(x)$ is CDF of the random variable we're interested in. For creating Gauss RV, there is Box-Muller method.



        To sum up, sampling from a distribution is like making up a histogram, other than plotting $y$ curve.







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Jan 21 at 7:04









        gunesgunes

        5,7601115




        5,7601115






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Cross Validated!


            • 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%2fstats.stackexchange.com%2fquestions%2f388324%2fdifference-between-function-and-distribution%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

            How to fix TextFormField cause rebuild widget in Flutter