How can I get the probability given the Bayesian table?












0












$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!










share|cite|improve this question











$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


















0












$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!










share|cite|improve this question











$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
















0












0








0





$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!










share|cite|improve this question











$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






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








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




















  • $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












1 Answer
1






active

oldest

votes


















1












$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}$$






share|cite|improve this answer









$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














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
});


}
});














draft saved

draft discarded


















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









1












$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}$$






share|cite|improve this answer









$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


















1












$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}$$






share|cite|improve this answer









$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
















1












1








1





$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}$$






share|cite|improve this answer









$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}$$







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










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




















  • $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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅