19th Ave New York, NY 95822, USA

# 数学代写|统计计算作业代写Statistical Computing代考|The Metropolis–Hastings method

my-assignmentexpert™统计计算Statistical Computing作业代写，免费提交作业要求， 满意后付款，成绩80\%以下全额退款，安全省心无顾虑。专业硕 博写手团队，所有订单可靠准时，保证 100% 原创。my-assignmentexpert™， 最高质量的统计计算Statistical Computing作业代写，服务覆盖北美、欧洲、澳洲等 国家。 在代写价格方面，考虑到同学们的经济条件，在保障代写质量的前提下，我们为客户提供最合理的价格。 由于统计Statistics作业种类很多，同时其中的大部分作业在字数上都没有具体要求，因此统计计算Statistical Computing作业代写的价格不固定。通常在经济学专家查看完作业要求之后会给出报价。作业难度和截止日期对价格也有很大的影响。

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

• 随机微积分 Stochastic calculus
• 随机分析 Stochastic analysis
• 随机控制理论 Stochastic control theory
• 微观经济学 Microeconomics
• 数量经济学 Quantitative Economics
• 宏观经济学 Macroeconomics
• 经济统计学 Economic Statistics
• 经济学理论 Economic Theory
• 计量经济学 Econometrics

## 数学代写|统计计算作业代写Statistical Computing代考|Continuous state space

In its general form, the Metropolis-Hastings method can be used on nearly arbitrary state spaces. In order to avoid technical complications, we do not give the general form of the algorithm here but, instead, consider the most important special cases separately. In this section, we will discuss the case where the state space is $S=\mathbb{R}^{d}$. The following section considers the case of finite or countable state space.
Algorithm 4.2 (Metropolis-Hastings method for continuous state space) input:
a probability density $\pi$ (the target density)
a transition density $p: S \times S \rightarrow[0, \infty)$
$$X_{0} \in{x \in S \mid \pi(x)>0}$$
randomness used:
independent samples $Y_{j}$ from the transition density $p$ (the proposals) $U_{j} \sim \mathcal{U}[0,1]$ i.i.d.
output:
a sample of a Markov chain $X$ with stationary density $\pi$.
As an abbreviation we define a function $\alpha: S \times S \rightarrow[0,1]$ by
$$\alpha(x, y)=\min \left(\frac{\pi(y) p(y, x)}{\pi(x) p(x, y)}, 1\right)$$

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|Discrete state space

In this section, we state the Metropolis-Hastings algorithm for discrete state spaces. The algorithm for this case is obtained from algorithm $4.2$ by replacing densities with probability weights. Since the situation of discrete state is less technically challenging, here we prove a slightly better result than we did for the continuous case in proposition 4.3.
Algorithm 4.4 (Metropolis-Hastings method for discrete state space) input:
a probability vector $\pi \in \mathbb{R}^{S}$ (the target distribution)
a transition matrix $P=\left(p_{x y}\right){x, y \in S}$ $X{0} \in S$ with $\pi_{X_{0}}>0$
randomness used:
independent samples $Y_{j}$ from the transition matrix $P$ (the proposals) $U_{j} \sim \mathcal{U}[0,1]$ i.i.d.
output:
a sample of a Markov chain $X$ with stationary distribution $\pi$.
As an abbreviation we define a function $\alpha: S \times S \rightarrow[0,1]$ by
$$\alpha(x, y)=\min \left(\frac{\pi_{y} p_{y x}}{\pi_{x} p_{x y}}, 1\right)$$

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|Random walk Metropolis sampling

The random walk Metropolis algorithm discussed in this section is an important special case of the Metropolis-Hastings algorithm. It can be considered both for the continuous and for the discrete case; here we restrict ourselves to the continuous case and refer to example $4.8$ for an illustration of the corresponding discrete case.

The Metropolis-Hastings method for the case $p(x, y)=p(y, x)$ is called the Metropolis method. In this case, the expression for the acceptance probability $\alpha$ simplifies to
$$\alpha(x, y)=\min \left(\frac{\pi(y) p(y, x)}{\pi(x) p(x, y)}, 1\right)=\min \left(\frac{\pi(y)}{\pi(x)}, 1\right)$$

for all $x, y \in S$ with $\pi(x)>0$ (or $\pi_{y} / \pi_{x}$ for discrete state space). The condition $p(x, y)=p(y, x)$ is, for example, satisfied when the proposals $Y_{j}$ are constructed as
$$Y_{j}=X_{j-1}+\varepsilon_{j}$$
where the $\varepsilon_{j}$ are i.i.d. with a symmetric distribution (i.e. $\varepsilon_{j}$ has the same distribution as $-\varepsilon_{j}$ ). We only state the version of the resulting algorithm for continuous state space $S$, the discrete version is found by using a probability vector instead of a density for the target distribution.

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|CONTINUOUS STATE SPACE

Metropolis-Hastings 方法的一般形式可以用于几乎任意的状态空间。为了避免技术上的复杂性，我们在这里不给出算法的一般形式，而是分别考虑最重要的特殊情况。在本节中，我们将讨论状态空间为小号=Rd. 以下部分考虑有限或可数状态空间的情况。

X0∈X∈小号∣圆周率(X)>0

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|DISCRETE STATE SPACE

a probability density $\pi$ (the target density)
a transition density $p: S \times S \rightarrow[0, \infty)$
$$X_{0} \in{x \in S \mid \pi(x)>0}$$
randomness used:
independent samples $Y_{j}$ from the transition density $p$ (the proposals) $U_{j} \sim \mathcal{U}[0,1]$ i.i.d.
output:
a sample of a Markov chain $X$ with stationary density $\pi$.
As an abbreviation we define a function $\alpha: S \times S \rightarrow[0,1]$ by
$$\alpha(x, y)=\min \left(\frac{\pi(y) p(y, x)}{\pi(x) p(x, y)}, 1\right)$$