19th Ave New York, NY 95822, USA

# 数学代写|统计计算作业代写Statistical Computing代考|Rejection sampling

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代考|Basic rejection sampling

In this section we introduce the fundamental idea that all rejection algorithms are based on. We start by presenting the basic algorithm which forms the prototype of the methods presented later.
Algorithm 1.19 (basic rejection sampling)
input:
a probability density $g$ (the proposal density),
a function $p$ with values in $[0,1]$ (the acceptance probability) randomness used:
$X_{n}$ i.i.d. with density $g$ (the proposals),
$U_{n} \sim \mathcal{U}[0,1]$ i.i.d.

output:
a sequence of i.i.d. random variables with density
The effect of the random variables $U_{n}$ in the algorithm is to randomly decide whether to output or to ignore the value $X_{n}$ : the value $X_{n}$ is output with probability $p\left(X_{n}\right)$, and using the trick from lemma $1.9$ we use the event $\left{U \leq p\left(X_{n}\right)\right}$ to decide whether or not to output the value. In the context of rejection sampling, the random variables $X_{n}$ are called proposals. If the proposal $X_{n}$ is chosen for output, that is if $U_{n} \leq p\left(X_{n}\right)$, we say that $X_{n}$ is accepted, otherwise we say that $X_{n}$ is rejected.

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|Envelope rejection sampling

The basic rejection sampling algorithm $1.19$ from the previous section is usually applied by choosing the acceptance probabilities $p$ so that the density $f$ of the output values, given by (1.3), coincides with a given target distribution. The resulting algorithm can be written as in the following.

Algorithm 1.22 (envelope rejection sampling)
input:
a function $f$ with values in $[0, \infty)$ (the non-normalised target density),
a probability density $g$ (the proposal density),
a constant $c>0$ such that $f(x) \leq c g(x)$ for all $x$ randomness used:
$X_{n}$ i.i.d. with density $g$ (the proposals),
$U_{n} \sim \mathcal{U}[0,1]$ i.i.d.
output:
a sequence of i.i.d. random variables with density
$$\tilde{f}(x)=\frac{1}{Z_{f}} f(x) \quad \text { where } \quad Z_{f}=\int f(x) d x$$

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|Conditional distributions

The conditional distribution $P_{X \mid X \in A}$ corresponds to the remaining randomness in $X$ when we already know that $X \in A$ occurred (see equation (A.4) for details). Sampling from a conditional distribution can be easily done by rejection sampling. The basic result is the following.
Algorithm $1.25$ (rejection sampling for conditional distributions) input:
a set $A$ with $P(X \in A)>0$
randomness used:
a sequence $X_{n}$ of i.i.d. copies of $X$ (the proposals)
output:
a sequence of i.i.d. random variables with distribution $P_{X \mid X \in A}$
1: for $n=1,2,3, \ldots$ do
2: generate $X_{n}$
3: if $X_{n} \in A$ then
4: output $X_{n}$
5: end if
6: end for

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|BASIC REJECTION SAMPLING

Xn具有密度的独立同分布G 吨H和pr○p○s一种一世s,
ün∼ü[0,1]独立同居

## 数学代写|统计计算作业代写STATISTICAL COMPUTING代考|ENVELOPE REJECTION SAMPLING

Xn具有密度的独立同分布G 吨H和pr○p○s一种一世s,
ün∼ü[0,1]iid

F~(X)=1和FF(X) 在哪里 和F=∫F(X)dX

1：对于n=1,2,3,…做
2：生成Xn
3：如果Xn∈一种然后
4：输出Xn
5: 结束 if
6: 结束 for