<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.mindfiretechnology.com/blog/rss/xslt"?>
<rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Mindfire Technology</title>
    <link>https://www.mindfiretechnology.com/blog/</link>
    <description>Welcome to our blog, where we share technical and business knowledge based on real life experiences.</description>
    <generator>Articulate, blogging built on Umbraco</generator>
    <item>
      <guid isPermaLink="false">2640</guid>
      <link>https://www.mindfiretechnology.com/blog/archive/coxs-theorem-is-probability-theory-universal/</link>
      <category>System.String[]</category>
      <title>Cox's Theorem: Is Probability Theory Universal?</title>
      <description>&lt;p&gt;Most of life involves reasoning using incomplete information. Or put another way, it's about reasoning under uncertainty. Will it rain tomorrow? Should you carry an umbrella? Classical (propositional) logic handles things that are &lt;em&gt;exactly&lt;/em&gt; true or false — but it doesn’t tell you how to reason when you’re unsure.&lt;/p&gt;
&lt;p&gt;In our last several posts, &lt;a href="https://www.mindfiretechnology.com/blog/archive/from-certainty-to-belief-how-probability-extends-logic-part-3/"&gt;particularly this one&lt;/a&gt;, we talked about how probability theory is a generalization of boolean and propositional logic. That is to say, probability theory extends regular deductive logic and includes it; at least for boolean and propositional logic. (There is still an open question on if this is also true for First Order logic.) So probability theory gives us a way to reason with incomplete or uncertain information.&lt;/p&gt;
&lt;p&gt;But is probability theory just one possible way to reason under uncertainty? Or is it the &lt;em&gt;only&lt;/em&gt; way to do so?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.cco.caltech.edu/~jimbeck/summerlectures/references/ProbabilityFrequencyReasonableExpectation.pdf"&gt;Cox’s theorem (R. T. Cox, 1946)&lt;/a&gt; attempts to answer that question. Put simply: if you want a system for &lt;strong&gt;plausible reasoning&lt;/strong&gt; that is sensible and consistent, you are inevitably led to probability theory. Edwin T. Jaynes championed and popularized this view; see his book (&lt;a href="https://amzn.to/4lY3WhX"&gt;&lt;em&gt;Probability Theory: The Logic of Science&lt;/em&gt;&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;If you want to dive into the originals, Cox’s paper and notes are available online:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.cco.caltech.edu/~jimbeck/summerlectures/references/ProbabilityFrequencyReasonableExpectation.pdf"&gt;Cox, &lt;em&gt;Probability, Frequency and Reasonable Expectation&lt;/em&gt; (American Journal of Physics, 1946). (PDF)&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://bayes.wustl.edu/Manual/cox-algebra.pdf"&gt;Cox, &lt;em&gt;The Algebra of Probable Inference&lt;/em&gt; (manuscript/PDF)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Cox%27s_theorem"&gt;Short overview / background: Cox’s theorem (Wikipedia)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;What we Demand of a Reasoner (According to Jayne)&lt;/h2&gt;
&lt;p&gt;Jaynes summarized Cox’s intuition in three crisp requirements. Jayne calls these 'desiderata' because they aren't axioms assumed to be true, but rather desires or goals we wish to constrain ourselves to. Despite the simplicity and even apparent 'obviousness' of these 'desiderata', these are the &lt;em&gt;only&lt;/em&gt; things we ask of a system that assigns degrees of plausibility to statements:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(I) Representation — degrees of plausibility are real numbers.&lt;/strong&gt;&lt;br /&gt;
You should be able to say, “this is more plausible than that” and encode that judgment with a single number:  
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Everything gets a number.&lt;/em&gt; Any statement A has a plausibility &lt;code&gt;pl(A)&lt;/code&gt; (think: a slider).  
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Negation is linked.&lt;/em&gt; Knowing &lt;code&gt;pl(A)&lt;/code&gt; should tell you &lt;code&gt;pl(not A)&lt;/code&gt; (they’re not independent).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first requirement means you can always compare two (mutually exclusive) statements and say one is more plausible than the other, or they're equally plausible. On the surface this seems rather reasonable and almost inevitable. How else could plausibility work but via some way to ultimately decide between mutually exclusive options? And that implies there must be some way to weigh the options compared to their competitors. This isn't possible if you can't translate everything down to a single continuous value. &lt;/p&gt;
&lt;p&gt;The second sub point seems intuitively correct because knowing how plausible a statement is, you should automatically know how plausible its negation (the opposite statement) is. Suppose you think “it will rain” is somewhat likely: &lt;code&gt;pl(rain) = 0.8&lt;/code&gt; (80% plausible). Then, under Cox-like rules, the plausibility of “not rain” is determined: &lt;code&gt;pl(not rain) = 0.2&lt;/code&gt;. If you also learn “it’s cloudy” and that makes “rain” more plausible, the rules tell you &lt;em&gt;precisely&lt;/em&gt; how to combine the old plausibilities and the new evidence — and that combination must behave like Bayesian updating (i.e., use conditional probabilities).&lt;/p&gt;
&lt;p&gt;Despite the 'obviousness' of this desiderata, this is probably the most challenged requirement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(II) Qualitative correspondence with common sense.&lt;/strong&gt;&lt;br /&gt;
When information is crisp, the system should reduce to ordinary logic; small changes in evidence cause small changes in plausibility:  
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Respect logic:&lt;/em&gt; logically equivalent statements get the same plausibility.  
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Continuity:&lt;/em&gt; tiny changes in input → tiny changes in output.  
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The AND rule (decomposability):&lt;/em&gt; the plausibility of “A and B” should depend only on how plausible B is, and how plausible A would be &lt;em&gt;if&lt;/em&gt; B were true.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The continuity requirement seems sensible because you wouldn't expect a tiny piece of new information to cause a massive, sudden jump in your confidence about something. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(III) Consistency.&lt;/strong&gt;&lt;br /&gt;
Different, valid routes to the same conclusion must give the same answer; the rules must scale and compose:  
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Universality:&lt;/em&gt; the same rules must work in any domain.  
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Non-contradiction:&lt;/em&gt; if a conclusion can be derived more than one way, all derivations agree.  
&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Scalability:&lt;/em&gt; rules that make sense for one case should still make sense for many repeated or combined cases.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your system of plausible reasoning should be consistent like formal logic (for our purposes that means propositional logic). For example, if two statements are logically equivalent (they mean the same thing), they should always have the same plausibility. Likewise, if something is always true by definition (a &amp;quot;tautology&amp;quot;), its plausibility should be at the maximum possible value.&lt;/p&gt;
&lt;p&gt;And the system should be universal – it shouldn't just apply to a specific type of problem or domain. You should be able to reason about anything, from unrelated events to complex scenarios, and the underlying rules should still hold. This is crucial for making the logic broadly applicable, just like the fundamental rules of mathematics or logic apply everywhere.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;One Probability Logic to Rule Them All?&lt;/h2&gt;
&lt;p&gt;Cox showed — and later expositions (Jaynes, others) made rigorous — that those seemingly mild, intuitive demands &lt;strong&gt;uniquely determine the algebra of plausible reasoning&lt;/strong&gt;. Up to a simple re-scaling, the plausibility numbers must obey the &lt;strong&gt;product rule&lt;/strong&gt; and the &lt;strong&gt;sum/negation rule&lt;/strong&gt;. After mapping to the usual 0–1 scale, those rules are exactly the familiar axioms of probability:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;P(A and B | C) = P(A | B,C) × P(B | C)&lt;/code&gt;  (product rule)  
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;P(A | C) + P(not A | C) = 1&lt;/code&gt;  (negation/sum rule)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is possible to come up with alternatives that might on the surface look a lot different. But there will always be a function that maps the results back to simple probability theory. The only alternative to this is a system that doesn't match those seemingly innocuous desiderata. (Which seems rather undesirable.) &lt;/p&gt;
&lt;p&gt;In short: If you accept Jaynes desiderata, &lt;strong&gt;probability theory is the only consistent extension of Boolean logic to uncertain situations.&lt;/strong&gt; Cox and Jayne argue that probability theory is not merely a tool for frequencies or gambling — it’s the uniquely rational way to handle degrees of belief in uncertain situations.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;So Why Does This Matter?&lt;/h2&gt;
&lt;p&gt;Cox's theorem is used to argue for several important points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Foundational justification for Bayesian reasoning.&lt;/strong&gt; Cox gives a principled reason to treat probabilities as degrees of belief (not only long-run frequencies).  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Objectivity and consistency.&lt;/strong&gt; If you accept the desiderata, then any other scheme will give contradictory or “nonsensical” answers in some cases.  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Applies to single events.&lt;/strong&gt; You don’t need repeatable trials — probability applies to unique hypotheses (e.g., “life exists on other planets”) because it codifies consistent belief, not frequency.  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Practical payoff.&lt;/strong&gt; The rules Cox forces on us are exactly the ones used in Bayesian inference, decision theory, and much of modern machine learning.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Conclusion and A Quick Caution&lt;/h2&gt;
&lt;p&gt;There are ongoing technical discussions (and a few edge-case counterexamples) in the literature about which exact axioms are needed. There are also a few (not so well known) alternative theories of plausibility that try out different desiderata -- such as not requiring plausibilities to be put in terms of a single real value. &lt;/p&gt;
&lt;p&gt;Still — this seems like a big breakthrough. It takes the idea we previously proved — that probability theory is an extension to propositional logic — and formalizes it and proves that under seemingly reasonable assumptions probability theory is the sole and only way to represent logical plausibilities.&lt;/p&gt;
&lt;p&gt;It is not an accident that Bayesian probabilities have come to dominate Machine Learning in recent years.&lt;/p&gt;
</description>
      <pubDate>Tue, 21 Oct 2025 12:00:00 -0600</pubDate>
      <a10:updated>2025-10-21T12:00:00-06:00</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2637</guid>
      <link>https://www.mindfiretechnology.com/blog/archive/from-certainty-to-belief-how-probability-extends-logic-part-1/</link>
      <category>System.String[]</category>
      <title>From Certainty to Belief: How Probability Extends Logic - Part 1</title>
      <description>&lt;p&gt;&lt;a href="https://www.mindfiretechnology.com/blog/archive/dice-rolls-coin-flips-and-death-by-asteroid-a-probability-refresher/"&gt;In our previous post&lt;/a&gt;, we gave an introduction to probability theory. &lt;a href="https://www.mindfiretechnology.com/blog/archive/aristotle-the-first-agi-researcher-a-primer-on-propositional-logic/"&gt;In an even earlier post&lt;/a&gt;, we went over the basics of propositional logic — starting with the logic of Aristotle, moving on to Boolean logic, and finally showing the link to propositional logic.  
&lt;/p&gt;
&lt;p&gt;But is there any relationship between probability theory and deductive logic? In fact, there is! Boolean logic and propositional logic can be thought of as a special case of probability theory.  
&lt;/p&gt;
&lt;p&gt;This may seem quite strange at first. When we think about reasoning, our minds often jump to logic: if certain statements are true, then other statements must be true. This is the bedrock of deductive logic — a system built on clear-cut, binary truths: something is either true or false.  
&lt;/p&gt;
&lt;p&gt;What could logic possibly have to do with something as squishy and uncertain as probability theory? Think back to the examples we used in the previous post on probability theory. If you roll a die, you don't know for certain the outcome. But you do know that rolling two fair dice and scoring a total of 12 has only a 1 in 36 chance of happening. So if you needed to make a rational decision based on those odds, you could calculate the rationally correct choice — even though there’s no certainty like there is in deductive logic.  
&lt;/p&gt;
&lt;p&gt;So just intuitively, there does seem to be something at least &lt;em&gt;similar&lt;/em&gt; between deductive logic and probability theory. Both can be used to make rational decisions.  
&lt;/p&gt;
&lt;p&gt;Given this intuition, could it be possible that there is some sort of formal relationship between deductive logic and probability theory? Or is this intuition misguided?  
&lt;/p&gt;
&lt;h2&gt;Deductive Logic: The World of Absolutes&lt;/h2&gt;
&lt;p&gt;To explore this further, let's start with traditional deductive logic (either propositional or Boolean logic works here), where statements are assigned one of two values: True or False. If &amp;quot;A implies B&amp;quot; is true, and &amp;quot;A is true&amp;quot; is true, then &amp;quot;B is true&amp;quot; must logically follow. There’s no room for &amp;quot;A is probably true&amp;quot; or &amp;quot;B is sometimes true.&amp;quot; It’s a system of absolute certainties.  
&lt;/p&gt;
&lt;p&gt;But our real world is rarely so black and white. We encounter situations where information is incomplete, observations are noisy, and conclusions are tentative. This is where probability theory offers a richer language that allows more flexible reasoning.  
&lt;/p&gt;
&lt;h2&gt;Probability Theory: Quantifying Uncertainty&lt;/h2&gt;
&lt;p&gt;Probability theory provides a framework for managing uncertainty. When you roll a fair die, you don't know what outcome you'll get — but you do have a rational explanation for why a 12 on two fair dice will only happen 1 in 36 throws. So you can assign a confidence to the outcome even though it’s uncertain.  
&lt;/p&gt;
&lt;p&gt;In fact, this can also be true for a non-random event. In our previous post, we considered the “probability” of an asteroid hitting the Earth and even put a number on that event despite it being non-random. Re-imagining probability theory as a sort of &lt;em&gt;plausibility calculus&lt;/em&gt; (more on this in future posts) allows us to use the same mathematical rigor for both uncertainty due to randomness in nature and uncertainty due to our ignorance.  
&lt;/p&gt;
&lt;p&gt;Imagine an extension to propositional logic where, instead of only restricting yourself to the two values of 1 = True and 0 = False, you allow any continuous value between 0 and 1. If the value is 0.5, you have no reason to prefer assuming the event in question is true or false (say, you don’t know if a giant asteroid will hit the Earth this year). If the value is 1, you currently accept the event as true (you’ve observed an asteroid heading toward Earth and calculated it’s on a collision course). If the value is 0, you currently accept the event as false (you’ve scanned the sky and there are no asteroids on a collision course this year).  
&lt;/p&gt;
&lt;p&gt;Now say you have no evidence to work with other than the fact that asteroids hit the Earth once every 500,000 years (as discussed in the previous post &lt;link&gt;). Then your best estimate is that there is a 0.0002% chance that a giant asteroid will hit the Earth this year.  
&lt;/p&gt;
&lt;p&gt;Notice how allowing continuous values from 0 to 1 lets us mathematically express these intuitive ideas about the “probability” of a giant asteroid smashing into the Earth given some set of observations. This is true even though giant asteroids are not random events.  
&lt;/p&gt;
&lt;p&gt;What, then, are we expressing if not the probability of a random event? There is considerable debate on this point, but the most obvious answer is that we’re expressing the plausibility of an event or statement being true given what we currently know — and what we currently don’t know. This is sometimes called, by Bayesians, &lt;strong&gt;degrees of belief&lt;/strong&gt; (a term I don’t object to, even though I think Bayesians only have part of the truth about probability theory).  
&lt;/p&gt;
&lt;p&gt;When viewed this way, it seems intuitive that probability theory is an extension of deductive logic. Deductive logic is just a special case of probability theory that allows only True (1) and False (0), whereas probability theory allows any value between 0 and 1.  
&lt;/p&gt;
&lt;h2&gt;Probability Theory as an Extension of Deductive Logic&lt;/h2&gt;
&lt;p&gt;Can we show formally that our intuition is correct — that deductive logic is a special case of probability theory, and that probability theory extends deductive logic?  
&lt;/p&gt;
&lt;p&gt;In my next post, I’ll go over two excellent examples from David Barber’s &lt;em&gt;&lt;a href="https://amzn.to/4oBqnvJ"&gt;Bayesian Reasoning and Machine Learning&lt;/a&gt;&lt;/em&gt; that demonstrate exactly that.  
&lt;/p&gt;
</description>
      <pubDate>Tue, 30 Sep 2025 09:00:00 -0600</pubDate>
      <a10:updated>2025-09-30T09:00:00-06:00</a10:updated>
    </item>
    <item>
      <guid isPermaLink="false">2636</guid>
      <link>https://www.mindfiretechnology.com/blog/archive/dice-rolls-coin-flips-and-death-by-asteroid-a-probability-refresher/</link>
      <category>System.String[]</category>
      <title>Dice Rolls, Coin Flips, and Death By Asteroid: A Probability Refresher</title>
      <description>&lt;h2&gt;Introduction: Randomness, Belief, and Asteroids&lt;/h2&gt;
&lt;p&gt;Imagine flipping a coin or rolling a die—those feel &lt;em&gt;truly random&lt;/em&gt;. Every flip and roll is fresh, unpredictable, and fair. When we say there is a 50% chance of getting heads or “1‑in‑6” odds of rolling a six, probability captures the genuine randomness of the experiment.&lt;/p&gt;
&lt;p&gt;But what about something like &lt;strong&gt;Earth getting hit by a giant asteroid&lt;/strong&gt;? That event doesn’t feel random in the same way—it’s a unique, one‑off cosmic occurrence based on deterministic laws. There is either an asteroid heading to earth that is going to hit us this year or there isn't. So where does probability come into play? &lt;/p&gt;
&lt;p&gt;When we assign a probability to it, we’re really modeling our &lt;strong&gt;uncertainty&lt;/strong&gt;—our lack of exact knowledge—not a repeatable random process like a coin flip.&lt;/p&gt;
&lt;p&gt;For example, consider asteroids around &lt;strong&gt;1 km in diameter&lt;/strong&gt;—the kinds that could trigger widespread devastation or even global catastrophe. According to the Catalina Sky Survey, such an object strikes Earth on average &lt;strong&gt;once every 500,000 years&lt;/strong&gt; (&lt;a href="https://catalina.lpl.arizona.edu/faq/how-often-do-asteroids-strike-earth"&gt;Catalina Sky Survey FAQ&lt;/a&gt;). That translates to an &lt;strong&gt;annual probability&lt;/strong&gt; of approximately:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1 / 500,000 = 0.000002 (or 0.0002%)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this case, probability is less about dice‑rolling-style pure randomness and more about representing our &lt;strong&gt;ignorance and expectations based on long‑term historical frequencies&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In the sections that follow, we’ll revisit classic probability concepts using coin flips and dice rolls—but we’ll also carry forward that perspective: probability is sometimes about real randomness, and sometimes about modeling how much we don’t know.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Variables and States&lt;/h2&gt;
&lt;p&gt;Let’s start with a simple example: flipping a fair coin. A coin can be in one of two states, either heads or tails. &lt;/p&gt;
&lt;p&gt;We can represent this experiment using a &lt;strong&gt;random variable&lt;/strong&gt;. Let’s call it &lt;code&gt;c&lt;/code&gt;, for coin. The set of values that &lt;code&gt;c&lt;/code&gt; can take is called its &lt;strong&gt;domain&lt;/strong&gt;, and we write this as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;dom(c) = {heads, tails}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This means that the variable &lt;code&gt;c&lt;/code&gt; can be in one of two &lt;strong&gt;states&lt;/strong&gt;: &lt;code&gt;heads&lt;/code&gt; or &lt;code&gt;tails&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the coin is fair, we assign equal probabilities to each outcome:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(c = heads) = 0.5&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(c = tails) = 0.5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So when we say something like &lt;code&gt;p(heads) = 0.5&lt;/code&gt;, we’re using shorthand for &lt;code&gt;p(c = heads)&lt;/code&gt;— the probability that the coin lands on heads.&lt;/p&gt;
&lt;p&gt;The important thing here is that we’re treating the coin as a variable (&lt;code&gt;c&lt;/code&gt;), and the results it can take on (&lt;code&gt;heads&lt;/code&gt; or &lt;code&gt;tails&lt;/code&gt;) as states of that variable.&lt;/p&gt;
&lt;p&gt;An &lt;em&gt;event&lt;/em&gt; is an expression about a random variable such as &lt;em&gt;two heads in a row&lt;/em&gt; or &lt;em&gt;two heads out of three flips&lt;/em&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Summing Over Variables&lt;/h2&gt;
&lt;p&gt;Another important rule in probability is that the total probability over all possible states of a variable must add up to 1. This is called the &lt;strong&gt;normalisation condition&lt;/strong&gt;. When you flip a coin you know that it must either land on heads or tails, so the total probability of both combined must add up to 1.0, meaning there is a 100% chance (certainty) it will be one of the two sides.&lt;/p&gt;
&lt;p&gt;For our coin variable &lt;code&gt;c&lt;/code&gt;, this means:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(c = heads) + p(c = tails) = 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Or, using more compact notation:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;∑ p(c) = 1&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This just says that when we consider &lt;em&gt;all possible outcomes&lt;/em&gt; of the coin flip, one of them must happen. Either it lands heads, or it lands tails—there are no other options.&lt;/p&gt;
&lt;p&gt;This idea of summing over all the states of a variable will show up again later when we start working with multiple variables.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;In summary:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;variable&lt;/strong&gt; represents an uncertain quantity—like the result of a coin flip.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;states&lt;/strong&gt; of that variable are the specific outcomes it can take—&lt;code&gt;heads&lt;/code&gt; or &lt;code&gt;tails&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;domain&lt;/strong&gt; is the full set of those possible states.&lt;/li&gt;
&lt;li&gt;And the &lt;strong&gt;sum of the probabilities of all states&lt;/strong&gt; of the variable must equal 1.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Interacting Variables: ANDs and ORs&lt;/h2&gt;
&lt;p&gt;Sometimes we’re interested in how two variables—or two events—relate to each other. One of the core rules in probability helps us figure out the chance of &lt;em&gt;either&lt;/em&gt; event happening:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x or y) = p(x) + p(y) - p(x and y)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This accounts for the fact that if both events can happen together, we shouldn’t double-count that overlap.&lt;/p&gt;
&lt;p&gt;Let’s look at an example with a 6-sided die.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Let &lt;strong&gt;Event A&lt;/strong&gt; be: &lt;em&gt;the die shows an even number&lt;/em&gt; → {2, 4, 6}  
&lt;/li&gt;
&lt;li&gt;Let &lt;strong&gt;Event B&lt;/strong&gt; be: &lt;em&gt;the die shows a number greater than 3&lt;/em&gt; → {4, 5, 6}&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These events &lt;strong&gt;overlap&lt;/strong&gt; at 4 and 6.&lt;/p&gt;
&lt;p&gt;Now let’s calculate the probabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;p(A) = 3/6 = 0.5&lt;/strong&gt; (since 2, 4, and 6 are even)  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;p(B) = 3/6 = 0.5&lt;/strong&gt; (since 4, 5, and 6 are greater than 3)  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;p(A and B) = 2/6 ≈ 0.333&lt;/strong&gt; (since 4 and 6 satisfy both)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using the formula:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(A or B) = p(A) + p(B) - p(A and B)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(A or B) = 0.5 + 0.5 - 0.333 = 0.667&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So there’s about a &lt;strong&gt;66.7% chance&lt;/strong&gt; that the die roll is either even, or greater than 3—or both.&lt;/p&gt;
&lt;p&gt;This rule becomes especially useful when we work with more complex combinations of events later on.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Marginal Probability&lt;/h2&gt;
&lt;p&gt;Now that we've introduced how to handle two variables at once, it might be helpful to see how to take multiple variables and reduce back to one by summing the other variables. This is called calculating the &lt;strong&gt;marginal probability&lt;/strong&gt;. &lt;/p&gt;
&lt;p&gt;Let’s say we flip two coins. We’ll call them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;c1&lt;/code&gt;: the result of the first flip  
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;c2&lt;/code&gt;: the result of the second flip&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each coin has two possible outcomes: &lt;code&gt;heads&lt;/code&gt; or &lt;code&gt;tails&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The full &lt;strong&gt;joint distribution&lt;/strong&gt; (probabilities of combined events) includes all possible combinations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;p(c1 = heads, c2 = heads) = 0.25  
&lt;/li&gt;
&lt;li&gt;p(c1 = heads, c2 = tails) = 0.25  
&lt;/li&gt;
&lt;li&gt;p(c1 = tails, c2 = heads) = 0.25  
&lt;/li&gt;
&lt;li&gt;p(c1 = tails, c2 = tails) = 0.25&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These probabilities all add up to 1, as expected.&lt;/p&gt;
&lt;p&gt;Now let’s say we only care about the result of the &lt;strong&gt;first coin&lt;/strong&gt;. We can compute its &lt;strong&gt;marginal probability&lt;/strong&gt; by summing over all outcomes of the second coin:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(c1 = heads) = p(c1 = heads, c2 = heads) + p(c1 = heads, c2 = tails)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(c1 = heads) = 0.25 + 0.25 = 0.5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(c1 = tails) = p(c1 = tails, c2 = heads) + p(c1 = tails, c2 = tails)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(c1 = tails) = 0.25 + 0.25 = 0.5&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This process is called &lt;strong&gt;marginalisation&lt;/strong&gt;. We’re taking a joint distribution of multiple variables and extracting just the part we care about—by summing over the rest.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Conditional Probability&lt;/h2&gt;
&lt;p&gt;Sometimes we don’t just want to know the probability of an event—we want to know the probability &lt;strong&gt;given that something else has already happened&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This brings us to &lt;strong&gt;conditional probability&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We write this as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x | y) = p(x and y) / p(y)&lt;/strong&gt;&lt;br /&gt;
or more formally:&lt;br /&gt;
&lt;strong&gt;p(x | y) = p(x, y) / p(y)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This definition tells us how to update our probability of &lt;code&gt;x&lt;/code&gt; when we know that &lt;code&gt;y&lt;/code&gt; is true. The numerator is the joint probability that both &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; happen, and the denominator scales it relative to how likely &lt;code&gt;y&lt;/code&gt; is overall.&lt;/p&gt;
&lt;p&gt;Let’s look at a simple dice example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Event A&lt;/strong&gt;: the die shows a 6  
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event B&lt;/strong&gt;: the die shows an even number (2, 4, or 6)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We want to know:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(A | B)&lt;/strong&gt; — the probability that the die shows a 6 &lt;strong&gt;given&lt;/strong&gt; that it shows an even number.&lt;/p&gt;
&lt;p&gt;Using the formula:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(A | B) = p(A and B) / p(B)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(A | B) = p(6) / p(even)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(A | B) = (1/6) / (3/6) = 1/3&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So if we already know that the die landed on an even number, there’s a &lt;strong&gt;1 in 3&lt;/strong&gt; chance it was a 6.&lt;/p&gt;
&lt;p&gt;This is the essence of conditional probability: we’re updating what we believe about one event in light of new information.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2&gt;Bayes’ Rule: Deriving It Step by Step&lt;/h2&gt;
&lt;p&gt;Let’s start with something simple but powerful:&lt;/p&gt;
&lt;h3&gt;🔁 Joint probabilities are symmetric&lt;/h3&gt;
&lt;p&gt;The &lt;strong&gt;joint probability&lt;/strong&gt; of two events &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; is the same regardless of their order:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x, y) = p(y, x)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This just says: the probability of both &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; happening is the same as the probability of both &lt;code&gt;y&lt;/code&gt; and &lt;code&gt;x&lt;/code&gt; happening. They describe the same outcome.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;📘 Now recall the definition of conditional probability&lt;/h3&gt;
&lt;p&gt;By definition:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x | y) = p(x, y) / p(y)&lt;/strong&gt;&lt;br /&gt;
This gives us the probability of &lt;code&gt;x&lt;/code&gt; &lt;em&gt;given that&lt;/em&gt; &lt;code&gt;y&lt;/code&gt; has occurred.&lt;/p&gt;
&lt;p&gt;Likewise:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(y | x) = p(y, x) / p(x)&lt;/strong&gt;&lt;br /&gt;
This gives the probability of &lt;code&gt;y&lt;/code&gt; &lt;em&gt;given that&lt;/em&gt; &lt;code&gt;x&lt;/code&gt; has occurred.&lt;/p&gt;
&lt;p&gt;Let's calculate &lt;code&gt;p(x, y)&lt;/code&gt; now by multiplying both sides by &lt;code&gt;p(y)&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x,y) = p(x|y) p(y)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Note also that we could have instead done this as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(y, x) = p(y|x) p(x)&lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;🔁 Substituting using the symmetry of joint probabilities&lt;/h3&gt;
&lt;p&gt;We know from earlier that:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x, y) = p(y, x)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So we can replace &lt;code&gt;p(x, y)&lt;/code&gt; in the first equation with &lt;code&gt;p(y | x) × p(x)&lt;/code&gt; (from the second equation above):&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x | y) = p(x, y) / p(y)&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;p(x | y) = [p(y | x) × p(x)] / p(y)&lt;/strong&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;✅ Bayes’ Rule&lt;/h3&gt;
&lt;p&gt;We’ve now arrived at the full expression:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(x | y) = (p(y | x) × p(x)) / p(y)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is &lt;strong&gt;Bayes’ Rule&lt;/strong&gt;. It allows us to reverse the direction of a conditional probability—from &lt;code&gt;p(y | x)&lt;/code&gt; to &lt;code&gt;p(x | y)&lt;/code&gt;— by incorporating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;p(x)&lt;/strong&gt;: our prior belief about &lt;code&gt;x&lt;/code&gt; (i.e. the probability of x before we have any evidence)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;p(y)&lt;/strong&gt;: the overall likelihood of observing &lt;code&gt;y&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;p(y | x)&lt;/strong&gt;: how likely &lt;code&gt;y&lt;/code&gt; is if &lt;code&gt;x&lt;/code&gt; is true&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2&gt;Symptoms and Diseases: Using Bayes’ Rule to Flip the Question&lt;/h2&gt;
&lt;p&gt;Imagine you go to the doctor because you have a particular symptom—say, a persistent cough. Naturally, you want to know: &lt;strong&gt;What is the probability that you have a certain disease given this symptom?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This sounds straightforward, but here’s the catch: it’s often &lt;strong&gt;hard to directly measure&lt;/strong&gt; how likely someone with that symptom actually has the disease. Symptoms can be caused by many things, and collecting data on &lt;em&gt;all&lt;/em&gt; people with that symptom and their diagnoses is complicated.&lt;/p&gt;
&lt;p&gt;However, it’s usually &lt;strong&gt;easier to measure two other things&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How often people who &lt;em&gt;have&lt;/em&gt; the disease exhibit that symptom.&lt;/strong&gt; For example, suppose that &lt;strong&gt;80%&lt;/strong&gt; of people with disease X have a cough. This is the probability of the symptom given the disease:  
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;p(cough | disease) = 0.8&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How common the disease is in the general population.&lt;/strong&gt; For example, maybe disease X affects &lt;strong&gt;1 in 1,000&lt;/strong&gt; people:  
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;p(disease) = 0.001&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With those two pieces of information, and using Bayes’ Rule, we can calculate what we really want:&lt;/p&gt;
&lt;h3&gt;What is the probability of having the disease given the symptom?&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;p(disease | cough) = [p(cough | disease) × p(disease)] / p(cough)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;But what about &lt;strong&gt;p(cough)&lt;/strong&gt;, the overall probability of coughing? We can estimate that by considering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The chance of coughing &lt;strong&gt;if you have the disease&lt;/strong&gt;: p(cough | disease) = 0.8  
&lt;/li&gt;
&lt;li&gt;The chance of coughing &lt;strong&gt;if you do not have the disease&lt;/strong&gt;: say this is p(cough | no disease) = 0.1 (10% of people cough for other reasons)  
&lt;/li&gt;
&lt;li&gt;The overall chance of having the disease: p(disease) = 0.001  
&lt;/li&gt;
&lt;li&gt;The chance of not having the disease: p(no disease) = 1 - 0.001 = 0.999&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To compute &lt;strong&gt;p(cough)&lt;/strong&gt; — the overall probability that someone has a cough — we can break it down based on whether or not they have the disease. This follows the same logic we saw earlier with &lt;strong&gt;marginal probability&lt;/strong&gt;, where we summed over the possible states of a variable.&lt;/p&gt;
&lt;p&gt;In this case, we’re summing over two mutually exclusive groups: those &lt;strong&gt;with&lt;/strong&gt; the disease and those &lt;strong&gt;without&lt;/strong&gt; it. So we write:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(cough) = p(cough, disease) + p(cough, no disease)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Using the definition of conditional probability  
&lt;/p&gt;
&lt;p&gt;(&lt;strong&gt;p(x, y) = p(x | y) × p(y)&lt;/strong&gt;),  
&lt;/p&gt;
&lt;p&gt;we can rewrite this as:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(cough) = p(cough | disease) × p(disease) + p(cough | no disease) × p(no disease)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is also known as &lt;em&gt;the law of total probability&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Substituting the values:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(cough) = (0.8 × 0.001) + (0.1 × 0.999) = 0.0008 + 0.0999 = 0.1007&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So even though the symptom is very common (10% of people get it regardless), the contribution from the rare disease (0.08%) is small in comparison.&lt;/p&gt;
&lt;p&gt;Finally, apply Bayes’ Rule:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;p(disease | cough) = (0.8 × 0.001) ÷ 0.1007 = 0.0008 ÷ 0.1007 ≈ 0.00795&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This means:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Given that you have a cough, the chance that you have the disease is about &lt;strong&gt;0.8%&lt;/strong&gt; — or roughly &lt;strong&gt;8 in 1,000&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Even though the disease is quite rare (0.1%), and the symptom common (coughing can be caused by many things), Bayes’ Rule helps us &lt;em&gt;update&lt;/em&gt; the probability of disease &lt;strong&gt;in light of the symptom&lt;/strong&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;h3&gt;Conclusions&lt;/h3&gt;
&lt;p&gt;So what does this have to do with asteroids? I'm glad you asked.&lt;/p&gt;
&lt;p&gt;Throughout this post, we've looked at how probability helps us reason under uncertainty:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We defined &lt;strong&gt;variables&lt;/strong&gt; and their possible &lt;strong&gt;states&lt;/strong&gt;, like coin flips and dice rolls.&lt;/li&gt;
&lt;li&gt;We explored how &lt;strong&gt;probabilities add up&lt;/strong&gt; across all possible outcomes of a variable.&lt;/li&gt;
&lt;li&gt;We looked at &lt;strong&gt;joint probabilities&lt;/strong&gt; and how multiple variables interact.&lt;/li&gt;
&lt;li&gt;We introduced &lt;strong&gt;marginal probability&lt;/strong&gt; by summing over hidden or unobserved variables.&lt;/li&gt;
&lt;li&gt;And we learned how &lt;strong&gt;Bayes’ Rule&lt;/strong&gt; lets us flip the direction of a probability—from something easier to measure (like symptoms given disease) to something we really want to know (like disease given symptoms).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But all of this isn’t just about games of chance.&lt;/p&gt;
&lt;p&gt;An asteroid hitting Earth isn’t like flipping a coin—it’s governed by physics. But we still use probability because we don’t know everything: we might not know the exact location of all near-Earth objects, or the precision of their orbits decades from now.&lt;/p&gt;
&lt;p&gt;In this case, probability reflects &lt;strong&gt;uncertainty in our knowledge&lt;/strong&gt;, not randomness in the universe. And yet, the same mathematical tools apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We can define variables like “asteroid hits Earth this year” and assign probabilities to them.&lt;/li&gt;
&lt;li&gt;We can update those probabilities as we gather more evidence—say, spotting a new object in the sky.&lt;/li&gt;
&lt;li&gt;And we can reason about risk using exactly the same logic we used to diagnose a cough.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The rules of probability are universal—they help us model and update beliefs whether we're rolling dice, flipping coins, diagnosing disease, or watching the skies.&lt;/p&gt;
</description>
      <pubDate>Fri, 26 Sep 2025 12:00:00 -0600</pubDate>
      <a10:updated>2025-09-26T12:00:00-06:00</a10:updated>
    </item>
  </channel>
</rss>