Difference between function and distribution?
$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?
distributions estimation density-estimation function
$endgroup$
add a comment |
$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?
distributions estimation density-estimation function
$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
add a comment |
$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?
distributions estimation density-estimation function
$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
distributions estimation density-estimation function
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
$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.
$endgroup$
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
$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.
$endgroup$
add a comment |
$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.
$endgroup$
add a comment |
$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.
$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.
answered Jan 21 at 7:04
gunesgunes
5,7601115
5,7601115
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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