# A Bayesian Control Chart for Monitoring Process Variance
## 5 Process Simulations  
The out-of-control variance detection performance of our proposed Bayesian EWMA variance chart is further evaluated under the normal process, exponential process, and the mixed process of normal and exponential distribution. The process with mixed distribution demonstrates a situation where the process sometimes is normally distributed and sometimes is exponentially distributed, both with the same variance but with different skewness. For any normal distribution with standard deviation \(\sigma\), while \(\sigma\) shifts to \(d\sigma\), the probability that statistic \(Y_{j}\) is larger than \(\sigma^{2}\) can be computed as:  
\[ \begin{array}{ll}p_{N}&=P\Big{(}Y_{j}>\sigma^{2}\Big{|}\,X_{2j},\ X_{2j-1} \sim Normal\left(\mu,\ (d\sigma)^{2}\right)\Big{)}\\ &=P\bigg{(}\frac{\left(X_{2j}-X_{2j-1}\right)^{2}}{2}>\sigma^{2}\Big{|}\,X_{2 j},\ X_{2j-1}\sim Normal\left(\mu,\ (d\sigma)^{2}\right)\bigg{)}\\ &=2\times\left(1-\Phi\left(\frac{1}{d}\right)\right),\end{array}  \tag{33}\]  
where \(\Phi(. )\) represents the cumulative probability function of a standard normal variable and \(d\) represents a shift factor. Panel A of Table 6 presents the relationship between \(d\) and \(p\) in the normal process to look at how \(p\) varies with the shifts of process variance. For any exponential distribution with standard deviation \(\sigma\), while \(\sigma\) shifts to \(d\sigma\), the probability that statistic \(Y_{j}\) is larger than \(\sigma^{2}\) can be computed as:  
\[ \begin{array}{ll}p_{E}&=P\Big{(}Y_{j}>\sigma^{2}\Big{|}\,X_{2j},\ X_{2j-1} \sim Exponential\left(\frac{1}{d\sigma}\right)\Big{)}\\ &=P\bigg{(}\frac{\left(X_{2j}-X_{2j-1}\right)^{2}}{2}>\sigma^{2}\Big{|}\,X_{2 j},\ X_{2j-1}\sim Exponential\left(\frac{1}{d\sigma}\right)\bigg{)}\\ &=e^{-\sqrt{2}/d},\end{array}  \tag{34}\]  
where \(d\) represents a shift factor. Panel B of Table 6 presents the relationship between \(d\) and \(p\) in the exponential process to look at how \(p\) varies with the shifts of process variance. Both processes in Table 6 indicate that \(p\) is positively associated with \(d\). Suppose that the mixed process is an equally-weighted mixture of a normal distribution and exponential distribution with same variance \(\sigma^{2}\). Thus, for the mixed distribution  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline  & \(p_{0}=E_{0}(p)=0.3333\) & & \(p_{0}=E_{0}(p)=0.3151\) & & \(p_{0}=E_{0}(p)=0.2500\) & & \(p_{0}=E_{0}(p)=0.2424\) \\ \cline{2-11} \multirow{2}{*}{\(p_{1}/\)} & **Bayesian** & **SS** & \multirow{2}{*}{**EWMA-**} & **Bayesian** & **SS** & \multirow{2}{*}{**EWMA-**} & **Bayesian** & **SS** & \multirow{2}{*}{**EWMA-**} & **SS** & \multirow{2}{*}{**EWMA-**} & **Bayesian** & **SS** \\  & **EWMA** & & & **E1(p)** & & **Chart** & & **V Chart** & & **E1(p)** & & **Chart** & **V Chart** & \\ \cline{1-1}  & **Chart** & &  
with standard deviation \(\sigma\), while \(\sigma\) shifts to \(d\sigma\), the probability that statistic \(\gamma j\) is larger than \(\sigma^{2}\) is expressed as:  
\[p_{M}=\frac{p_{N}+p_{E}}{2}. \tag{35}\]  
Because probability \(p_{N}\) is the same for any normal distribution, the in-control normal process is set a standard normal distribution in the following simulations, without loss of generality. Similarly, probability \(p_{E}\) is the same for any exponential distribution, so the in-control exponential process is set an exponential distribution with standard deviation 1, without loss of generality. The following simulation procedure will be applied to three processes to evaluate the performance of the proposed Bayesian EWMA variance chart:  
1. Set the process variance \(\sigma^{2}\) equal to 1;
2. \(\alpha_{0}\) and \(\beta_{0}\) are chosen such that \(E_{0}(p)\) is as close to 0.3173 as possible in the normal process (0.2431 in the exponential process or 0.2802 in the mixed process);
3. \(k_{1}\) and \(k_{2}\) are determined by the procedure described in Section 4.1;
4.