A couple of blog entries ago I described the Poisson Distribution and its applicability to software testing. A close cousin to the Poisson Distribution is the Exponential Distribution. Both distributions may arise when you have a situation with items arriving randomly and independently (this is called a Poisson Process). Examples could include HTTP connection requests arriving at a Web server, and bug reports arriving at a bug tracking database. The Poisson Distribution describes the number of items arriving in a given time interval. The Exponential Distribution describes the time between arrivals. Suppose that HTTP connections arrive at a Web server, on average, at a rate of one every 15 minutes. Suppose your standard unit of time is one hour. So, the arrival rate is 4 arrivals per hour. This is the rate parameter and is usually given the symbol lambda. The Exponential Distribution can be used to answer questions such as, "What is the probability that, after a particular HTTP request, the next request arrives within 30 minutes or less?" The Exponential Distribution can be constructed using the following equation: the probability that the "next" arrival occurs less than or equal to some time t equals 1 minus e raised to the minus lambda times t power, where lambda is the rate parameter and e is Euler’s constant = 2.718281828 approximately. For example, the probability that the next arrival in my example above (where lambda equals 4.0) occurs within 30 minutes (= 0.5 hrs.) of any particular arrival is 1 – (e raised to the -4.0 * 0.5) = 0.8647 approximately. The screenshot below shows some examples with lambda equal to 4.0 arrivals per hour. For example, after any given arrival, the probability that the next arrival occurs in 6 minutes (i.e., 1/10 of an hour) or less is 0.3297. A mildly tricky part of using both the Exponential and Poisson distributions is keeping your units straight. In my example, the basic unit of time is one hour. But I could have recast everything so that the basic unit of time is 15 minutes (in which case lambda would be 1.0 arrival per 15 minutes). During my years as a software tester, I didn’t have to use the Poisson and Exponential distributions very often, but when I did need them, using these distributions was very important. Should knowledge of the Poisson and Exponential distributions be a part of every software tester’s skill set? Probably not. But should every software system testing effort have one or two testers who understand these two distributions? In most cases, probably yes.

Advertisements
(function(g){if("undefined"!=typeof g.__ATA){g.__ATA.initAd({sectionId:26942, width:300, height:250});
g.__ATA.initAd({sectionId:114160, width:300, height:250});}})(window);
var o = document.getElementById('crt-1067975493');
if ("undefined"!=typeof Criteo) {
var p = o.parentNode;
p.style.setProperty('display', 'inline-block', 'important');
o.style.setProperty('display', 'block', 'important');
Criteo.DisplayAcceptableAdIfAdblocked({zoneid:388248,containerid:"crt-1067975493",collapseContainerIfNotAdblocked:true,"callifnotadblocked": function () {var o = document.getElementById('crt-1067975493'); o.style.setProperty('display','none','important');o.style.setProperty('visbility','hidden','important'); }
});
} else {
o.style.setProperty('display', 'none', 'important');
o.style.setProperty('visibility', 'hidden', 'important');
}