During $200$ test demands zero failures were discovered. What is the posterior probability that the software meets the business requirement?

73 Views Asked by At

A business software system is required to achieve at most $1$ failure in $1000$ demands (this is equivalent to a probability on demand: $pfd=10^{-3}$). The business manager wants to to evaluate the system before delivery using a combination of expert judgement about the process applied in its development and failure data collected during testing.

From an analysis of the development process applied, the business manager believes that there is a $70$% chance that the system will meet the requirement and a $30$% chance it is an order of magnitude worse than that ($pfd=10^{-2}$). If the $pfd$ can take two values only, this is expressed as the prior:

$P(pfd=10^{-3})=0.7$

$P(pfd=10^{-2})=0.3$

The testing process is assumed to compromise of a sequence of independent test demands, each of which can result in failure or success.

The likelihood of observing $f$ failures in $d$ tests is defined by the binomial distribution conditioned on the number of demands, $d$, and the $pfd$. Thus:

$P(f|d,pfd)=\frac{d!}{f!(d-f)!}(pfd)^{f}(1-pfd)^{d-f}$

The posterior distribution for $pfd$, using the Bayes theorem, is:

$P(pfd|d,f)=\frac{P(f|pfd,d)P(pfd)}{P(f)}$

$a)$ State the formula needed to calculate the marginal probability of $P(f).$

$b)$ During $200$ test demands zero failures were discovered. What is the posterior probability that the software meets the business requirement?

$My$ $Working:$

Let $F$ be random variable representing number of failures in $d$ number of tests. then:

$Pr(success)=0.7$ ; $Pr(failure)=0.3$

$a)$ Honestly I don't even know how to begin with. There is only one random variable involved as far as I understand, but the question is asking for marginal distribution which exists when there are at least two random variables involved.

$b)$ Since there are zero failures, this means $pfd=0.7$ and From the given binomial distribution we obtain: $P(0|200,0.7)=\frac{200!}{0!(200-0)!}0.7^{0}(1-0.7)^{200-0} = 0.3^{200}$; Plugging this value in posterior distribution gives:

$P(0.7|200,0)=\frac{P(0|0.7,200)P(pfd)}{P(0)}$

I think I am jumping here and there. I am not sure whether my calculations are right. Any help and guidance will be appreciated

1

There are 1 best solutions below

5
On BEST ANSWER

From the binomial distribution, you have $P(f=0 \mid pfd, n=200) = (1-pfd)^{200}$

and a prior of $P(pfd=10^{-3})=0.7$ and $P(pfd=10^{-2})=0.3$

Since $P(f) = \sum\limits_k P(f \mid pfd_k, n=200) P(pfd_k)$

you get a posterior distribution of $$P(pfd=10^{-3} \mid f=0, n=200)=\dfrac{0.7 \times (1-10^{-3})^{200}}{0.7 \times (1-10^{-3})^{200}+0.3 \times (1-10^{-2})^{200}}$$ which is about $0.934$