{
  localUrl: '../page/bayes_rule_definition.html',
  arbitalUrl: 'https://arbital.com/p/bayes_rule_definition',
  rawJsonUrl: '../raw/553.json',
  likeableId: '2962',
  likeableType: 'page',
  myLikeValue: '0',
  likeCount: '5',
  dislikeCount: '0',
  likeScore: '5',
  individualLikes: [
    'EricBruylant',
    'NateSoares',
    'AndreiAlexandru',
    'MichaelKillinger',
    'JOSEPHCASSILLY'
  ],
  pageId: 'bayes_rule_definition',
  edit: '14',
  editSummary: '',
  prevEdit: '13',
  currentEdit: '14',
  wasPublished: 'true',
  type: 'wiki',
  title: 'Bayes' rule: Definition',
  clickbait: '',
  textLength: '6036',
  alias: 'bayes_rule_definition',
  externalUrl: '',
  sortChildrenBy: 'likes',
  hasVote: 'false',
  voteType: '',
  votesAnonymous: 'false',
  editCreatorId: 'EliezerYudkowsky',
  editCreatedAt: '2016-10-04 06:14:07',
  pageCreatorId: 'NateSoares',
  pageCreatedAt: '2016-07-06 07:08:31',
  seeDomainId: '0',
  editDomainId: 'AlexeiAndreev',
  submitToDomainId: '0',
  isAutosave: 'false',
  isSnapshot: 'false',
  isLiveEdit: 'true',
  isMinorEdit: 'false',
  indirectTeacher: 'false',
  todoCount: '0',
  isEditorComment: 'false',
  isApprovedComment: 'true',
  isResolved: 'false',
  snapshotText: '',
  anchorContext: '',
  anchorText: '',
  anchorOffset: '0',
  mergedInto: '',
  isDeleted: 'false',
  viewCount: '3128',
  text: 'Bayes' rule is the mathematics of [1rf probability theory] governing how to update your beliefs in the light of new evidence.\n\n[toc:]\n\n## [1y9 Notation]\n\nIn much of what follows, we'll use the following [1y9 notation]:\n\n- Let the hypotheses being considered be $H_1$ and $H_2$.\n- Let the evidence observed be $e_0.$\n- Let $\\mathbb P(H_i)$ denote the [1rm prior probability] of $H_i$ before observing the evidence.\n- Let the [1rj conditional probability] $\\mathbb P(e_0\\mid H_i)$ denote the [1rq likelihood] of observing evidence $e_0$ assuming $H_i$ to be true.\n- Let the [1rj conditional probability] $\\mathbb P(H_i\\mid e_0)$ denote the [1rp posterior probability] of $H_i$ after observing $e_0.$\n\n## [1x5 Odds]/[1zm proportional] form\n\nBayes' rule in the [1x5 odds form] or [1zm proportional form] states:\n\n$$\\dfrac{\\mathbb P(H_1)}{\\mathbb P(H_2)} \\times \\dfrac{\\mathbb P(e_0\\mid H_1)}{\\mathbb P(e_0\\mid H_2)} = \\dfrac{\\mathbb P(H_1\\mid e_0)}{\\mathbb P(H_2\\mid e_0)}$$\n\nIn other words, the [1rm prior] [1rb odds] times the [1rq likelihood ratio] yield the [1rp posterior] odds.  [1rk Normalizing] these odds will then yield the posterior probabilities.\n\nIn [1zm other other words]:  If you initially think $h_i$ is $\\alpha$ times as probable as $h_k$, and then see evidence that you're $\\beta$ times as likely to see if $h_i$ is true as if $h_k$ is true, you should update to thinking that $h_i$ is $\\alpha \\cdot \\beta$ times as probable as $h_k.$\n\nSuppose that Professor Plum and Miss Scarlet are two suspects in a murder, and that we start out thinking that Professor Plum is twice as likely to have committed the murder as Miss Scarlet ([1rm prior] [1rb odds] of 2 : 1).  We then discover that the victim was poisoned.  We think that Professor Plum is around one-fourth as likely to use poison as Miss Scarlet ([1rq likelihood ratio] of 1 : 4).  Then after observing the victim was poisoned, we should think Plum is around half as likely to have committed the murder as Scarlet: $2 \\times \\dfrac{1}{4} = \\dfrac{1}{2}.$  This reflects [1rp posterior] odds of 1 : 2, or a posterior probability of 1/3, that Professor Plum did the deed.\n\n## [1xr Proof]\n\nThe [1xr proof of Bayes' rule] is by the definition of [1rj conditional probability] $\\mathbb P(X\\wedge Y) = \\mathbb P(X\\mid Y) \\cdot \\mathbb P(Y):$\n\n$$\n\\dfrac{\\mathbb P(H_i)}{\\mathbb P(H_j)} \\times  \\dfrac{\\mathbb P(e\\mid H_i)}{\\mathbb P(e\\mid H_j)}\n= \\dfrac{\\mathbb P(e \\wedge H_i)}{\\mathbb P(e \\wedge H_j)}\n= \\dfrac{\\mathbb P(e \\wedge H_i) / \\mathbb P(e)}{\\mathbb P(e \\wedge H_j) / \\mathbb P(e)}\n= \\dfrac{\\mathbb P(H_i\\mid e)}{\\mathbb P(H_j\\mid e)}\n$$\n\n## [1zh Log odds form]\n\nThe [1zh log odds form of Bayes' rule] states:\n\n$$\\log \\left ( \\dfrac\n   {\\mathbb P(H_i)}\n   {\\mathbb P(H_j)}\n\\right )\n+\n\\log \\left ( \\dfrac\n   {\\mathbb P(e\\mid H_i)}\n   {\\mathbb P(e\\mid H_j)}\n\\right ) \n =\n\\log \\left ( \\dfrac\n   {\\mathbb P(H_i\\mid e)}\n   {\\mathbb P(H_j\\mid e)}\n\\right )\n$$\n\nE.g.:  "A study of Chinese blood donors found that roughly 1 in 100,000 of them had HIV (as determined by a very reliable gold-standard test). The non-gold-standard test used for initial screening had a sensitivity of 99.7% and a specificity of 99.8%, meaning that it was 500 times as likely to return positive for infected as non-infected patients."  Then our prior belief is -5 orders of magnitude against HIV, and if we then observe a positive test result, this is evidence of strength +2.7 orders of magnitude for HIV.  Our posterior belief is -2.3 orders of magnitude, or odds of less than 1 to a 100, against HIV.\n\nIn log odds form, the same [22x strength of evidence] (log [1rq likelihood ratio]) always [1zh moves us the same additive distance] along a line representing strength of belief (also in log odds).  If we measured distance in probabilities, then the same 2 : 1 likelihood ratio might move us a different distance along the probability line depending on whether we started with prior 10% probability or 50% probability.\n\n## Visualizations\n\nGraphical of visualizing Bayes' rule include [1wy frequency diagrams, the waterfall visualization], the [1zm spotlight visualization], the [1zh magnet visualization], and the [1xr Venn diagram for the proof].\n\n## Examples\n\nExamples of Bayes' rule may be found [1wt here].\n\n## [1zg Multiple hypotheses and updates]\n\nThe [1x5 odds form of Bayes' rule] works for odds ratios between more than two hypotheses, and applying multiple pieces of evidence.  Suppose there's a bathtub full of coins.  1/2 of the coins are "fair" and have a 50% probability of producing heads on each coinflip; 1/3 of the coins produce 25% heads; and 1/6 produce 75% heads.  You pull out a coin at random, flip it 3 times, and get the result HTH.  You may legitimately calculate:\n\n$$\\begin{array}{rll}\n(1/2 : 1/3 : 1/6) \\cong & (3 : 2 : 1) & \\\\\n\\times & (2 : 1 : 3) & \\\\\n\\times & (2 : 3 : 1) & \\\\\n\\times & (2 : 1 : 3) & \\\\\n= & (24 : 6 : 9) & \\cong (8 : 2 : 3)\n\\end{array}$$\n\nSince multiple pieces of evidence may not be [conditional_independence conditionally independent] from one another, it is important to be aware of the [naive_bayes_assumption Naive Bayes assumption] and whether you are making it.\n\n## [554 Probability form]\n\nAs a formula for a single probability $\\mathbb P(H_i\\mid e),$ Bayes' rule states:\n\n$$\\mathbb P(H_i\\mid e) = \\dfrac{\\mathbb P(e\\mid H_i) \\cdot \\mathbb P(H_i)}{\\sum_k \\mathbb P(e\\mid H_k) \\cdot \\mathbb P(H_k)}$$\n\n## [1zj Functional form]\n\nIn [1zj functional form], Bayes' rule states:\n\n$$\\mathbb P(\\mathbf{H}\\mid e) \\propto \\mathbb P(e\\mid \\mathbf{H}) \\cdot \\mathbb P(\\mathbf{H}).$$\n\nThe posterior probability function over hypotheses given the evidence, is *proportional* to the likelihood function from the evidence to those hypotheses, times the prior probability function over those hypotheses.\n\nSince posterior probabilities over [1rd mutually exclusive and exhaustive] possibilities must sum to $1,$ [1rk normalizing] the product of the likelihood function and prior probability function will yield the exact posterior probability function.\n',
  metaText: '',
  isTextLoaded: 'true',
  isSubscribedToDiscussion: 'false',
  isSubscribedToUser: 'false',
  isSubscribedAsMaintainer: 'false',
  discussionSubscriberCount: '2',
  maintainerCount: '2',
  userSubscriberCount: '0',
  lastVisit: '',
  hasDraft: 'false',
  votes: [],
  voteSummary: 'null',
  muVoteSummary: '0',
  voteScaling: '0',
  currentUserVote: '-2',
  voteCount: '0',
  lockedVoteType: '',
  maxEditEver: '0',
  redLinkCount: '0',
  lockedBy: '',
  lockedUntil: '',
  nextPageId: '',
  prevPageId: '',
  usedAsMastery: 'false',
  proposalEditNum: '0',
  permissions: {
    edit: {
      has: 'false',
      reason: 'You don't have domain permission to edit this page'
    },
    proposeEdit: {
      has: 'true',
      reason: ''
    },
    delete: {
      has: 'false',
      reason: 'You don't have domain permission to delete this page'
    },
    comment: {
      has: 'false',
      reason: 'You can't comment in this domain because you are not a member'
    },
    proposeComment: {
      has: 'true',
      reason: ''
    }
  },
  summaries: {},
  creatorIds: [
    'NateSoares',
    'AlexeiAndreev',
    'EliezerYudkowsky',
    'EricBruylant'
  ],
  childIds: [],
  parentIds: [
    'bayes_rule'
  ],
  commentIds: [
    '56g',
    '56h'
  ],
  questionIds: [],
  tagIds: [
    'c_class_meta_tag'
  ],
  relatedIds: [],
  markIds: [],
  explanations: [],
  learnMore: [],
  requirements: [],
  subjects: [],
  lenses: [],
  lensParentId: 'bayes_rule',
  pathPages: [],
  learnMoreTaughtMap: {},
  learnMoreCoveredMap: {},
  learnMoreRequiredMap: {},
  editHistory: {},
  domainSubmissions: {},
  answers: [],
  answerCount: '0',
  commentCount: '0',
  newCommentCount: '0',
  linkedMarkCount: '0',
  changeLogs: [
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '19840',
      pageId: 'bayes_rule_definition',
      userId: 'EliezerYudkowsky',
      edit: '14',
      type: 'newEdit',
      createdAt: '2016-10-04 06:14:08',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '19635',
      pageId: 'bayes_rule_definition',
      userId: 'EliezerYudkowsky',
      edit: '13',
      type: 'newEdit',
      createdAt: '2016-09-15 22:34:25',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '19634',
      pageId: 'bayes_rule_definition',
      userId: 'EliezerYudkowsky',
      edit: '0',
      type: 'newAlias',
      createdAt: '2016-09-15 22:34:24',
      auxPageId: '',
      oldSettingsValue: 'bayes_rule_explore',
      newSettingsValue: 'bayes_rule_definition'
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18705',
      pageId: 'bayes_rule_definition',
      userId: 'AlexeiAndreev',
      edit: '12',
      type: 'newEdit',
      createdAt: '2016-08-12 23:29:54',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18447',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '10',
      type: 'newEdit',
      createdAt: '2016-08-05 19:56:43',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18409',
      pageId: 'bayes_rule_definition',
      userId: 'AlexeiAndreev',
      edit: '9',
      type: 'newEdit',
      createdAt: '2016-08-05 00:02:39',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18280',
      pageId: 'bayes_rule_definition',
      userId: 'AlexeiAndreev',
      edit: '8',
      type: 'newEdit',
      createdAt: '2016-08-03 21:55:08',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18209',
      pageId: 'bayes_rule_definition',
      userId: 'EricBruylant',
      edit: '6',
      type: 'newEdit',
      createdAt: '2016-08-03 15:34:00',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: 'added link and removed hanging ]'
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '18170',
      pageId: 'bayes_rule_definition',
      userId: 'EricBruylant',
      edit: '0',
      type: 'newTag',
      createdAt: '2016-08-02 17:47:14',
      auxPageId: 'c_class_meta_tag',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '16232',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '5',
      type: 'newEdit',
      createdAt: '2016-07-08 16:01:05',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '16231',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '4',
      type: 'newEdit',
      createdAt: '2016-07-08 15:59:58',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '15921',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '3',
      type: 'newEdit',
      createdAt: '2016-07-07 04:56:49',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '15694',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '2',
      type: 'newEdit',
      createdAt: '2016-07-06 15:05:34',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '15635',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '0',
      type: 'newParent',
      createdAt: '2016-07-06 07:08:32',
      auxPageId: 'bayes_rule',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '15633',
      pageId: 'bayes_rule_definition',
      userId: 'NateSoares',
      edit: '1',
      type: 'newEdit',
      createdAt: '2016-07-06 07:08:31',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    }
  ],
  feedSubmissions: [],
  searchStrings: {},
  hasChildren: 'false',
  hasParents: 'true',
  redAliases: {},
  improvementTagIds: [],
  nonMetaTagIds: [],
  todos: [],
  slowDownMap: 'null',
  speedUpMap: 'null',
  arcPageIds: 'null',
  contentRequests: {
    improveStub: {
      likeableId: '3682',
      likeableType: 'contentRequest',
      myLikeValue: '0',
      likeCount: '2',
      dislikeCount: '0',
      likeScore: '2',
      individualLikes: [],
      id: '137',
      pageId: 'bayes_rule_definition',
      requestType: 'improveStub',
      createdAt: '2016-11-02 11:20:45'
    }
  }
}