In the early 1700’s, English mathematician and Presbyterian minister Thomas Bayes derived the eponymous mathematical theorem that allows us to calculate the probability of an event occurring based on prior knowledge of conditions that might be related to the event.

The theorem can be stated as follows:

P(A|B) = P(B|A) * P(A) / P(B)

where:

P(A|B) is the probability of A given that B has occurred

P(B|A) is the probability of B given that A has occurred

P(A) is the prior probability of A occurring

P(B) is the prior probability of B occurring

Bayes Theorem is commonly used in medical testing to calculate the probability of a patient having a disease or condition based on the results of a diagnostic test. For example, let’s say a medical test is used to detect a certain disease, and the test has a sensitivity of 90% and a specificity of 95%. This means that if a person has the disease, the test will correctly identify them as positive 90% of the time, and if a person does not have the disease, the test will correctly identify them as negative 95% of the time.

Now suppose that the disease has a prevalence rate in the general population of 1%. If a person tests positive for the disease, what is the probability that they have it? We can use Bayes Theorem to calculate this probability:

P(Disease|Positive Test) = P(Positive Test|Disease) * P(Disease) / P(Positive Test)

where:

P(Disease|Positive Test) is the probability of having the disease given a positive test result

P(Positive Test|Disease) is the probability of a positive test result given the presence of the disease (i.e., the sensitivity)

P(Disease) is the prevalence rate of the disease in the population being tested

P(Positive Test) is the overall probability of a positive test result, which can be calculated as:

P(Positive Test) = P(Positive Test|Disease) * P(Disease) + P(Positive Test|No Disease) * P(No Disease)

where:

P(Positive Test|No Disease) is the probability of a positive test result given the absence of the disease (i.e., 1 – specificity)

P(No Disease) is the complement of the disease prevalence rate (i.e., 1 – P(Disease))

Plugging in the numbers, we get:

P(Disease|Positive Test) = 0.9 * 0.01 / (0.9 * 0.01 + 0.05 * 0.99) = 0.15

So even with a test that has a relatively high sensitivity and specificity, the probability of having the disease given a positive test result is only 15%. This underscores the importance of considering the prevalence of a disease in the population being tested when interpreting the results of a diagnostic test.

In quality engineering, Bayes Theorem can be used to improve process control by updating the probability of a process being in control or out of control based on new information. For example, suppose a manufacturing process produces parts with a certain diameter. If the process is in control, the diameter of the parts will be within a certain range. However, if the process is out of control, the diameter of the parts will be outside that range. By monitoring the diameter of the parts over time and applying Bayes Theorem, it is possible to update the probability of the process being in control or out of control and take corrective action if necessary.

In reliability engineering, Bayes Theorem can be used to update the probability of a component failing based on new information. For example, suppose a company produces a certain type of electronic component and wants to know the probability of a component failing after a certain amount of use. The company can use data from previous failures to estimate the prior probability of failure. If the company then tests a sample of components and finds that none have failed after a certain amount of use, Bayes Theorem can be used to update the probability of failure and improve the reliability of the component.

By understanding Bayes Theorem, we can employ new data such as test results to update our probability estimates of certain event occurring. As a result, this theorem is useful across a range of disciplines from financial analysis to weather predictions, and everything in between.

## Author’s Biography:

Ray Harkins is the Quality and Technical Manager for Ohio Star Forge in Warren, Ohio. He earned his Master of Science from Rochester Institute of Technology and his Master of Business Administration from Youngstown State University. He also teaches manufacturing and business-related skills through the online learning platform, Udemy.Click on the following coupon codes to receive substantial discounts on his courses, or reach out to him via LinkedIn at linkedin.com/in/ray-harkins or by email at the.mfg.acad@gmail.com.

## Leave a Reply