Bayes' theorem : lie-detector machine
$begingroup$
Assuming there is lie-detector which can find out 95% of all lies correctly and of all true statements classifies 98% as true. Now we know that only one person would lie among 300. If the detector says a person is lying, what is the probability that this person is lying?
Assuming that X = {person is lying}, D = {detector finds a lie}, then we need to know p(X|D) given that p(X) = 1/300. Now I'm stuck with the meaning of 95% and 98%, is p(D|X) = 0.95*0.98?
probability bayes-theorem
$endgroup$
add a comment |
$begingroup$
Assuming there is lie-detector which can find out 95% of all lies correctly and of all true statements classifies 98% as true. Now we know that only one person would lie among 300. If the detector says a person is lying, what is the probability that this person is lying?
Assuming that X = {person is lying}, D = {detector finds a lie}, then we need to know p(X|D) given that p(X) = 1/300. Now I'm stuck with the meaning of 95% and 98%, is p(D|X) = 0.95*0.98?
probability bayes-theorem
$endgroup$
$begingroup$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10
add a comment |
$begingroup$
Assuming there is lie-detector which can find out 95% of all lies correctly and of all true statements classifies 98% as true. Now we know that only one person would lie among 300. If the detector says a person is lying, what is the probability that this person is lying?
Assuming that X = {person is lying}, D = {detector finds a lie}, then we need to know p(X|D) given that p(X) = 1/300. Now I'm stuck with the meaning of 95% and 98%, is p(D|X) = 0.95*0.98?
probability bayes-theorem
$endgroup$
Assuming there is lie-detector which can find out 95% of all lies correctly and of all true statements classifies 98% as true. Now we know that only one person would lie among 300. If the detector says a person is lying, what is the probability that this person is lying?
Assuming that X = {person is lying}, D = {detector finds a lie}, then we need to know p(X|D) given that p(X) = 1/300. Now I'm stuck with the meaning of 95% and 98%, is p(D|X) = 0.95*0.98?
probability bayes-theorem
probability bayes-theorem
edited Jan 18 at 21:41
Gil Beckers
156
156
asked Jan 18 at 18:20


Jiayan YangJiayan Yang
1
1
$begingroup$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10
add a comment |
$begingroup$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10
$begingroup$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Using your notation for events, $X$ and $D$ represent the events that a person is lying, and a lie is detected, respectively. let $bar X$ and $bar D$ represent the complementary events; namely, a person tells the truth, and a lie is not detected, respectively.
We are given $$Pr[D mid X] = 0.95, quad Pr[bar D mid bar X] = 0.98, quad Pr[X] = frac{1}{300}.$$ We want to compute $Pr[X mid D]$, the conditional probability that, given the detector indicates a lie, that the person actually lied. Bayes' rule gives
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D]},$$ the numerator of which is already known. The denominator, the unconditional probability of a lie being detected, is found by an application of the law of total probability:
$$Pr[D] = Pr[D mid X]Pr[X] + Pr[D mid bar X]Pr[bar X].$$
The first term is the same as the numerator. The second term is computed by noting $$Pr[bar X] = 1 - Pr[X], \ Pr[D mid bar X] = 1 - Pr[bar D mid bar X].$$ Therefore, in terms of the given probabilities, we have
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D mid X]Pr[X] + (1 - Pr[bar D mid bar X])(1 - Pr[X])}.$$
$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%2f3078593%2fbayes-theorem-lie-detector-machine%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$
Using your notation for events, $X$ and $D$ represent the events that a person is lying, and a lie is detected, respectively. let $bar X$ and $bar D$ represent the complementary events; namely, a person tells the truth, and a lie is not detected, respectively.
We are given $$Pr[D mid X] = 0.95, quad Pr[bar D mid bar X] = 0.98, quad Pr[X] = frac{1}{300}.$$ We want to compute $Pr[X mid D]$, the conditional probability that, given the detector indicates a lie, that the person actually lied. Bayes' rule gives
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D]},$$ the numerator of which is already known. The denominator, the unconditional probability of a lie being detected, is found by an application of the law of total probability:
$$Pr[D] = Pr[D mid X]Pr[X] + Pr[D mid bar X]Pr[bar X].$$
The first term is the same as the numerator. The second term is computed by noting $$Pr[bar X] = 1 - Pr[X], \ Pr[D mid bar X] = 1 - Pr[bar D mid bar X].$$ Therefore, in terms of the given probabilities, we have
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D mid X]Pr[X] + (1 - Pr[bar D mid bar X])(1 - Pr[X])}.$$
$endgroup$
add a comment |
$begingroup$
Using your notation for events, $X$ and $D$ represent the events that a person is lying, and a lie is detected, respectively. let $bar X$ and $bar D$ represent the complementary events; namely, a person tells the truth, and a lie is not detected, respectively.
We are given $$Pr[D mid X] = 0.95, quad Pr[bar D mid bar X] = 0.98, quad Pr[X] = frac{1}{300}.$$ We want to compute $Pr[X mid D]$, the conditional probability that, given the detector indicates a lie, that the person actually lied. Bayes' rule gives
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D]},$$ the numerator of which is already known. The denominator, the unconditional probability of a lie being detected, is found by an application of the law of total probability:
$$Pr[D] = Pr[D mid X]Pr[X] + Pr[D mid bar X]Pr[bar X].$$
The first term is the same as the numerator. The second term is computed by noting $$Pr[bar X] = 1 - Pr[X], \ Pr[D mid bar X] = 1 - Pr[bar D mid bar X].$$ Therefore, in terms of the given probabilities, we have
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D mid X]Pr[X] + (1 - Pr[bar D mid bar X])(1 - Pr[X])}.$$
$endgroup$
add a comment |
$begingroup$
Using your notation for events, $X$ and $D$ represent the events that a person is lying, and a lie is detected, respectively. let $bar X$ and $bar D$ represent the complementary events; namely, a person tells the truth, and a lie is not detected, respectively.
We are given $$Pr[D mid X] = 0.95, quad Pr[bar D mid bar X] = 0.98, quad Pr[X] = frac{1}{300}.$$ We want to compute $Pr[X mid D]$, the conditional probability that, given the detector indicates a lie, that the person actually lied. Bayes' rule gives
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D]},$$ the numerator of which is already known. The denominator, the unconditional probability of a lie being detected, is found by an application of the law of total probability:
$$Pr[D] = Pr[D mid X]Pr[X] + Pr[D mid bar X]Pr[bar X].$$
The first term is the same as the numerator. The second term is computed by noting $$Pr[bar X] = 1 - Pr[X], \ Pr[D mid bar X] = 1 - Pr[bar D mid bar X].$$ Therefore, in terms of the given probabilities, we have
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D mid X]Pr[X] + (1 - Pr[bar D mid bar X])(1 - Pr[X])}.$$
$endgroup$
Using your notation for events, $X$ and $D$ represent the events that a person is lying, and a lie is detected, respectively. let $bar X$ and $bar D$ represent the complementary events; namely, a person tells the truth, and a lie is not detected, respectively.
We are given $$Pr[D mid X] = 0.95, quad Pr[bar D mid bar X] = 0.98, quad Pr[X] = frac{1}{300}.$$ We want to compute $Pr[X mid D]$, the conditional probability that, given the detector indicates a lie, that the person actually lied. Bayes' rule gives
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D]},$$ the numerator of which is already known. The denominator, the unconditional probability of a lie being detected, is found by an application of the law of total probability:
$$Pr[D] = Pr[D mid X]Pr[X] + Pr[D mid bar X]Pr[bar X].$$
The first term is the same as the numerator. The second term is computed by noting $$Pr[bar X] = 1 - Pr[X], \ Pr[D mid bar X] = 1 - Pr[bar D mid bar X].$$ Therefore, in terms of the given probabilities, we have
$$Pr[X mid D] = frac{Pr[D mid X]Pr[X]}{Pr[D mid X]Pr[X] + (1 - Pr[bar D mid bar X])(1 - Pr[X])}.$$
answered Jan 18 at 23:11


heropupheropup
64k762102
64k762102
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%2f3078593%2fbayes-theorem-lie-detector-machine%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$
$P(D|X)=0.95$ and $P(neg D|neg X)=0.98$
$endgroup$
– John Douma
Jan 18 at 18:25
$begingroup$
@John Douma Can you help check if my thinking is right or not ? $$ p(X|D) = p(X,D)/p(D) = frac{p(D|X)p(X)}{p(D|X)p(X)+p(D|bar{X})p(bar{X}) = (0.95*1/300)/(0.95*1/300+ 0.02*299/300)= ..$$
$endgroup$
– Jiayan Yang
Jan 18 at 18:55
$begingroup$
@JiayanYang Yes, that is exactly correct
$endgroup$
– Bram28
Jan 18 at 19:11
$begingroup$
Yes, it looks good. Thanks @Bram28.
$endgroup$
– John Douma
Jan 18 at 21:10