How can I get the probability given the Bayesian table?
$begingroup$
Consider that $A rightarrow B$. And A has two states 0 and 1 respectively with probability of $0.6$ and $0.4$.
$$
mbox{And for} B:
left{begin{array}{rcl}
{displaystyle Prleft(B = 1 mid A = 1right)} & {displaystyle =} & {displaystyle 0.3}
\[1mm]
{displaystyle Prleft(B = 1 mid A = 0right)} & {displaystyle =} & {displaystyle 0.2}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 1right)} & {displaystyle =} & {displaystyle 0.7}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 0right)} & {displaystyle =} & {displaystyle 0.8}
end{array}right.
$$
What I want to get is $Pr(B=1)$, and I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$. But my question is how can I get the result provided the two tables?
My reduction:
$$
begin{align}
Pr(B=1) &= frac{Pr(B=1|A)}{Pr(B=1|A) + Pr(B=0|A)}\
& = frac{frac{Pr(B=1,A)}{Pr(A)}}{frac{Pr(B=1,A)}{Pr(A)}+frac{Pr(B=0,A)}{Pr(A)}} \
& = frac{Pr(B=1, A=0) + Pr(B=1, A=1)}{Pr(B=1, A=0) + Pr(B=1, A=1) + Pr(B=0, A=0) + Pr(B=0, A=1)}
end{align}
$$
Am I right?
Any hints or suggestions would be highly appreciated. Thank you!
bayesian bayes-theorem
$endgroup$
add a comment |
$begingroup$
Consider that $A rightarrow B$. And A has two states 0 and 1 respectively with probability of $0.6$ and $0.4$.
$$
mbox{And for} B:
left{begin{array}{rcl}
{displaystyle Prleft(B = 1 mid A = 1right)} & {displaystyle =} & {displaystyle 0.3}
\[1mm]
{displaystyle Prleft(B = 1 mid A = 0right)} & {displaystyle =} & {displaystyle 0.2}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 1right)} & {displaystyle =} & {displaystyle 0.7}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 0right)} & {displaystyle =} & {displaystyle 0.8}
end{array}right.
$$
What I want to get is $Pr(B=1)$, and I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$. But my question is how can I get the result provided the two tables?
My reduction:
$$
begin{align}
Pr(B=1) &= frac{Pr(B=1|A)}{Pr(B=1|A) + Pr(B=0|A)}\
& = frac{frac{Pr(B=1,A)}{Pr(A)}}{frac{Pr(B=1,A)}{Pr(A)}+frac{Pr(B=0,A)}{Pr(A)}} \
& = frac{Pr(B=1, A=0) + Pr(B=1, A=1)}{Pr(B=1, A=0) + Pr(B=1, A=1) + Pr(B=0, A=0) + Pr(B=0, A=1)}
end{align}
$$
Am I right?
Any hints or suggestions would be highly appreciated. Thank you!
bayesian bayes-theorem
$endgroup$
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50
add a comment |
$begingroup$
Consider that $A rightarrow B$. And A has two states 0 and 1 respectively with probability of $0.6$ and $0.4$.
$$
mbox{And for} B:
left{begin{array}{rcl}
{displaystyle Prleft(B = 1 mid A = 1right)} & {displaystyle =} & {displaystyle 0.3}
\[1mm]
{displaystyle Prleft(B = 1 mid A = 0right)} & {displaystyle =} & {displaystyle 0.2}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 1right)} & {displaystyle =} & {displaystyle 0.7}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 0right)} & {displaystyle =} & {displaystyle 0.8}
end{array}right.
$$
What I want to get is $Pr(B=1)$, and I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$. But my question is how can I get the result provided the two tables?
My reduction:
$$
begin{align}
Pr(B=1) &= frac{Pr(B=1|A)}{Pr(B=1|A) + Pr(B=0|A)}\
& = frac{frac{Pr(B=1,A)}{Pr(A)}}{frac{Pr(B=1,A)}{Pr(A)}+frac{Pr(B=0,A)}{Pr(A)}} \
& = frac{Pr(B=1, A=0) + Pr(B=1, A=1)}{Pr(B=1, A=0) + Pr(B=1, A=1) + Pr(B=0, A=0) + Pr(B=0, A=1)}
end{align}
$$
Am I right?
Any hints or suggestions would be highly appreciated. Thank you!
bayesian bayes-theorem
$endgroup$
Consider that $A rightarrow B$. And A has two states 0 and 1 respectively with probability of $0.6$ and $0.4$.
$$
mbox{And for} B:
left{begin{array}{rcl}
{displaystyle Prleft(B = 1 mid A = 1right)} & {displaystyle =} & {displaystyle 0.3}
\[1mm]
{displaystyle Prleft(B = 1 mid A = 0right)} & {displaystyle =} & {displaystyle 0.2}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 1right)} & {displaystyle =} & {displaystyle 0.7}
\[1mm]
{displaystyle Prleft(B = 0 mid A = 0right)} & {displaystyle =} & {displaystyle 0.8}
end{array}right.
$$
What I want to get is $Pr(B=1)$, and I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$. But my question is how can I get the result provided the two tables?
My reduction:
$$
begin{align}
Pr(B=1) &= frac{Pr(B=1|A)}{Pr(B=1|A) + Pr(B=0|A)}\
& = frac{frac{Pr(B=1,A)}{Pr(A)}}{frac{Pr(B=1,A)}{Pr(A)}+frac{Pr(B=0,A)}{Pr(A)}} \
& = frac{Pr(B=1, A=0) + Pr(B=1, A=1)}{Pr(B=1, A=0) + Pr(B=1, A=1) + Pr(B=0, A=0) + Pr(B=0, A=1)}
end{align}
$$
Am I right?
Any hints or suggestions would be highly appreciated. Thank you!
bayesian bayes-theorem
bayesian bayes-theorem
edited Jan 15 at 15:55
Felix Marin
68.8k7109146
68.8k7109146
asked Jan 15 at 13:49
Lerner ZhangLerner Zhang
314218
314218
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50
add a comment |
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$
It is not right and it must be:
$$begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\
=&P(A=0)cdot P(B=1|A=0)+P(A=1)cdot P(B=1|A=1)=\
=&0.6cdot 0.2+0.4cdot 0.3=\
=&0.24.end{align}$$
$endgroup$
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
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%2f3074449%2fhow-can-i-get-the-probability-given-the-bayesian-table%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$
I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$
It is not right and it must be:
$$begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\
=&P(A=0)cdot P(B=1|A=0)+P(A=1)cdot P(B=1|A=1)=\
=&0.6cdot 0.2+0.4cdot 0.3=\
=&0.24.end{align}$$
$endgroup$
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
add a comment |
$begingroup$
I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$
It is not right and it must be:
$$begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\
=&P(A=0)cdot P(B=1|A=0)+P(A=1)cdot P(B=1|A=1)=\
=&0.6cdot 0.2+0.4cdot 0.3=\
=&0.24.end{align}$$
$endgroup$
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
add a comment |
$begingroup$
I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$
It is not right and it must be:
$$begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\
=&P(A=0)cdot P(B=1|A=0)+P(A=1)cdot P(B=1|A=1)=\
=&0.6cdot 0.2+0.4cdot 0.3=\
=&0.24.end{align}$$
$endgroup$
I know the result is $frac{0.3+0.2}{0.3+0.2+0.7+0.8}$
It is not right and it must be:
$$begin{align}P(B=1)=&P(B=1,A=0)+P(B=1,A=1)=\
=&P(A=0)cdot P(B=1|A=0)+P(A=1)cdot P(B=1|A=1)=\
=&0.6cdot 0.2+0.4cdot 0.3=\
=&0.24.end{align}$$
answered Jan 15 at 15:46
farruhotafarruhota
21.7k2842
21.7k2842
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
add a comment |
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
Amazing! Great!
$endgroup$
– Lerner Zhang
Jan 15 at 22:53
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
$begingroup$
You are right. I have read the textbook and find this: The joint distribution of two random variables has to be consistent with the marginal distribution, in that $P(x)=sum_y P(x, y)$. It seems very intuitive. What I was thinking was totally of non-sense. I was just applying the equations mechanically and unfortunately wrongly.
$endgroup$
– Lerner Zhang
Jan 17 at 6:43
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%2f3074449%2fhow-can-i-get-the-probability-given-the-bayesian-table%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
$begingroup$
$Pr(B = 1) = frac{Pr(B=1}{sumlimits_{i=0}^{1}Pr(B = i)}$. Its essentially the "area" of $B = 1$ divided by the entire "area". Note that you need to take into account both cases $A = 0$ and $A = 1$ when computing $Pr(B = i)$
$endgroup$
– David
Jan 15 at 13:50