# 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|MATH565

## 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|Vector Acceptance–Rejection Method

The acceptance-rejection Algorithm $2.3 .6$ is directly applicable to the multidimensional case. We need only to bear in mind that the random variable $X$ (see Line 3 of Algorithm 2.3.6) becomes an $n$-dimensional random vector X. Consequently, we need a convenient way of generating $\mathbf{X}$ from the multidimensional proposal pdf $g(\mathbf{x})$, for example, by using the vector inverse-transform method. The next example demonstrates the vector version of the acceptance-rejection method.

We want to generate a random vector $\mathbf{Z}$ that is uniformly distributed over an irregular n-dimensional region $G$ (see Figure 2.7). The algorithm is straightforward:

1. Generate a random vector, $\mathbf{X}$, uniformly distributed in $W$, where $W$ is a regular region (multidimensional hypercube, hyperrectangle, hypersphere, hyperellipsoid, etc.).
2. If $\mathbf{X} \in G$, accept $\mathbf{Z}=\mathbf{X}$ as the random vector uniformly distributed over $G$; otherwise, return to Step 1.

As a special case, let $G$ be the $n$-dimensional unit ball, that is, $G=\left{\mathbf{x}: \sum_i x_i^2 \leqslant\right.$ $1}$, and let $W$ be the $n$-dimensional hypercube $\left{-1 \leqslant x_i \leqslant 1\right}_{i=1}^n$. To generate a random vector that is uniformly distributed over the interior of the $n$-dimensional unit ball, we generate a random vector $\mathbf{X}$ that is uniformly distributed over $W$ and then accept or reject it, depending on whether it falls inside or outside the $n$-dimensional ball. The corresponding algorithm is as follows:

Remark 2.5.1 Tu generale a randum vector that is uniformly distribuled over the surface of an $n$-dimensional unit ball – in other words, uniformly over the unit sphere $\left{\mathbf{x}: \sum_i x_i^2=1\right}$ – we need only to scale the vector $\mathbf{X}$ such that it has unit length. That is, we return $\mathbf{Z}=\mathbf{X} / \sqrt{R}$ instead of $\mathbf{X}$.

The efficiency of the vector acceptance rejection method is equal to the ratio
$$\frac{1}{C}=\frac{\text { volume of the hyperball }}{\text { volume of the hypercube }}=\frac{1}{n 2^{n-1}} \frac{\pi^{n / 2}}{\Gamma(n / 2)},$$
where the volumes of the ball and cube are $\frac{\pi^{n / 2}}{(n / 2) \Gamma(n / 2)}$ and $2^n$, respectively. Note that for even $n(n=2 m)$ we have
$$\frac{1}{C}=\frac{\pi^m}{m ! 2^{2 m}}=\frac{1}{m !}\left(\frac{\pi}{2}\right)^m 2^{-m} \rightarrow 0 \text { as } m \rightarrow \infty$$
In other words, the acceptance-rejection method grows inefficient in $n$, and is asymptotically useless.

## 数学代写|模拟和蒙特卡洛方法作业代写simulation and monte carlo method代考|GENERATING POISSON PROCESSES

This section treats the generation of Poisson processes. Recall from Section $1.12$ that there are two different (but equivalent) characterizations of a Poisson process $\left{N_t, t \geqslant 0\right}$. In the first (see Definition 1.12.1), the process is interpreted as a counting measure, where $N_t$ counts the number of arrivals in $[0, t]$. The second characterization is that the interarrival times $\left{A_i\right}$ of $\left{N_t, t \geqslant 0\right}$ form a renewal process, that is, a sequence of iid random variables. In this case, the interarrival times have an $\operatorname{Exp}(\lambda)$ distribution, and we can write $A_i=-\frac{1}{\lambda} \ln U_i$, where the $\left{U_i\right}$ are iid $\mathrm{U}(0,1)$ distributed. Using the second characterization, we can generate the arrival times $T_i=A_1+\cdots+A_i$ during the interval $[0, T]$ as follows:

The first characterization of a Poisson process, that is, as a random counting measure, provides an alternative way of generating such processes, which works also in the multidimensional case. In particular (see the end of Section 1.12), the following procedure can be used to generate a homogeneous Poisson process with rate $\lambda$ on any set $A$ with “volume” $|A|$ :

A nonhomogeneous Poisson process is a counting process $N=\left{N_t, t \geqslant 0\right}$ for which the number of points in nonoverlapping intervals are independent $-$ similar to the ordinary Poisson process – but the rate at which points arrive is time dependent. If $\lambda(t)$ denotes the rate at time $t$, the number of points in any interval $(b, c)$ has a Poisson distribution with mean $\int_b^c \lambda(t) \mathrm{d} t$

Figure $2.9$ illustrates a way to construct such processes. We first generate a twodimensional homogeneous Poisson process on the strip ${(t, x), t \geqslant 0,0 \leqslant x \leqslant \lambda}$, with constant rate $\lambda=\max \lambda(t)$, and then simply project all points below the graph of $\lambda(t)$ onto the $t$-axis.

# 模拟和蒙特卡洛方法代考

## 数学代写|模拟和蒙特卡洛方法作业代写模拟和蒙特卡罗方法代考|向量接受-拒绝方法

.

1. 生成一个随机向量$\mathbf{X}$，均匀分布在$W$中，其中$W$是一个规则区域(多维超立方体、超矩形、超球、超椭球等)。
2. 设$\mathbf{X} \in G$，接受$\mathbf{Z}=\mathbf{X}$为均匀分布在$G$上的随机向量;

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: