The probability of heads of a random coin is uniform r.v. P. Find the probability that heads will show?
$begingroup$
The question states:
The probability of heads of a random coin is a random variable P, uniform in the interval $[0.4,0.6]$. Find the probability that at the next tossing of the coin that heads will show. Suppose the coin is tossed $50$ times resulting in $21$ tails and $29$ heads. What is $P(p|Observed Data)$?
My first question is what is the probability of P. It seems like there are two different ways to look at it. Is the probability such that $f(p)=5$ for $0.4 le p le 0.6$ and zero otherwise, thus
$$P(H) = int_{0.4}^{0.6}pdp = 0.5$$
or on the other hand does it follow the standard simple uniform distribution. That is
$$P[0.4 le P le 0.6] = int_{0.4}^{0.6} dp = 0.2$$
Then, to answer the second part, is it correctly broken down by
$$frac{p^{29}(1-p)^{21}}{int_{0.4}^{0.6}p^{29}(1-p)^{21}dp}$$
for $0.4 le p le 0.6$ and $0$ otherwise. Thus, we obtain
$$P(H|A) = int_{0.4}^{0.6} pf(p|A)dp$$
Thank you so much for your help in advance, I really appreciate it!
probability random-variables uniform-distribution
$endgroup$
add a comment |
$begingroup$
The question states:
The probability of heads of a random coin is a random variable P, uniform in the interval $[0.4,0.6]$. Find the probability that at the next tossing of the coin that heads will show. Suppose the coin is tossed $50$ times resulting in $21$ tails and $29$ heads. What is $P(p|Observed Data)$?
My first question is what is the probability of P. It seems like there are two different ways to look at it. Is the probability such that $f(p)=5$ for $0.4 le p le 0.6$ and zero otherwise, thus
$$P(H) = int_{0.4}^{0.6}pdp = 0.5$$
or on the other hand does it follow the standard simple uniform distribution. That is
$$P[0.4 le P le 0.6] = int_{0.4}^{0.6} dp = 0.2$$
Then, to answer the second part, is it correctly broken down by
$$frac{p^{29}(1-p)^{21}}{int_{0.4}^{0.6}p^{29}(1-p)^{21}dp}$$
for $0.4 le p le 0.6$ and $0$ otherwise. Thus, we obtain
$$P(H|A) = int_{0.4}^{0.6} pf(p|A)dp$$
Thank you so much for your help in advance, I really appreciate it!
probability random-variables uniform-distribution
$endgroup$
2
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
2
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07
add a comment |
$begingroup$
The question states:
The probability of heads of a random coin is a random variable P, uniform in the interval $[0.4,0.6]$. Find the probability that at the next tossing of the coin that heads will show. Suppose the coin is tossed $50$ times resulting in $21$ tails and $29$ heads. What is $P(p|Observed Data)$?
My first question is what is the probability of P. It seems like there are two different ways to look at it. Is the probability such that $f(p)=5$ for $0.4 le p le 0.6$ and zero otherwise, thus
$$P(H) = int_{0.4}^{0.6}pdp = 0.5$$
or on the other hand does it follow the standard simple uniform distribution. That is
$$P[0.4 le P le 0.6] = int_{0.4}^{0.6} dp = 0.2$$
Then, to answer the second part, is it correctly broken down by
$$frac{p^{29}(1-p)^{21}}{int_{0.4}^{0.6}p^{29}(1-p)^{21}dp}$$
for $0.4 le p le 0.6$ and $0$ otherwise. Thus, we obtain
$$P(H|A) = int_{0.4}^{0.6} pf(p|A)dp$$
Thank you so much for your help in advance, I really appreciate it!
probability random-variables uniform-distribution
$endgroup$
The question states:
The probability of heads of a random coin is a random variable P, uniform in the interval $[0.4,0.6]$. Find the probability that at the next tossing of the coin that heads will show. Suppose the coin is tossed $50$ times resulting in $21$ tails and $29$ heads. What is $P(p|Observed Data)$?
My first question is what is the probability of P. It seems like there are two different ways to look at it. Is the probability such that $f(p)=5$ for $0.4 le p le 0.6$ and zero otherwise, thus
$$P(H) = int_{0.4}^{0.6}pdp = 0.5$$
or on the other hand does it follow the standard simple uniform distribution. That is
$$P[0.4 le P le 0.6] = int_{0.4}^{0.6} dp = 0.2$$
Then, to answer the second part, is it correctly broken down by
$$frac{p^{29}(1-p)^{21}}{int_{0.4}^{0.6}p^{29}(1-p)^{21}dp}$$
for $0.4 le p le 0.6$ and $0$ otherwise. Thus, we obtain
$$P(H|A) = int_{0.4}^{0.6} pf(p|A)dp$$
Thank you so much for your help in advance, I really appreciate it!
probability random-variables uniform-distribution
probability random-variables uniform-distribution
edited Oct 16 '16 at 18:48
Billy Thorton
asked Oct 15 '16 at 1:11
Billy ThortonBilly Thorton
3141729
3141729
2
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
2
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07
add a comment |
2
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
2
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07
2
2
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
2
2
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Let's go step by step.
Although the result you arrive to regarding the question of what is the probability we should assign to heads before seeing the coin tosses is correct, your reasoning is not. To simplify notation I will use $theta$ instead of $P$ to denote the random variable which represents the coin bias.
First we want to find $P(H|theta is uniform in [0.4,0.6])$. But this is the same as $int_{0.4}^{0.6} P(H|theta = x) pi_{theta}(x) dx$, where $pi$ is the prior density of $theta$ and it is $pi_theta(x) = frac{I_{[0.4,0.6]}(x)}{0.6-0.4}$.
Substituting, we have that $P(H) = int_{0.4}^{0.6} x frac{1}{0.6-0.4}(x) dx=frac{1}{2}$.
Now we want to do a Bayes update given the data on the coin tosses.
If we denote by $B(n, h, p)$ the mass distribution of a binomial, where $n$ is the number of coin tosses, $h$ the number of heads and $p$ the coin bias, then:
$$
f(theta = x|Data) = pi_{theta}(x)frac{P(Data|theta = x)}{P(Data)}= pi_{theta}(x)frac{B(50,29, x)}{int_{0.4}^{0.6}B(50,29, y)pi_theta(y)dy}=
frac{1}{0.6-0.4}frac{{50 choose 29} x^{29} (1-x)^{21}}{int_{0.4}^{0.6}{50 choose 29} y^{29} (1-y)^{21} frac{1}{0.6-0.4}dy}=
frac{ x^{29} (1-x)^{21}}{int_{0.4}^{0.6} y^{29} (1-y)^{21}dy}
$$
Thus the result is a beta distribution with a rather hideous denominator.
$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: "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%2f1969001%2fthe-probability-of-heads-of-a-random-coin-is-uniform-r-v-p-find-the-probabilit%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$
Let's go step by step.
Although the result you arrive to regarding the question of what is the probability we should assign to heads before seeing the coin tosses is correct, your reasoning is not. To simplify notation I will use $theta$ instead of $P$ to denote the random variable which represents the coin bias.
First we want to find $P(H|theta is uniform in [0.4,0.6])$. But this is the same as $int_{0.4}^{0.6} P(H|theta = x) pi_{theta}(x) dx$, where $pi$ is the prior density of $theta$ and it is $pi_theta(x) = frac{I_{[0.4,0.6]}(x)}{0.6-0.4}$.
Substituting, we have that $P(H) = int_{0.4}^{0.6} x frac{1}{0.6-0.4}(x) dx=frac{1}{2}$.
Now we want to do a Bayes update given the data on the coin tosses.
If we denote by $B(n, h, p)$ the mass distribution of a binomial, where $n$ is the number of coin tosses, $h$ the number of heads and $p$ the coin bias, then:
$$
f(theta = x|Data) = pi_{theta}(x)frac{P(Data|theta = x)}{P(Data)}= pi_{theta}(x)frac{B(50,29, x)}{int_{0.4}^{0.6}B(50,29, y)pi_theta(y)dy}=
frac{1}{0.6-0.4}frac{{50 choose 29} x^{29} (1-x)^{21}}{int_{0.4}^{0.6}{50 choose 29} y^{29} (1-y)^{21} frac{1}{0.6-0.4}dy}=
frac{ x^{29} (1-x)^{21}}{int_{0.4}^{0.6} y^{29} (1-y)^{21}dy}
$$
Thus the result is a beta distribution with a rather hideous denominator.
$endgroup$
add a comment |
$begingroup$
Let's go step by step.
Although the result you arrive to regarding the question of what is the probability we should assign to heads before seeing the coin tosses is correct, your reasoning is not. To simplify notation I will use $theta$ instead of $P$ to denote the random variable which represents the coin bias.
First we want to find $P(H|theta is uniform in [0.4,0.6])$. But this is the same as $int_{0.4}^{0.6} P(H|theta = x) pi_{theta}(x) dx$, where $pi$ is the prior density of $theta$ and it is $pi_theta(x) = frac{I_{[0.4,0.6]}(x)}{0.6-0.4}$.
Substituting, we have that $P(H) = int_{0.4}^{0.6} x frac{1}{0.6-0.4}(x) dx=frac{1}{2}$.
Now we want to do a Bayes update given the data on the coin tosses.
If we denote by $B(n, h, p)$ the mass distribution of a binomial, where $n$ is the number of coin tosses, $h$ the number of heads and $p$ the coin bias, then:
$$
f(theta = x|Data) = pi_{theta}(x)frac{P(Data|theta = x)}{P(Data)}= pi_{theta}(x)frac{B(50,29, x)}{int_{0.4}^{0.6}B(50,29, y)pi_theta(y)dy}=
frac{1}{0.6-0.4}frac{{50 choose 29} x^{29} (1-x)^{21}}{int_{0.4}^{0.6}{50 choose 29} y^{29} (1-y)^{21} frac{1}{0.6-0.4}dy}=
frac{ x^{29} (1-x)^{21}}{int_{0.4}^{0.6} y^{29} (1-y)^{21}dy}
$$
Thus the result is a beta distribution with a rather hideous denominator.
$endgroup$
add a comment |
$begingroup$
Let's go step by step.
Although the result you arrive to regarding the question of what is the probability we should assign to heads before seeing the coin tosses is correct, your reasoning is not. To simplify notation I will use $theta$ instead of $P$ to denote the random variable which represents the coin bias.
First we want to find $P(H|theta is uniform in [0.4,0.6])$. But this is the same as $int_{0.4}^{0.6} P(H|theta = x) pi_{theta}(x) dx$, where $pi$ is the prior density of $theta$ and it is $pi_theta(x) = frac{I_{[0.4,0.6]}(x)}{0.6-0.4}$.
Substituting, we have that $P(H) = int_{0.4}^{0.6} x frac{1}{0.6-0.4}(x) dx=frac{1}{2}$.
Now we want to do a Bayes update given the data on the coin tosses.
If we denote by $B(n, h, p)$ the mass distribution of a binomial, where $n$ is the number of coin tosses, $h$ the number of heads and $p$ the coin bias, then:
$$
f(theta = x|Data) = pi_{theta}(x)frac{P(Data|theta = x)}{P(Data)}= pi_{theta}(x)frac{B(50,29, x)}{int_{0.4}^{0.6}B(50,29, y)pi_theta(y)dy}=
frac{1}{0.6-0.4}frac{{50 choose 29} x^{29} (1-x)^{21}}{int_{0.4}^{0.6}{50 choose 29} y^{29} (1-y)^{21} frac{1}{0.6-0.4}dy}=
frac{ x^{29} (1-x)^{21}}{int_{0.4}^{0.6} y^{29} (1-y)^{21}dy}
$$
Thus the result is a beta distribution with a rather hideous denominator.
$endgroup$
Let's go step by step.
Although the result you arrive to regarding the question of what is the probability we should assign to heads before seeing the coin tosses is correct, your reasoning is not. To simplify notation I will use $theta$ instead of $P$ to denote the random variable which represents the coin bias.
First we want to find $P(H|theta is uniform in [0.4,0.6])$. But this is the same as $int_{0.4}^{0.6} P(H|theta = x) pi_{theta}(x) dx$, where $pi$ is the prior density of $theta$ and it is $pi_theta(x) = frac{I_{[0.4,0.6]}(x)}{0.6-0.4}$.
Substituting, we have that $P(H) = int_{0.4}^{0.6} x frac{1}{0.6-0.4}(x) dx=frac{1}{2}$.
Now we want to do a Bayes update given the data on the coin tosses.
If we denote by $B(n, h, p)$ the mass distribution of a binomial, where $n$ is the number of coin tosses, $h$ the number of heads and $p$ the coin bias, then:
$$
f(theta = x|Data) = pi_{theta}(x)frac{P(Data|theta = x)}{P(Data)}= pi_{theta}(x)frac{B(50,29, x)}{int_{0.4}^{0.6}B(50,29, y)pi_theta(y)dy}=
frac{1}{0.6-0.4}frac{{50 choose 29} x^{29} (1-x)^{21}}{int_{0.4}^{0.6}{50 choose 29} y^{29} (1-y)^{21} frac{1}{0.6-0.4}dy}=
frac{ x^{29} (1-x)^{21}}{int_{0.4}^{0.6} y^{29} (1-y)^{21}dy}
$$
Thus the result is a beta distribution with a rather hideous denominator.
answered Oct 23 '16 at 13:13
JsevillamolJsevillamol
3,03811124
3,03811124
add a comment |
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%2f1969001%2fthe-probability-of-heads-of-a-random-coin-is-uniform-r-v-p-find-the-probabilit%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
2
$begingroup$
Your random variable $P$ has a uniform distribution over $[.4, .6]$, and so $P[.4 leq Pleq .6]=1$. The PDF of $P$ is $f_P(p) = frac{1}{.2}$ for $p in [.4, .6]$ (and 0 else). Note that phrases "probability of $p$" and "probability of $P$" do not make sense, since probabilities are defined on events ("Probability that $P > .5$" is something that makes sense). You likely are supposed to compute the conditional PDF of $P$: $$f_{P|Data}(p|Data=(21,29))=frac{P[Data=(21,29)|P=p]f_P(p)}{P[Data=(21,29)]}$$ and compute $P[Data=(21,29)]$ by conditioning on $P=p$ via the law of total probability.
$endgroup$
– Michael
Oct 17 '16 at 3:02
2
$begingroup$
PS: I do not know what "H" or "A" mean in your question.
$endgroup$
– Michael
Oct 17 '16 at 3:07