{"id":323,"date":"2008-05-04T21:50:30","date_gmt":"2008-05-05T02:50:30","guid":{"rendered":"http:\/\/unitstep.net\/?p=323"},"modified":"2008-05-04T23:12:35","modified_gmt":"2008-05-05T04:12:35","slug":"the-fallacy-of-adding-probabilities","status":"publish","type":"post","link":"https:\/\/unitstep.net\/blog\/2008\/05\/04\/the-fallacy-of-adding-probabilities\/","title":{"rendered":"The fallacy of adding probabilities"},"content":{"rendered":"

I’m an avid reader of Maximum PC<\/a> and have had a subscription since they were known as boot<\/cite> back in the late 90’s. (I’ve remained a subscriber despite the fact that they put most of their content online, a good move nonetheless, but I still like the printed version). They’re fairly accurate in most of their reviews and I respect them for both this and their useful guides and other features.<\/p>\n

However, when reading their review of the FragBox II<\/a>, I came across an interesting quote about failure rates: (Emphasis mine)<\/p>\n

So why would Falcon configure RAM in single-channel mode? Falcon gave us three reasons for this decision: There\u00e2\u20ac\u2122s only a minimal performance advantage to running dual-channel mode with this box; RAM is the second-most-likely component to fail (the GPU is first), so using just one DIMM cuts the chance of failure in half…<\/strong><\/p><\/blockquote>\n

The emphasized part of the statement is wrong in the general case. But why?<\/p>\n

<\/p>\n

Common mistakes<\/h3>\n

It seems to be common sense that if you have one device, with a failure rate of p<\/i> (within a given time period), that using two of them will double your chances of failure. However, some quick inspection proves that this isn’t the case. For example, using this line of thinking would mean that having three of the devices in use would triple your chances of failure. Eventually, with enough devices in use, the chances of failure would grow larger than 100%, an impossibility. <\/p>\n

Looking at it another way, just because you are using two devices, each with an expected failure rate of 50% within a given time frame, does not guarantee that at least one will fail within that time period.<\/p>\n

Looking at it a different way<\/h3>\n

This leads us to the actual question: What is the expected failure rate with two DIMMs as compared to with just one? First of all, let’s do some quick definitions. Let p<\/i> denote the probability that a single DIMM will fail within a given time period. Thus, (1-p)<\/i> is the probability that it will not<\/em> fail.<\/p>\n

\r\nPr(DIMM failure) = p\r\nPr(DIMM does not fail) = 1-p\r\n<\/pre>\n

Moving to the case of two DIMMs in operation, we want to find the probability that at least one of them fails<\/em>; since both are required for operation, at least one failing can be considered “failure” in this case. It isn’t readily apparent how we’d figure out the probability that at least one would fail of the two, so let’s break it down:<\/p>\n

\r\nPr(at least one fail) = 1 - Pr(none of them fail)\r\n<\/pre>\n

We can obtain the probability that at least one fails from the probability that neither of them fails, since these are mutually exclusive<\/a> events.<\/p>\n

\r\nPr(none of them fail) = (1-p)2<\/sup>\r\n= 1 - 2p + p2<\/sup>\r\n<\/pre>\n

This expression can be derived if we assume that DIMM failures are independent events<\/a>. Thus,<\/p>\n

\r\nPr(at least one fail) = 1 - Pr(none of them fail)\r\n= 1 - (1 - 2p + p2<\/sup>)\r\n= 2p - p2<\/sup> >= p\r\n<\/pre>\n

From this, we conclude that the chances of failure (at least one DIMM failing) for two DIMMs is indeed higher than for one DIMM, since p<\/i> <= 1. In fact, the chances of failure for two DIMMs is never<\/em> double the chances of failure for one DIMM, unless the probability of failure is 0.<\/p>\n

For further inspection, let us calculate the difference between the two failure rates, that is, how much more likely two DIMMs are to fail over just one:<\/p>\n

\r\nIncrease in probability of failure = Pr(at least one fail of two DIMMs) - Pr(DIMM failure)\r\n= 2p - p2<\/sup> - p\r\n= p - p2<\/sup>\r\n<\/pre>\n

Taking the derivative of this function yields the expression (1 – 2p)<\/i>, which has a global maximum at p = 0.5<\/i>. At this value of p<\/i>, the increase in the likelihood of failure is:<\/p>\n

\r\np - p2<\/sup>\r\n= (0.5) - (0.5)2<\/sup>\r\n= 0.25\r\n<\/pre>\n

Thus, for a single-DIMM failure rate of 50%, using two will dramatically increase the expected overall failure rate to 75%. However I’d expect that failure rates on DIMMs are quite low, and for very low values of p<\/i> (or very high values), the difference is actually quite minimal.<\/p>\n

Going back to the original statement…<\/h3>\n

So, we’ve ascertained that the failure rates are never double for the situation described. However, in actual practical situations, the results are quite close. I’ve already suggested that failure rates for DIMMs are quite low, that is p<\/i> is usually very close to 0. In order for the two-DIMM failure rate to be double that of a single-DIMM, we would have to have:<\/p>\n

\r\nPr(at least one fail of two DIMMs) = 2*Pr(DIMM failure)\r\n<\/pre>\n

Substituting in the expressions derived above, we have:<\/p>\n

\r\n2p - p2<\/sup> = 2*p ?\r\n<\/pre>\n

Obviously, this expression is never true, unless p = 0<\/i>. However, for very small values of p<\/i>, the expression is close to being true, that is, the difference approaches 0:<\/p>\n

\r\nlim(p -> 0) 2p - p2<\/sup> - 2*p = 0\r\n= lim(p -> 0) p2<\/sup> = 0\r\n<\/pre>\n

Thus, for very small rates of failure, the statement of failure rates doubling is approximately<\/em> true.<\/p>\n

Update: More details<\/h3>\n

More specifically, this is a case of figuring out the probability of the union<\/em> of two events. For any two events, A<\/i> and B<\/i>, the probability of their union is:<\/p>\n

\r\nPr(A ∪ B) = Pr(A) + Pr(B) - Pr(A ∩ B)\r\n<\/pre>\n

Where Pr(A ∩ B)<\/i> is the probability of the intersection<\/em> of the two events, that is, the probability that both occur. For the above problem, the expression reduces to:<\/p>\n

\r\nPr(A ∪ B) = Pr(at least one DIMM fails)\r\n= Pr(DIMM failure) + Pr(DIMM failure) - Pr(Both DIMMs fail)\r\n= p + p - p2<\/sup>\r\n= 2p - p2<\/sup>\r\n<\/pre>\n

Which is the same expression we arrived at before. As noted before, for very small values of p<\/i>, this is approximately equal to 2p<\/i>, or double the original failure rate.<\/p>","protected":false},"excerpt":{"rendered":"

I’m an avid reader of Maximum PC and have had a subscription since they were known as boot back in the late 90’s. (I’ve remained a subscriber despite the fact that they put most of their content online, a good move nonetheless, but I still like the printed version). They’re fairly accurate in most of […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[55,219,222],"tags":[220,453,223,454,221],"_links":{"self":[{"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/posts\/323"}],"collection":[{"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":0,"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"wp:attachment":[{"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitstep.net\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}