---
title: "Bayesian analysis with threshold data"
canonical: "https://modelassist.epixanalytics.com/space/EA/26575401/Bayesian%20analysis%20with%20threshold%20data"
format: markdown
---
We are often faced with data which says that an observation was above or below a threshold, rather than an exact value. The analysis requires that we work with [cumulative distribution functions](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26574886/) F(x) in the [likelihood function](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575381/).

 

##### Example: Mean time to failure (MTTF) of a component

|  |
| --- |
| 10 components of the same type are run for 3000 hours and 4 fail within that time. Assuming that the components have a constant [instantaneous failure rate](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575632/), what is the MTTF? |

 

Components with a constant instantaneous failure rate fail according to a [Poisson process](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575359) and therefore have a lifetime that is Exponentially distributed with a mean defined as the MTTF. The probability *p* that a component with MTTF = q hours will fail within 3000 hours is given by the cumulative distribution function of the [Exponential](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575227/):

 

*p* = [EXPONDIST](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575570/)(3000,1/q,1) = 1-EXP(-3000/q)

 

Assuming that all components are manufactured in the same ways, and tested separately, each component will fail independently of the others, so they all undergo the same [binomial trials](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26574954/). The probability that 4 fail in 10 is therefore:

 

<span style="color: #000000">P(4 fail from 10) = BINOMDIST(4,10,</span><span style="color: #000000">*p*</span><span style="color: #000000">,0)</span>

The model [MTTF](#MTTF) constructs the posterior distribution assuming an uninformed prior p(q) µ 1/q. The prior distribution, likelihood function and posterior distribution, all re-scaled for comparison, are shown in Figure 1.

 

![image](media://0680e404-88ac-46c9-b28a-c6539fa0a99c)

<span style="color: #000000">**Figure 1**</span><span style="color: #000000">: Prior density, likelihood function and posterior density</span>  
<span style="color: #000000"> for MTTF example plotted to have same graph area for comparison</span>

 

<span style="color: #000000">It is quite interesting to split up the likelihood function into the information provided by knowing how many failed and how many did not, and look at how much information is contained in the two halves:</span>

 

The likelihood function for the failed components is proportional to p<sup>4</sup>

The likelihood function for the non-failed components is proportional to (1-p)<sup>6</sup>

 

<span style="color: #000000">Figure 2 plots these two components together with the composite likelihood function, all rescaled for comparison:</span>

 

![image](media://75bf9e6b-796d-4362-b8ee-71eff7ead310)

Figure 2: The failed components provide information that tightly pulls (has higher probability)  
 the MTTF estimate to lower values, while the components that didn't fail  
 give a looser pull to the right, resulting in the likelihood function  
 that is bound by both pulls.

 

> Macro (anchor)



The links to the MTTF software specific models are provided here:

<details>
<summary>Crystal Ball</summary>

> Macro (inline-media-image)

 [MTTF](/wiki/download/attachments/26579343/MTTF-CB.xlsx?version=1&modificationDate=1506113496000&cacheVersion=1&api=v2)
</details>

<details>
<summary>@Risk</summary>

> Macro (inline-media-image)

 [MTTF](/wiki/download/attachments/26581760/MTTF-AtRISK.xlsx?version=1&modificationDate=1506097517000&cacheVersion=1&api=v2)
</details>

 

---