### 统计代写|应用随机过程代写Stochastic process代考| Forecasting stationary behavior

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

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• Advanced Probability Theory 高等楖率论
• Advanced Mathematical Statistics 高等数理统计学
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 统计代写|应用随机过程代写Stochastic process代考|Forecasting stationary behavior

Often interest lies in the stationary distribution of the chain. For a low-dimensional chain where the exact formula for the equilibrium probability distribution can be derived, this is straightforward.

Example 3.5: Suppose that $K=2$ and $\boldsymbol{P}=\left(\begin{array}{cc}p_{11} & 1-p_{11} \ 1-p_{22} & p_{22}\end{array}\right)$. Then the equilibrium probability of being in state 1 can easily be shown to be
$$\pi_{1}=\frac{1-p_{22}}{2-p_{11}-p_{22}}$$
and the predictive equilibrium distribution is
$$E\left[\pi_{1} \mid \mathbf{x}\right]=\int_{0}^{1} \int_{0}^{1} \frac{1-p_{22}}{2-p_{11}-p_{22}} f\left(p_{11}, p_{22} \mid \mathbf{x}\right) \mathrm{d} x$$
which can be evaluated by simple numerical integration techniques.
Example 3.6: In the Sydney rainfall example, we have
$$E\left[\pi_{1} \mid \mathbf{x}\right]=E\left[\frac{1-p_{22}}{2-p_{11}-p_{22}} \mid \mathbf{x}\right]=0.655$$
so that we predict that it does not rain on approximately $65 \%$ of the days at this weather center.

For higher dimensional chains, it is simpler to use a Monte Carlo approach as earlier so that given a Monte Carlo sample $\boldsymbol{P}^{(1)}, \ldots, \boldsymbol{P}^{(S)}$ from the posterior distribution of $\boldsymbol{P}$, then the equilibrium distribution can be estimated as
$$E[\pi \mid \mathbf{x}] \approx \frac{1}{S} \sum_{s=1}^{s} \pi^{(s)}$$
where $\pi^{(s)}$ is the stationary distribution associated with the transition matrix $\boldsymbol{P}^{(s)}$.

## 统计代写|应用随机过程代写Stochastic process代考|Model comparison

One may often wish to test whether the observed data are independent or generated from a first (or higher) order Markov chain. The standard method of doing this is via Bayes factors (see Section 2.2.2).

Example 3.7: Given the experiment proposed at the start of section 3.2, suppose that we wish to compare the Markov chain model $\left(\mathcal{M}_{1}\right)$ with the assumption that the data

are independent and identically distributed with some distribution $\mathbf{q}=\left(q_{1}, \ldots, q_{K}\right)$, $\left(\mathcal{M}{2}\right)$ where we shall assume a Dirichlet prior distribution, $$\mathbf{q} \sim \operatorname{Dir}\left(a{1}, \ldots, a_{K}\right)$$
Then,
\begin{aligned} f\left(\mathbf{x} \mid \mathcal{M}{1}\right) &=\int{f=1} f(\mathbf{x} \mid \boldsymbol{P}) f\left(\boldsymbol{P} \mid \mathcal{M}{1}\right) \mathrm{d} \boldsymbol{P} \ &=\prod{i=1}^{k} \frac{\Gamma\left(\alpha_{i}\right)}{\Gamma\left(n_{i-}+\alpha_{i}\right)} \prod_{j=1}^{k} \frac{\Gamma\left(\alpha_{i j}+n_{i j}\right),}{\Gamma\left(\alpha_{i j}\right)} \end{aligned}
where $n_{i=}=\sum_{j=1}^{k} n_{i j}$ and $\alpha_{i-}=\sum_{j=1}^{K} \alpha_{i j}$. Also, under the independent model, we have
$$f\left(\mathbf{x} \mid \mathcal{M}{2}\right)=\frac{\Gamma(a)}{\Gamma(a+n)} \prod{i=1}^{K} \frac{\Gamma\left(a_{i}+n_{i}\right)}{\Gamma\left(a_{i}\right)}$$
where $a=\sum_{i=1}^{K} a_{i}$ and $n_{i}$ is the number of times that event $i$ occurs (discounting the initial state $X_{0}$ ). The Bayes factor can now be calculated as the ratio of the two marginal likelihood functions, as illustrated.

## 统计代写|应用随机过程代写Stochastic process代考|Unknown initial state

When the initial state, $X_{0}$, is not fixed in advance, to implement Bayesian inference, we need to define a suitable prior distribution for $X_{0}$. The standard approach is simply to assume a multinomial prior distribution, $P\left(X_{0}=x_{0} \mid \theta\right)=\theta_{x_{0}}$ where $0<\theta_{k}<1$ and

$\sum_{k=1}^{K} \theta_{k}=1$. Then, we can define a Dirichlet prior for the multinomial parameters, $\operatorname{say} \theta \sim \operatorname{Dir}(\gamma)$ so that, a posteriori, $\theta \mid \mathbf{x} \sim \operatorname{Dir}\left(\gamma^{\prime}\right)$, with $\gamma_{x_{0}}^{\prime}=\gamma_{x_{0}}+1$ and, otherwise, $\gamma_{i}^{\prime}=\gamma_{i}$ for $i \neq x_{0}$. Inference for $\boldsymbol{P}$ then proceeds as before.

An alternative approach, which may be reasonable if it is assumed that the chain has been running for some time before the start of the experiment, is to assume that the initial state is generated from the equilibrium distribution, $\pi$, of the Markov chain. Then, making the dependence of $\pi$ on $\boldsymbol{P}$ obvious, the likelihood function becomes
$$l(\boldsymbol{P} \mid \mathbf{x})=\pi\left(x_{0} \mid \boldsymbol{P}\right) \prod_{i=1}^{K} \prod_{j=1}^{K} p_{i j}^{n_{i j}} .$$
In this case, simple conjugate inference is impossible but, given the same prior distribution for $\boldsymbol{P}$ as above, it is straightforward to generate a Monte Carlo sample of size $S$ from the posterior distribution of $\boldsymbol{P}$ using, for example, a rejection sampling algorithm as follows:
For $s=1, \ldots, S$ :
For $i=1, \ldots, K$, generate $\tilde{\mathbf{p}}{i} \sim \operatorname{Dir}\left(\alpha^{\prime}\right)$ with $\alpha^{\prime}$ as in (3.4). Set $\tilde{\boldsymbol{P}}$ to be the transition probability matrix with rows $\tilde{p}{1}, \ldots, \tilde{p}{K}$. Calculate the stationary probability function $\tilde{\pi}$ satisfying $\tilde{\pi}=\tilde{\pi} \tilde{\boldsymbol{P}}$. Generate $u \sim \mathrm{U}(0,1)$. If $u<\tilde{\pi}\left(x{0}\right)$, set $\mathbf{P}^{(s)}=\tilde{\boldsymbol{P}}$. Otherwise repeat from step $1 .$

## 统计代写|应用随机过程代写Stochastic process代考|Model comparison

F(X∣米1)=∫F=1F(X∣磷)F(磷∣米1)d磷 =∏一世=1ķΓ(一种一世)Γ(n一世−+一种一世)∏j=1ķΓ(一种一世j+n一世j),Γ(一种一世j)

F(X∣米2)=Γ(一种)Γ(一种+n)∏一世=1ķΓ(一种一世+n一世)Γ(一种一世)

## 统计代写|应用随机过程代写Stochastic process代考|Unknown initial state

∑ķ=1ķθķ=1. 然后，我们可以为多项式参数定义 Dirichlet 先验，说⁡θ∼目录⁡(C)因此，后验，θ∣X∼目录⁡(C′)， 和CX0′=CX0+1并且，否则，C一世′=C一世为了一世≠X0. 推断磷然后像以前一样进行。

l(磷∣X)=圆周率(X0∣磷)∏一世=1ķ∏j=1ķp一世jn一世j.

## 有限元方法代写

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 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。