{"id":36,"date":"2011-08-26T23:53:49","date_gmt":"2011-08-27T03:53:49","guid":{"rendered":"http:\/\/www.clayford.net\/statistics\/?p=36"},"modified":"2023-08-16T07:09:12","modified_gmt":"2023-08-16T11:09:12","slug":"the-forgetful-exponential-distribution","status":"publish","type":"post","link":"https:\/\/www.clayford.net\/statistics\/the-forgetful-exponential-distribution\/","title":{"rendered":"The forgetful exponential distribution"},"content":{"rendered":"<p>The exponential distribution has the quirky property of having no memory. Before we wade into the math and see why, let&#8217;s consider a situation where there <em>is<\/em> memory: drawing cards. Let&#8217;s say you have a well-shuffled deck of 52 cards and you draw a single card. What&#8217;s the probability of drawing an ace? Since there are 4 aces in a deck of 52 cards, the probability is \\( \\frac{4}{52}\\). We draw our card and it&#8217;s not an ace. We set the card aside, away from the deck, and draw again. Now our probability of drawing an ace is \\( \\frac{4}{51}\\). We have a slightly better chance on the 2nd draw. The <em>condition<\/em> that we have already selected a card that wasn&#8217;t an ace <em>changes the probability<\/em> we draw an ace. This doesn&#8217;t happen with the exponential distribution.<\/p>\n<p>Let&#8217;s say we have a state-of-the-art widget (version 2.0) that has a lifespan that can be described with an exponential distribution. Further, let&#8217;s say the mean lifespan is 60 months, or 5 years. Thanks to the &#8220;no memory&#8221; property, the probability of the lifespan lasting 7 years is that same whether the widget is new or 5 years old. In math words:<\/p>\n<p>$$ P(X &gt; 7 + 5 | X&gt;5) = P(X&gt;7)$$<\/p>\n<p>That means if I bought a widget that was 5 years old, it has the same probability of lasting another 7 years as a brand new widget has for lasting 7 years. Not realistic but certainly interesting. Showing why this is the case is actually pretty straight-ahead.<\/p>\n<p>We want to show that for the exponential distribution, \\( P(X &gt; y + x | X &gt; x) = P(X &gt; y)\\).<\/p>\n<p>Recall the cumulative distribution of an exponential distribution is \\( P(X \\le x)=F(x) = 1 -e^{-x\/\\theta}\\). That&#8217;s the probability of an event occurring <em>before<\/em> a certain time <em>x<\/em>. The complement of the cumulative distribution is the probability of an event occurring <em>after<\/em> a certain time:<\/p>\n<p>$$ P(X &gt; x) = 1 &#8211; P(X \\le x) = 1 &#8211; (1 &#8211; e^{-x\/ \\theta} ) = e^{-x\/ \\theta}$$<\/p>\n<p>Also recall the definition of conditional probability: \\( P(A |B) = \\frac{P(A \\cap B)}{P(B)}\\)<\/p>\n<p>Let&#8217;s plug into the equality we want to prove and see what happens:<\/p>\n<p>$$ P(X &gt; y + x | X &gt; x) = \\frac{P(X&gt;y + x) \\cap P(X&gt;x)}{P(X &gt; x)} = \\frac{P(X&gt;y + x)}{P(X &gt; x)}$$<\/p>\n<p>$$ =\\frac{e^{-(x+y)\/\\theta}}{e^{-x\/\\theta}} = \\frac{e^{-x\/\\theta}e^{-y\/\\theta}}{e^{-x\/\\theta}} = e^{-y\/\\theta} = P(X&gt;y)$$<\/p>\n<p>There you go. Not too bad.<\/p>\n<p>We can actually go the other direction as well. That is, we can show that if \\( P(X &gt; y + x | X &gt; x) = P(X &gt; y)\\) is true for a continuous random variable X, then X has an exponential distribution. Here&#8217;s how:<\/p>\n<p>\\( P(X &gt; y + x | X &gt; x) = P(X &gt; y)\\) (<em>given<\/em>)<\/p>\n<p>\\( P(1 &#8211; F(y + x) | 1 &#8211; F(x)) = 1 &#8211; F(y)\\) (<em>substitute the cdf expressions<\/em>)<\/p>\n<p>\\( \\frac{1-F(y + x) \\cap 1-F(x))}{1-F(x)}=1-F(y)\\) (<em>using the definition of conditional probability<\/em>)<\/p>\n<p>\\( \\frac{1-F(y + x)}{1-F(x)}=1-F(y)\\) (<em>If X &gt; y + x, then X &gt; x<\/em>)<\/p>\n<p>Now substitute in generic function terminology, say \\( h(x) = 1 &#8211; F(x)\\):<\/p>\n<p>$$ \\frac{h(y + x)}{h(x)}=h(y)$$<\/p>\n<p>Rearranging terms gives us \\( h(y + x)=h(y)h(x)\\)<\/p>\n<p>Now for that equality to hold, the function <em>h(x)<\/em> has to have an exponential form, where the variable is in the exponent, like this: \\( a^{x}\\). Recall that \\( a^{x}a^{y}=a^{x+y}\\). If \\( h(x) = a^{x}\\), then our equality above works. So we let \\( h(x)=a^{x}\\). That allows to make the following conclusion:<\/p>\n<p>$$ 1-F(x) = h(x) = a^{x} = e^{ln a^{x}} = e^{x ln a}$$<\/p>\n<p>Now let b = ln a. We get \\( 1-F(x) = e^{bx}\\). Solving for F(x) we get \\( F(x) = 1 &#8211; e^{bx}\\). Since \\( F(\\infty) = 1\\), <em>b<\/em> must be negative. So we have \\( F(x) = 1 &#8211; e^{-bx}\\). Now we just let \\( b = \\frac{1}{\\theta}\\) and we have the cumulative distribution function for an exponential distribution: \\( F(x) = 1 &#8211; e^{-x\/\\theta}\\).<\/p>\n<p>That&#8217;s the memoryless property for you. Or maybe it&#8217;s called the forgetfulness property. I can&#8217;t remember.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The exponential distribution has the quirky property of having no memory. Before we wade into the math and see why,&#8230; <a class=\"read-more\" href=\"https:\/\/www.clayford.net\/statistics\/the-forgetful-exponential-distribution\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-continuous-distributions","category-probability"],"_links":{"self":[{"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":3,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":855,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/posts\/36\/revisions\/855"}],"wp:attachment":[{"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.clayford.net\/statistics\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}