Compute the posterior density for r
$begingroup$
I'm trying to understand the posterior distribution. For a simple example if i consider the beta function with parameters $alpha=1=beta$. Then the prior would be uniform in the range of 0 to 1 so $p(r) = 1$. If the likelihood is binomial, since we consider an experiment with two possible outcomes, would it be correct to say that the posterior density is given by the following?
$$p(r|y) = P(y|r) p(r) = binom{n}{y}r^y(1-r)^{n-y}cdot 1$$
Also if anyone could point me to some good resources regarding this it would be greatly appreciated, as i find a lot of confusing stuff online regarding this topic.
probability statistics statistical-inference machine-learning bayesian
$endgroup$
add a comment |
$begingroup$
I'm trying to understand the posterior distribution. For a simple example if i consider the beta function with parameters $alpha=1=beta$. Then the prior would be uniform in the range of 0 to 1 so $p(r) = 1$. If the likelihood is binomial, since we consider an experiment with two possible outcomes, would it be correct to say that the posterior density is given by the following?
$$p(r|y) = P(y|r) p(r) = binom{n}{y}r^y(1-r)^{n-y}cdot 1$$
Also if anyone could point me to some good resources regarding this it would be greatly appreciated, as i find a lot of confusing stuff online regarding this topic.
probability statistics statistical-inference machine-learning bayesian
$endgroup$
add a comment |
$begingroup$
I'm trying to understand the posterior distribution. For a simple example if i consider the beta function with parameters $alpha=1=beta$. Then the prior would be uniform in the range of 0 to 1 so $p(r) = 1$. If the likelihood is binomial, since we consider an experiment with two possible outcomes, would it be correct to say that the posterior density is given by the following?
$$p(r|y) = P(y|r) p(r) = binom{n}{y}r^y(1-r)^{n-y}cdot 1$$
Also if anyone could point me to some good resources regarding this it would be greatly appreciated, as i find a lot of confusing stuff online regarding this topic.
probability statistics statistical-inference machine-learning bayesian
$endgroup$
I'm trying to understand the posterior distribution. For a simple example if i consider the beta function with parameters $alpha=1=beta$. Then the prior would be uniform in the range of 0 to 1 so $p(r) = 1$. If the likelihood is binomial, since we consider an experiment with two possible outcomes, would it be correct to say that the posterior density is given by the following?
$$p(r|y) = P(y|r) p(r) = binom{n}{y}r^y(1-r)^{n-y}cdot 1$$
Also if anyone could point me to some good resources regarding this it would be greatly appreciated, as i find a lot of confusing stuff online regarding this topic.
probability statistics statistical-inference machine-learning bayesian
probability statistics statistical-inference machine-learning bayesian
edited Jan 7 at 21:33
sn3jd3r
asked Jan 7 at 21:26
sn3jd3rsn3jd3r
376
376
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Not quite:
$binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it
so the answer should be $dfrac{binom{n}{y}r^y(1-r)^{n-y}cdot 1}{intlimits _{r=0}^1 binom{n}{y}r^y(1-r)^{n-y}cdot 1, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $alpha=1+y,beta=1+n-y$
$endgroup$
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
add a comment |
Your Answer
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
});
}
});
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%2fmath.stackexchange.com%2fquestions%2f3065519%2fcompute-the-posterior-density-for-r%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$
Not quite:
$binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it
so the answer should be $dfrac{binom{n}{y}r^y(1-r)^{n-y}cdot 1}{intlimits _{r=0}^1 binom{n}{y}r^y(1-r)^{n-y}cdot 1, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $alpha=1+y,beta=1+n-y$
$endgroup$
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
add a comment |
$begingroup$
Not quite:
$binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it
so the answer should be $dfrac{binom{n}{y}r^y(1-r)^{n-y}cdot 1}{intlimits _{r=0}^1 binom{n}{y}r^y(1-r)^{n-y}cdot 1, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $alpha=1+y,beta=1+n-y$
$endgroup$
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
add a comment |
$begingroup$
Not quite:
$binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it
so the answer should be $dfrac{binom{n}{y}r^y(1-r)^{n-y}cdot 1}{intlimits _{r=0}^1 binom{n}{y}r^y(1-r)^{n-y}cdot 1, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $alpha=1+y,beta=1+n-y$
$endgroup$
Not quite:
$binom{n}{y}r^y(1-r)^{n-y}$ may sum over $y$ to $1$ but it does not integrate over $r$ to $1$ so it is not a probability density
more generally the posterior density is proportional to the prior density multiplied by the likelihood rather than being equal to it
so the answer should be $dfrac{binom{n}{y}r^y(1-r)^{n-y}cdot 1}{intlimits _{r=0}^1 binom{n}{y}r^y(1-r)^{n-y}cdot 1, dr}$ with some obvious cancellations; this is the density of a Beta distribution with parameters $alpha=1+y,beta=1+n-y$
answered Jan 7 at 22:42
HenryHenry
101k482170
101k482170
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
add a comment |
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
$begingroup$
Are you not allowed to omit the denominator in the answer in your post? I was under the assumption that when the prior is a beta distribution and the likelihood is a binomal distribution, then the beta is conjugate to the binomial.
$endgroup$
– sn3jd3r
Jan 7 at 23:09
1
1
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
$begingroup$
@sn3jd3r The posterior probability density function is in fact $dfrac{r^y(1-r)^{n-y}}{B(1+y,1+n-y)}$ when $0 le r le 1$ where the denominator is a Beta function which does not vary with $r$; this is the density of a Beta distribution. If you omit this denominator then you do not have a probability density function as it will not integrate to $1$, merely something proportional to the density.
$endgroup$
– Henry
Jan 7 at 23:33
add a comment |
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.
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%2fmath.stackexchange.com%2fquestions%2f3065519%2fcompute-the-posterior-density-for-r%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