### 统计代写|贝叶斯分析代写Bayesian Analysis代考|MSH3

statistics-lab™ 为您的留学生涯保驾护航 在代写贝叶斯分析Bayesian Analysis方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写贝叶斯分析Bayesian Analysis代写方面经验极为丰富，各种代写贝叶斯分析Bayesian Analysis相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|The posterior expected loss

We have defined the risk function as the expectation of the loss function given the parameter, namely
$$R(\theta)=E(L(\hat{\theta}, \theta) \mid \theta)=\int L(\hat{\theta}(y), \theta) f(y \mid \theta) d y .$$
Conversely, we now define the posterior expected loss (PEL) as the expectation of the loss function given the data, and we denote this function by
$$P E L(y)=E{L(\hat{\theta}, \theta) \mid y}=\int L(\hat{\theta}(y), \theta) f(\theta \mid y) d \theta .$$
Then, just as the risk function can be used to compute the Bayes risk according to
$$r=E L(\hat{\theta}, \theta)=E E{L(\hat{\theta}, \theta) \mid \theta}=E R(\theta)=\int R(\theta) f(\theta) d \theta,$$
so also can the PEL be used, but with the formula
$$r=E L(\hat{\theta}, \theta)=E E{L(\hat{\theta}, \theta) \mid y}=E{P E L(y)}=\int \operatorname{PEL}(y) f(y) d y .$$
Note: Both of these formulae for the Bayes risk use the law of iterated expectation, but with different conditionings.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|The Bayes estimate

The Bayes estimate (or estimator) is defined to be the choice of the function $\hat{\theta}=\hat{\theta}(y)$ for which the Bayes risk $r=E L(\hat{\theta}, \theta)$ is minimised. This estimator has the smallest overall expected loss over all estimators under the specified loss function $L(\hat{\theta}, \theta)$.

In many cases, the procedure for finding a Bayes estimate can be considerably simplified by considering which estimate minimises the posterior expected loss function, $P E L(y)=E{L(\hat{\theta}, \theta) \mid y}$.

If we can find an estimate $\hat{\theta}=\hat{\theta}(y)$ which minimises $\operatorname{PEL}(y)$ for all possible values of the data $y$, then that estimate must also minimise the Bayes risk.

This is because the Bayes risk may be written as a weighted average of the PEL, namely
$$r=E L(\hat{\theta}, \theta)=E E{L(\hat{\theta}, \theta) \mid y}=E{P E L(y)}=\int \operatorname{PEL}(y) f(y) d y .$$
Exercise 2.10 Bayes estimate under the QELF
Find the Bayes estimate under the quadratic error loss function.
Solution to Exercise 2.10
\text { Observe that } \quad \begin{aligned} P E L(y) &=E\left{(\hat{\theta}-\theta)^{2} \mid y\right}=E\left{\hat{\theta}^{2}-2 \hat{\theta} \theta+\theta^{2} \mid y\right} \ &=\hat{\theta}^{2}-2 \hat{\theta} E(\theta \mid y)+E\left(\theta^{2} \mid y\right) \ &=[\hat{\theta}-E(\theta \mid y)]^{2}-{E(\theta \mid y)}^{2}+E\left(\theta^{2} \mid y\right) \end{aligned}
Note: We have completed the square in $\hat{\theta}$.
We see that the PEL is a quadratic function of $\hat{\theta}$ which is clearly minimised at the posterior mean, $\hat{\theta}=E(\theta \mid y)$. So the Bayes estimate under the QELF is that posterior mean.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Inference given functions of the data

Sometimes we observe a function of the data rather than the data itself. In such cases the function typically degrades the information available in some way. An example is censoring, where we observe a value only if that value is less than some cut-off point (right censoring) or greater than some cut-off value (left censoring). It is also possible to have censoring on the left and right simultaneously. Another example is rounding, where we only observe values to the nearest multiple of $0.1,1$ or 5 , etc.
Exercise 3.I Right censoring of exponential observations
Each light bulb of a certain type has a life which is conditionally exponential with mean $m=1 / c$, where $c$ has a prior distribution which is standard exponential. We observe $n=5$ light bulbs of this type for 6 units of time, and the lifetimes are:
$$2.6,3.2, *, 1.2 \text {, * }$$
where $*$ indicates a right-censored value which is greater than 6 . (Only values less than or equal to 6 could be observed.)

Find the posterior distribution and mean of the average light bulb lifetime, $m$.

The data here is
$$D=\left{y_{1}=2.6, y_{2}=3.2, y_{3}>6, y_{4}=1.2, y_{5}>6\right} \text {, }$$
and the probability of censoring is
$$P\left(y_{i}>6 \mid c\right)=\int_{6}^{\infty} c e^{-c y_{i}} d y_{i}=e^{-6 c} .$$
Therefore the posterior density of $c$ is
\begin{aligned} f(c \mid D) & \propto f(c) f(D \mid c) \ & \propto f(c) f\left(y_{1} \mid c\right) f\left(y_{2} \mid c\right) P\left(y_{3}>6 \mid c\right) f\left(y_{4} \mid c\right) P\left(y_{5}>6 \mid c\right) \end{aligned} \begin{aligned} &\propto e^{-c}\left(c e^{-c c_{1}}\right)\left(c e^{-c y_{2}}\right)\left(e^{-6 c}\right)\left(c e^{-c y_{4}}\right)\left(e^{-6 c}\right) \ &=c^{3} \exp \left{-c\left(1+y_{1}+y_{2}+6+y_{4}+6\right)\right} \ &=c^{4-1} \exp {-c(1+2.6+3.2+6+1.2+6)} \ &=c^{4-1} \exp (-20 c) \end{aligned}
Hence:
\begin{aligned} &(c \mid D) \sim G(4,20) \ &(m \mid D) \sim I G(4,20) \ &f(m \mid D)=20^{4} m^{-(4+1)} e^{-20 / m} / \Gamma(4), m>0 \ &E(m \mid D)=20 /(4-1)=6.667 \end{aligned}
It will be observed that this estimate of $m$ is appropriately higher than the estimate obtained by simply averaging the observed values, namely
$$(1 / 3)(2.6+3.2+1.2)=2.333 \text {. }$$
The estimate $6.667$ is also higher than the estimate obtained by simply replacing the censored values with 6 , namely
$$(1 / 3)(2.6+3.2+6+1.2+6)=3.8 \text {. }$$

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|The posterior expected loss

R(θ)=和(大号(θ^,θ)∣θ)=∫大号(θ^(是),θ)F(是∣θ)d是.

r=和大号(θ^,θ)=和和大号(θ^,θ)∣θ=和R(θ)=∫R(θ)F(θ)dθ,

r=和大号(θ^,θ)=和和大号(θ^,θ)∣是=和磷和大号(是)=∫佩尔⁡(是)F(是)d是.

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|The Bayes estimate

r=和大号(θ^,θ)=和和大号(θ^,θ)∣是=和磷和大号(是)=∫佩尔⁡(是)F(是)d是.

\text { 观察到 } \quad \begin{aligned} P E L(y) &=E\left{(\hat{\theta}-\theta)^{2} \mid y\right}=E\left{\帽子{\theta}^{2}-2 \hat{\theta} \theta+\theta^{2} \mid y\right} \ &=\hat{\theta}^{2}-2 \hat{\ theta} E(\theta \mid y)+E\left(\theta^{2} \mid y\right) \ &=[\hat{\theta}-E(\theta \mid y)]^{2 }-{E(\theta \mid y)}^{2}+E\left(\theta^{2} \mid y\right) \end{对齐}\text { 观察到 } \quad \begin{aligned} P E L(y) &=E\left{(\hat{\theta}-\theta)^{2} \mid y\right}=E\left{\帽子{\theta}^{2}-2 \hat{\theta} \theta+\theta^{2} \mid y\right} \ &=\hat{\theta}^{2}-2 \hat{\ theta} E(\theta \mid y)+E\left(\theta^{2} \mid y\right) \ &=[\hat{\theta}-E(\theta \mid y)]^{2 }-{E(\theta \mid y)}^{2}+E\left(\theta^{2} \mid y\right) \end{对齐}

## 统计代写|贝叶斯分析代写Bayesian Analysis代考|Inference given functions of the data

or
5等米=1/C， 在哪里C具有标准指数的先验分布。我们观察n=5此类灯泡可使用 6 个单位时间，其寿命为：

2.6,3.2,∗,1.2, *

D=\left{y_{1}=2.6, y_{2}=3.2, y_{3}>6, y_{4}=1.2, y_{5}>6\right} \text {, }D=\left{y_{1}=2.6, y_{2}=3.2, y_{3}>6, y_{4}=1.2, y_{5}>6\right} \text {, }

F(C∣D)∝F(C)F(D∣C) ∝F(C)F(是1∣C)F(是2∣C)磷(是3>6∣C)F(是4∣C)磷(是5>6∣C)

\begin{aligned} &\propto e^{-c}\left(c e^{-c c_{1}}\right)\left(c e^{-c y_{2}}\right)\left(e ^{-6 c}\right)\left(c e^{-c y_{4}}\right)\left(e^{-6 c}\right) \ &=c^{3} \exp \left {-c\left(1+y_{1}+y_{2}+6+y_{4}+6\right)\right} \ &=c^{4-1} \exp {-c(1+ 2.6+3.2+6+1.2+6)} \ &=c^{4-1} \exp (-20 c) \end{对齐}\begin{aligned} &\propto e^{-c}\left(c e^{-c c_{1}}\right)\left(c e^{-c y_{2}}\right)\left(e ^{-6 c}\right)\left(c e^{-c y_{4}}\right)\left(e^{-6 c}\right) \ &=c^{3} \exp \left {-c\left(1+y_{1}+y_{2}+6+y_{4}+6\right)\right} \ &=c^{4-1} \exp {-c(1+ 2.6+3.2+6+1.2+6)} \ &=c^{4-1} \exp (-20 c) \end{对齐}

(C∣D)∼G(4,20) (米∣D)∼我G(4,20) F(米∣D)=204米−(4+1)和−20/米/Γ(4),米>0 和(米∣D)=20/(4−1)=6.667

(1/3)(2.6+3.2+1.2)=2.333.

(1/3)(2.6+3.2+6+1.2+6)=3.8.

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。