Abstract
The prior distribution is the probability distribution we have before observing data. Using Bayes' rule, we can compute the posterior distribution, the new probability distribution, after observing data. Computing the posterior distribution is much easier than before by using Excel VBA macro. In addition, we can conveniently compute the successive updating posterior distributions after observing the independent and sequential outcomes. In this paper we compose some Excel VBA macros for applying Bayes' rule and give some examples.
베이즈 법칙에서는 사전확률과 우도가 주어지고 어떤 실험결과가 일어났을 때 사후확률을 계산한다. 이러한 사후확률의 계산 문제를 엑셀 매크로를 이용하여 쉽게 계산할 수 있다. 또한 일련의 독립적이고 연속적인 실험결과에 따르는 사후확률도 편리하게 계산할 수 있다. 특히, 엑셀 매크로를 작성하면 작업창에서 반복된 계산의 입력과 출력이 쉽게 이루어진다. 본 논문에서는 베이즈 법칙의 활용을 위해서 엑셀 매크로를 작성하고 그것의 사용 예를 들었다.