**4.1. Learning — The beliefs and approach for its improvement**

( ) ( )

*d k B gr O hd k*

() , ( )

( ) ( )

We first present the method of evaluating Pr{*Bgr*,*sm*(*sm*;*Ok* )≥*dgr*,*sm*(*k*)} as follows.

( ) ( ) ( )

³ =

*B sm O e*

, ,

*B sm O e B gr O e*

1


, Pr ( )

1 1

( ( ))

<sup>2</sup> <sup>2</sup> , ,

*sm k gr k T T gr sm*

*sm k*

( ) ( ) ,

*e hd k e*

ì ü <sup>=</sup> í ý <sup>³</sup> î þ

*k gr sm k sm*

() , ( )

,

144 Dynamic Programming and Bayesian Inference, Concepts and Applications

*gr sm*

,

*rd k*

*gr sm*

{ ( ) }

*B sm O d k*

, ,

*gr sm k gr sm*

Pr ; ( )

Pr

With similar reasoning, we have,

**environments**

signal is observed.

( ) ( ) , 1

( ) ( ) , 1

2 , <sup>2</sup> <sup>2</sup> , ,

, ( ) ( )

*gr sm <sup>T</sup> <sup>T</sup>*

( )

*T*

ì ü ï ï í ý ³ ï ï <sup>+</sup> î þ

Then, the method of evaluating probability terms in equation (57) is given in appendix 2.

{ ( ) } ( ( )) <sup>2</sup> <sup>2</sup> , , ( ) ( ) , , , Pr ; ( ) Pr *k gr sm k sm <sup>T</sup> <sup>T</sup> gr sm k gr sm gr sm B gr O d k e r d k e* ì ü ³= ³ í ý

**4. An application for fault detection in uni-variate statistical quality control**

In a uni-variate quality control environment, if we limit ourselves to apply a control charting method, most of the information obtained from data behavior will be ignored. The main aim of a control charting method is to detect quickly undesired faults in the process. However, we may calculate the belief for the process being out-of-control applying Bayesian rule at any iteration in which some observations on the quality characteristic are gathered. Regarding these beliefs and a stopping rule, we may find and specify a control threshold for these beliefs and when the updated belief in any iteration is more than this threshold, an out-of-control

In Decision on Beliefs, first, all probable solution spaces will be divided into several candidates (the solution is one of the candidates), then a belief will be assigned to each candidate consid‐

The method of determining the minimum acceptable belief is given in appendix 2.

*k gr sm k gr sm k sm*

*d k B gr O*

*gr sm gr k*

1 () , *gr sm sm k*

*d k B sm O*

*d k B sm O*

*gr sm sm k*

1 () , *gr sm gr k*

, 1

, 1



<sup>=</sup> - (55)

<sup>=</sup> - (56)

*d k*

î þ (58)

(57)

For simplicity, individual observation on the quality characteristic of interest in any iteration of data gathering process was gathered. At iteration k of data gathering process, *Ok* =(*x*1, *x*2, ......, *xk* )was defined as the observation vector where resemble observations for previous iterations 1, 2, …, *k*. After taking a new observation, *Ok-1* the belief of being in an outof-control state is defined as *B*(*xk* , *Ok* <sup>−</sup>1) =Pr{*Out* −*of* −*control* | *xk* , *Ok* <sup>−</sup>1}. At this iteration, we want to update the belief of being in out-of-control state based on observation vector *Ok* <sup>−</sup><sup>1</sup> and new observation *xk* . If we define *B*(*Ok* <sup>−</sup>1) = *B*(*xk* <sup>−</sup>1, *Ok* <sup>−</sup>2) as the prior belief of an out-of-control state, in order to update the posterior belief *B*(*xk* , *Ok* <sup>−</sup>1), since we may assume that the observations are taken independently in any iteration, then we will have

$$\Pr\left\{\mathbf{x}\_k \middle| \mathbf{Out} - \mathbf{of} - \text{control}, \mathbf{O}\_{k-1}\right\} = \Pr\left\{\mathbf{x}\_k \middle| \mathbf{Out} - \text{of} - \text{control}\right\} \tag{59}$$

With this feature, the updated belief is obtained using Bayesian rule:

$$\begin{aligned} \text{Pr}(\mathbf{x}\_k, O\_{k-1}) &= \text{Pr}\{\text{Out}-of-\text{control}\} \mathbf{x}\_k, O\_{k-1} = \frac{\text{Pr}\{\text{Out}-of-\text{control}, \mathbf{x}\_k\} O\_{k-1} \}}{\text{Pr}\{\mathbf{x}\_k\} O\_{k-1}} \\ &= \frac{\text{Pr}\{\text{Out}-of-\text{control}\} O\_{k-1} \} \text{Pr}\{\mathbf{x}\_k\} \text{Out}-of-\text{control}, O\_{k-1} \} \end{aligned} \tag{60}$$

Since in-control or out-of-control state partition the decision space, we can write equation (60) as

$$\begin{split} \operatorname{B}(\mathbf{x}\_{k}, \mathcal{O}\_{k-1}) &= \frac{\operatorname{Pr}(\operatorname{Out} - \operatorname{of} - \operatorname{control} \| \mathcal{O}\_{k-1}) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{Out} - \operatorname{of} - \operatorname{control} \}}{\operatorname{Pr}(\operatorname{Out} - \operatorname{of} - \operatorname{control} \| \mathcal{O}\_{k-1}) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{Out} - \operatorname{of} - \operatorname{control} \} + \operatorname{Pr} \{ \operatorname{In} - \operatorname{control} \| \mathcal{O}\_{k-1}) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{In} - \operatorname{control} \}} \\ &= \frac{\operatorname{B}(\operatorname{O}\_{k-1}) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{Out} - \operatorname{of} - \operatorname{control} \}}{\operatorname{B}(\operatorname{O}\_{k-1}) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{Out} - \operatorname{of} - \operatorname{control} \} + (\operatorname{1} - \operatorname{B}(\operatorname{O}\_{k-1})) \operatorname{Pr} \{ \mathbf{x}\_{k} \| \operatorname{In} - \operatorname{control} \}} \end{split} \tag{61}$$

Assuming the quality characteristic of interest follows a normal distribution with mean μ and variance σ<sup>2</sup> , we use equation (61) to calculate both beliefs for occurring positive or negative shifts in the process mean μ.
