{
  localUrl: '../page/496.html',
  arbitalUrl: 'https://arbital.com/p/496',
  rawJsonUrl: '../raw/496.json',
  likeableId: '2716',
  likeableType: 'page',
  myLikeValue: '0',
  likeCount: '3',
  dislikeCount: '0',
  likeScore: '3',
  individualLikes: [
    'EricBruylant',
    'JaimeSevillaMolina',
    'MarkChimes'
  ],
  pageId: '496',
  edit: '18',
  editSummary: '',
  prevEdit: '17',
  currentEdit: '18',
  wasPublished: 'true',
  type: 'wiki',
  title: 'Square visualization of probabilities on two events',
  clickbait: '',
  textLength: '7392',
  alias: '496',
  externalUrl: '',
  sortChildrenBy: 'likes',
  hasVote: 'false',
  voteType: '',
  votesAnonymous: 'false',
  editCreatorId: 'TsviBT',
  editCreatedAt: '2016-06-19 10:37:06',
  pageCreatorId: 'TsviBT',
  pageCreatedAt: '2016-06-15 07:09:20',
  seeDomainId: '0',
  editDomainId: 'AlexeiAndreev',
  submitToDomainId: '0',
  isAutosave: 'false',
  isSnapshot: 'false',
  isLiveEdit: 'true',
  isMinorEdit: 'false',
  indirectTeacher: 'false',
  todoCount: '1',
  isEditorComment: 'false',
  isApprovedComment: 'true',
  isResolved: 'false',
  snapshotText: '',
  anchorContext: '',
  anchorText: '',
  anchorOffset: '0',
  mergedInto: '',
  isDeleted: 'false',
  viewCount: '83',
  text: '$$\n\\newcommand{\\true}{\\text{True}}\n\\newcommand{\\false}{\\text{False}}\n\\newcommand{\\bP}{\\mathbb{P}}\n$$\n\n\n[summary: \n$$\n\\newcommand{\\true}{\\text{True}}\n\\newcommand{\\false}{\\text{False}}\n\\newcommand{\\bP}{\\mathbb{P}}\n$$\n\nWe can represent a [joint_probability_distribution_on_event probability distribution] $\\bP(A,B)$ over  two [event_probability events] $A$ and $B$ as a square:\n\n<img src="http://i.imgur.com/A4ikuJh.png" width="220" height="220">\n\nWe could also represent $\\bP$ by [factoring_probability factoring], so using $\\bP(A,B) = \\bP(A)\\; \\bP(B \\mid A)$ we'd make this picture:\n\n<img src="http://i.imgur.com/6ZHSR0l.png" width="403" height="249">\n]\n\n\nSay we have two [event_probability events], $A$ and $B$, and a [joint_probability_distribution_on_event probability distribution] $\\bP$ over whether or not they happen. We can represent $\\bP$ as a square:\n\n<img src="http://i.imgur.com/A4ikuJh.png" width="280" height="280">\n\nSo for example, the [1rh probability] $\\bP(A,B)$ of both $A$ and $B$ occurring is the ratio of \\[the area of the dark red region\\] to \\[the area of the entire square\\]:\n\n<img src="http://i.imgur.com/QaVKTX4.png" width="234" height="169">\n\n\nVisualizing probabilities in a square is neat because we can draw simple pictures that highlight interesting facts about our probability distribution.\n\nBelow are some pictures illustrating:\n\n* [4cf independent events] (What happens if the columns and the rows in our square *both* line up?)\n\n* [marginal_probability marginal probabilities] (If we're looking at a square of probabilities, where's the probability $\\bP(A)$ of $A$ or the probability $\\bP(\\neg B)$?)\n\n* [1rj conditional probabilities] (Can we find in the square the probability $\\bP(B \\mid A)$ of $B$ if we condition on seeing $A$? What about the conditional probability $\\bP(A \\mid B)$?)\n\n* [factoring_probability factoring a distribution] (Can we always write $\\bP$ as a square? Why do the columns line up but not the rows?)\n\n* the process of computing [1rh joint probabilities] from [factoring_probability factored probabilities]\n\nIndependent events\n===\n\nHere's a picture of the joint distribution of [4cf two independent events] $A$ and $B$:\n\n<img src="http://i.imgur.com/0off1db.png" width="390" height="338">\n\nNow the rows for $\\bP(B)$ and  $\\bP(\\neg B)$ line up across the two columns. This is because $\\bP(B \\mid A) = \\bP(B) = \\bP(B \\mid \\neg A)$. When $A$ and $B$ are independent, updating on $A$ or $\\neg A$ doesn't change the probability of $B$.\n\nFor more on this visualization of independent events, see the aptly named [4cl].\n\nMarginal probabilities\n===\n\nWe can see the [marginal_probability marginal probabilities] of $A$ and $B$ by looking at some of the blocks in our square. For example, to find the probability $\\bP(\\neg A)$ that $A$ doesn't occur, we just need to add up all the blocks where $\\neg A$ happens: $\\bP(\\neg A) = \\bP(\\neg A, B) + \\bP(\\neg A, \\neg B)$. \n\nHere's the probability $\\bP(A)$ of $A$, and the probability $\\bP(\\neg A)$ of $\\neg A$:\n\n<img src="http://i.imgur.com/0STax7m.png" width="425" height="192">\n\nHere's the probability $\\bP(\\neg B)$ of $\\neg B$:\n\n<img src="http://i.imgur.com/uNGdze2.png" width="234" height="169">\n\nIn these pictures we're dividing by the area of the whole square. Since the probability of anything at all happening is 1, we could just leave it out, but it'll be helpful for comparison while we think about conditionals next.\n\n\n\nConditional probabilities\n===\n\nWe can start with some probability $\\bP(B)$, and then *assume* that $A$ is true to get a [1rj conditional probability] $\\bP(B \\mid A)$ of $B$. Conditioning on $A$ being true is like restricting our whole attention to just the possible worlds where $A$ happens:\n\n\n<img src="http://i.imgur.com/ubybRoH.png" width="279" height="297">\n\nThen the conditional probability of $B$ given $A$ is the proportion of these $A$ worlds where $B$ also happens:\n\n<img src="http://i.imgur.com/bFCHiZ8.png" width="415" height="260">\n\nIf instead we condition on $\\neg A$, we get:\n\n<img src="http://i.imgur.com/LHkGLVl.png" width="435" height="165">\n\n\nSo our square visualization gives a nice way to see, at a glance, the conditional probabilities of $B$ given $A$ or given $\\neg A$:\n\n<img src="http://i.imgur.com/6ZHSR0l.png" width="504" height="312">\n\n We don't get such nice pictures for $\\bP(A \\mid B)$: \n\n<img src="http://i.imgur.com/G6Sja4f.png" width="410" height="185">\n\n\nMore on this next.\n\nFactoring a distribution\n===\n\nRecall the square showing our joint distribution $\\bP$:\n\n<img src="http://i.imgur.com/A4ikuJh.png" width="280" height="280">\n\nNotice that in the above square, the reddish blocks for $\\bP(A,B)$ and $\\bP(A,\\neg B)$ are the same width and form a column; and likewise the blueish blocks for $\\bP(\\neg A,B)$ and $\\bP(\\neg A,\\neg B)$. This is because we chose to [factoring_probability factor] our probability distribution starting with $A$:\n\n$$\\bP(A,B) = \\bP(A) \\bP( B \\mid A)\\ .$$\n\nLet's use the [event_variable_equivalence equivalence] between [event_probability events] and [binary_variable binary random variables], so if we say $\\bP( B= \\true \\mid A= \\false)$ we mean $\\bP(B \\mid \\neg A)$. For any choice of truth values $t_A \\in \\{\\true, \\false\\}$ and $t_B \\in \\{\\true, \\false\\}$, we have \n\n$$\\bP(A = t_A,B= t_B) = \\bP(A= t_A)\\; \\bP( B= t_B \\mid A= t_A)\\ .$$\n\nThe first factor $\\bP(A = t_A)$ tells us how wide to make the red column $(\\bP(A = \\true))$ relative to the blue column $(\\bP(A = \\false))$. Then the second factor $\\bP( B= t_B \\mid A= t_A)$ tells us the proportions of dark $(B = \\true)$ and light $(B = \\false)$ within the column for $A = t_A$. \n\n\n<img src="http://i.imgur.com/6ZHSR0l.png" width="504" height="312">\n\nWe could just as well have factored by $B$ first: \n\n$$\\bP(A = t_A,B= t_B) = \\bP(B= t_B)\\; \\bP( A= t_A \\mid B= t_b)\\ .$$\n\nThen we'd draw a picture like this:\n\n<img src="http://i.imgur.com/O0RNzxw.png" width="390" height="390">\n\nBy the way, earlier when we factored by $A$ first, we got simple pictures of the probabilities $\\bP(B \\mid A)$ for $B$ conditioned on $A$.  Now that we're factoring by $B$ first, we have simple pictures for the conditional probability $\\bP(A \\mid B)$:\n\n<img src="http://i.imgur.com/4oCyg8q.png" width="415" height="155">\n\n\nand for the conditional probability $\\bP(A \\mid \\neg B)$:\n\n\n<img src="http://i.imgur.com/pK7o56J.png" width="440" height="157">\n\n\n\nComputing joint probabilities from factored probabilities \n===\n\nLet's say we know the factored probabilities for $A$ and $B$, factoring by $A$. That is, we know $\\bP(A = \\true)$, and we also know $\\bP(B = \\true \\mid A = \\true)$ and $\\bP(B = \\true \\mid A = \\false)$. How can we recover the joint probability $\\bP(A = t_A, B = t_B)$ that $A = t_A$ is the case and also $B = t_B$ is the case?\n\n\nSince \n\n$$\\bP(B = \\false \\mid A = \\true) = \\frac{\\bP(A = \\true, B = \\false)}{\\bP(A = \\true)}\\ ,$$ \n\nwe can multiply the prior $\\bP(A)$ by the conditional $\\bP(\\neg B \\mid A)$ to get the joint $\\bP(A, \\neg B)$:\n\n$$\\bP(A = \\true)\\; \\bP(B = \\false \\mid A = \\true) = \\bP(A = \\true, B = \\false)\\ .$$ \n\nIf we do this at the same time for all the possible truth values $t_A$ and $t_B$, we get back the full joint distribution:\n\n<img src="http://i.imgur.com/7OnspSN.png" width="647" height="488">\n\n\n\n[todo: information theory. a couple things, then point to another page. eg show example when two things have lots of mutual info.]\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: [
    'TsviBT',
    'EricRogstad'
  ],
  childIds: [
    '4fh'
  ],
  parentIds: [
    'probability_theory'
  ],
  commentIds: [
    '4fx'
  ],
  questionIds: [],
  tagIds: [],
  relatedIds: [],
  markIds: [],
  explanations: [],
  learnMore: [],
  requirements: [],
  subjects: [],
  lenses: [
    {
      id: '44',
      pageId: '496',
      lensId: '4fh',
      lensIndex: '0',
      lensName: '(example) Diseasitis',
      lensSubtitle: '',
      createdBy: '1',
      createdAt: '2016-06-17 21:58:56',
      updatedBy: '1',
      updatedAt: '2016-06-17 21:58:56'
    }
  ],
  lensParentId: '',
  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: '13991',
      pageId: '496',
      userId: 'TsviBT',
      edit: '18',
      type: 'newEdit',
      createdAt: '2016-06-19 10:37:06',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13823',
      pageId: '496',
      userId: 'TeamArbital',
      edit: '0',
      type: 'newChild',
      createdAt: '2016-06-18 05:44:04',
      auxPageId: '4fh',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13393',
      pageId: '496',
      userId: 'TsviBT',
      edit: '17',
      type: 'newEdit',
      createdAt: '2016-06-16 21:29:46',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13344',
      pageId: '496',
      userId: 'TsviBT',
      edit: '16',
      type: 'newEdit',
      createdAt: '2016-06-16 17:58:36',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13343',
      pageId: '496',
      userId: 'TsviBT',
      edit: '15',
      type: 'newEdit',
      createdAt: '2016-06-16 17:57:11',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13319',
      pageId: '496',
      userId: 'EricRogstad',
      edit: '14',
      type: 'newEdit',
      createdAt: '2016-06-16 17:01:48',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13318',
      pageId: '496',
      userId: 'EricRogstad',
      edit: '13',
      type: 'newEdit',
      createdAt: '2016-06-16 16:57:10',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13285',
      pageId: '496',
      userId: 'TsviBT',
      edit: '12',
      type: 'newParent',
      createdAt: '2016-06-16 09:01:52',
      auxPageId: 'probability_theory',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13281',
      pageId: '496',
      userId: 'TsviBT',
      edit: '12',
      type: 'newEdit',
      createdAt: '2016-06-16 08:57:43',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13278',
      pageId: '496',
      userId: 'TsviBT',
      edit: '11',
      type: 'newEdit',
      createdAt: '2016-06-16 08:38:06',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13277',
      pageId: '496',
      userId: 'TsviBT',
      edit: '10',
      type: 'newEdit',
      createdAt: '2016-06-16 08:24:44',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13249',
      pageId: '496',
      userId: 'TsviBT',
      edit: '9',
      type: 'newEdit',
      createdAt: '2016-06-16 05:21:56',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13191',
      pageId: '496',
      userId: 'TsviBT',
      edit: '8',
      type: 'newEdit',
      createdAt: '2016-06-16 01:19:27',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '13090',
      pageId: '496',
      userId: 'TsviBT',
      edit: '7',
      type: 'newEdit',
      createdAt: '2016-06-15 18:54:22',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12940',
      pageId: '496',
      userId: 'TsviBT',
      edit: '6',
      type: 'newEdit',
      createdAt: '2016-06-15 07:14:57',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12939',
      pageId: '496',
      userId: 'TsviBT',
      edit: '5',
      type: 'newEdit',
      createdAt: '2016-06-15 07:14:41',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12938',
      pageId: '496',
      userId: 'TsviBT',
      edit: '4',
      type: 'newEdit',
      createdAt: '2016-06-15 07:11:17',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12937',
      pageId: '496',
      userId: 'TsviBT',
      edit: '3',
      type: 'newEdit',
      createdAt: '2016-06-15 07:10:54',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12936',
      pageId: '496',
      userId: 'TsviBT',
      edit: '2',
      type: 'newEdit',
      createdAt: '2016-06-15 07:10:29',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    },
    {
      likeableId: '0',
      likeableType: 'changeLog',
      myLikeValue: '0',
      likeCount: '0',
      dislikeCount: '0',
      likeScore: '0',
      individualLikes: [],
      id: '12935',
      pageId: '496',
      userId: 'TsviBT',
      edit: '1',
      type: 'newEdit',
      createdAt: '2016-06-15 07:09:20',
      auxPageId: '',
      oldSettingsValue: '',
      newSettingsValue: ''
    }
  ],
  feedSubmissions: [],
  searchStrings: {},
  hasChildren: 'true',
  hasParents: 'true',
  redAliases: {},
  improvementTagIds: [],
  nonMetaTagIds: [],
  todos: [],
  slowDownMap: 'null',
  speedUpMap: 'null',
  arcPageIds: 'null',
  contentRequests: {}
}