# The Combined-Unified Hybrid Censored Samples from Pareto Distribution: Estimation and Properties
## 4 Bayesian Estimation: MCMC Method  
In the Bayesian approach, the risk functions are chosen depending on how one measures the distance between the estimate and the unknown parameter. To perform the Bayesian analysis, usually we use loss the squared error (SE) loss function as  
\[L_{SE}(g(\varphi),\hat{g}(\varphi))=(g(\varphi)-\hat{g}(\varphi))^{2}, \tag{37}\]  
where \(\hat{g}(\varphi)\) is an estimate of \(g(\varphi)\) and the Bayes estimate of \(g(\varphi)\) using the SE loss function is given by  
\[\hat{g}_{SE}(\varphi)=E_{\varphi}[g(\varphi)|\kappa_{\tau;n}]. \tag{38}\]  
In this section, we use the Metropolis Hastings algorithm within Gibbs sampling approach for generating random samples from the conditional densities of the parameters and use them to get the Bayian estimates and interval (HPD credible intervals) estimates of the unknown parameters. The unknown parameters \(k\) and \(\alpha\) are assigned independent gamma distributions. Then, the joint prior distribution for \(k\) and \(\alpha\), is given by  
\[\pi(k,\alpha)=\frac{b^{a}}{\Gamma(a)}k^{a-1}\exp[-bk]*\frac{d^{c}}{\Gamma(c)} \alpha^{c-1}\exp[-d\alpha],\quad a,b,c,d>0. \tag{39}\]  
Then, the posterior distributrion of \(k\) and \(\alpha\), is given by  
\[\pi^{*}(k,\alpha) = \frac{L\pi(k,\alpha)}{\int_{a}\int_{k}L\pi(k,\alpha)\delta k \alpha} \tag{40}\] \[= \frac{\alpha^{\tau}k^{n\alpha}\big{(}\Upsilon^{n-\tau}\prod_{i=1 }^{\tau}x_{i:n}\big{)}^{-\alpha}k^{a-1}\exp[-bk]\alpha^{c-1}\exp[-d\alpha]}{ \int_{a}\int_{k}\alpha^{\tau}k^{n\alpha}\big{(}\Upsilon^{n-\tau}\prod_{i=1}^ {\tau}x_{i:n}\big{)}^{-\alpha}k^{a-1}\exp[-bk]\alpha^{c-1}\exp[-d\alpha]\delta k \alpha}.\]  
In the following algorithm, we apply Metropolis Hastings (M-H) technique with normal proposal distribution for generainge samples from these distributions.  
1. Start with initial values of the parameters \((k^{(0)},\alpha^{(0)})\). Then, set \(i=1\);
2. Generate \(k^{(*)},\alpha^{(*)}\) using the proposal distributions \(N(k^{(i-1)},Var(\hat{k}))\) and \(N(\alpha^{(i-1)},\)\(Var(\hat{\alpha}))\), respectively, such that \(Var(\hat{k})\) and \(Var(\hat{\alpha})\) are given in (3.21);
3. Compute the acceptance probability \(r=min\bigg{(}1,\frac{\pi^{*}(k^{(i)},\alpha^{(i)})}{\pi^{*}(k^{(i-1)},\alpha^ {(i-1)})}\bigg{)}\);
4. Generate \(U\) from uniform (0, 1);
5. Accept the proposal distribution and set \(\Big{(}k^{(i)},\alpha^{(i)}\Big{)}=\Big{(}k^{(*)},\alpha^{(*)}\Big{)}\) if \(U<r\). Otherwise, reject the proposal distribution and set \(\Big{(}k^{(i)},\alpha^{(i)}\Big{)}=\Big{(}k^{(i-1)},\alpha^{(i-1)}\Big{)}\);
6. Set \(i=i+1\);
7. Repeat Steps 2-6, M times, and obtain \(k^{(i)}\) and \(\alpha^{(i)}\) for \(i=1,...,M\).  
By using the generated random samples from the Gibbs sampling procedure with \(N\) unburn units, then [PERSON] estimate of the parameters using the squared error loss functions are \[\hat{k}=\frac{1}{M-N}\sum_{i=N+1}^{M}k^{(i)},\qquad\hat{\alpha}=\frac{1}{M-N}\sum _{i=N+1}^{M}\alpha^{(i)},\]  
\[\hat{R}(t)=\frac{1}{M-N}\sum_{i=N+1}^{M}\left(\frac{k^{(i)}}{t}\right)^{\alpha^ {(i)}},\text{ and }\hat{H}(t)=\frac{1}{M-N}\sum_{i=N+1}^{M}\frac{\alpha^{(i)}}{t}.\]  
**MCMC HPD credible interval Algorithm:**  
1. Arrange the values of \(k^{(*)},\alpha^{(*)},R^{(*)}\) and \(H^{(*)}\) in increasing magnitude;
2. Find the positions of the lower bounds which is \((M-N)*q/2\), where \(q\) is the significance, then determine the lower bounds of \(k,\alpha,R\) and \(H\);
3. Find the positions of the upper bounds which is \((M-N)*(1-q/2)\), then determine the upper bounds of \(k,\alpha,R\) and \(H\);
4. Repeat the above steps \(M\) times. Find the average value of the lower and upper bounds MCMC HPD credible interval of \(k,\alpha,R\) and \(H\).