### 统计代写|金融统计代写financial statistics代考| Simulation

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

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

## 统计代写|金融统计代写financial statistics代考|Linear Congruential Generator

One of the most common pseudo random number generators is the linear congruential generator which uses a recurrence scheme to generate numbers:
\begin{aligned} &N_{i}=\left(a N_{i-1}+b\right) \bmod M \ &U_{i}=N_{i} / M \end{aligned}
where $N_{i}$ is the sequence of pseudo random numbers and $(a, b, M)$ are generatorspecific integer constants. mod is the modulo operation, $a$ the multiplier and $b$ the increment, $a, b, N_{0} \in 0,1, \ldots, M-1$ with $a \neq 0$.

The linear congruential generator starts choosing an arbitrary seed $N_{0}$ and will always produce an identical sequence from that point on. The maximum amount of different numbers the formula can produce is the modulus $M$. The pseudo random variables $N_{i} / M$ are uniformly distributed.

The period of a general linear congruential generator $N_{i}$ is at most $M$, but in most cases it is less than that. The period should be large in order to ensure randomness, otherwise a small set of numbers can make the outcome easy to forecast. It may be convenient to set $M=2^{32}$, since this makes the computation of $a N_{i-1}+b \bmod M$ quite efficient.

In particular, $N_{0}=0$ must be ruled out in case $b=0$, otherwise $N_{i}=0$ would repeat. If $a=1$, the sequence is easy to forecast and the generated sets are:
$$N_{n}=\left(N_{0}+n b\right) \bmod M$$
The linear congruential generator will have a full period if, Knuth (1997):

1. $b$ and $M$ are prime.
2. $a-1$ is divisible by all prime factors of $M$.
3. $a-1$ is a multiple of 4 if $M$ is a multiple of 4 .
4. $M>\max \left(a, b, N_{0}\right)$.
5. $a>0, b>0$.
Exactly, when the period is $M$, a grid point on a lattice over the interval $[0,1]$ with size $\frac{1}{M}$ is occupied once.

## 统计代写|金融统计代写financial statistics代考|Fibonacci Generators

Another example of pseudo random number generators is the Fibonacci generators, whose aim is to improve the standard linear congruential generator. These are based on a Fibonacci sequence:
$$N_{i+1}=N_{i}+N_{i-1} \bmod M$$
This recursion formula is related to the Golden ratio. The ratio of consecutive Fibonacci numbers $\frac{F(n+1)}{F(n)}$ converges to the golden ratio $\gamma$ as the limit, defined as one solution equal to $\frac{1+\sqrt{5}}{2}=1.6180$ of the equation $x=1+\frac{1}{x}$.

The original formula is a three term recursion, which is not appropriate for generating random numbers. The modified approach, the lagged Fibonacci generator is defined as
$$N_{i+1}=N_{i-v}+N_{i-\mu} \bmod M$$
for any $v, \mu \in \mathbb{N}$.
The quality of the outcome for this algorithm is sensitive to the choice of the initial values, $v$ and $\mu$. Any maximum period of the lagged Fibonacci generator has a large number of different possible cycles. There are methods where a cycle can be chosen, but this might endanger the randomness of future outputs and statistical defects may appear.

## 统计代写|金融统计代写financial statistics代考|Inversion Method

Many programming languages can generate pseudo-random numbers which are distributed according to the standard uniform distribution and whose probability is the length $b-a$ of the interval $(a, b) \in(0,1)$. The inverse method is a method of sampling a random number from any probability distribution, given its cumulative distribution function (cdf).

Suppose $U_{i} \sim U[0,1]$ and $F(x)$ a strictly increasing continuous distribution then $X_{i} \sim F$, if $X_{i}=F^{-1}\left(U_{i}\right) .$
Proof
$$P\left(X_{i} \leq x\right)=P\left{F^{-1}\left(U_{i}\right) \leq x\right}=P\left{U_{i} \leq F(x)\right}=F(x)$$
Usually $F^{-1}$ is often hard to calculate, but the problem can be solved using transformation methods. Suppose that $X$ is a random variable with the density function $f(x)$ and the distribution function $F(x)$. Further assume $h$ be strictly monotonous, then $Y=h(X)$ has the distribution function $F\left{h^{-1}(y)\right}$. If $h^{-1}$ is continuous, then for all $y$ the density of $h(X)$ is, Härdle and Simar (2012):
$$f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|$$
Example 6.4 Apply the transformation method in the exponential case. The density of an exponential function is $f_{Y}(y)=\lambda \exp {-\lambda y} I(y \geq 0)$ with $\lambda \geq 0$, and its inverse is equal to $h^{-1}(y)=\exp {-\lambda y}$ for $y \geq 0$. Define $y=h(x)=-\lambda^{-1} \log x$ with $x>0$. We would like to know whether $X \sim U[0,1]$ leads to an exponentially distributed random variable $Y \sim \exp (\lambda)$.
Using the definition of the transformation method, we have
$$f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|=|(-\lambda) \exp {-\lambda y}|=\lambda \exp {-\lambda y}$$
Hence $f_{Y}(y)$ is exponentially distributed.

## 统计代写|金融统计代写financial statistics代考|Linear Congruential Generator

ñ一世=(一种ñ一世−1+b)反对米 在一世=ñ一世/米

ñn=(ñ0+nb)反对米

1. b和米是素数。
2. 一种−1能被所有素因数整除米.
3. 一种−1如果是 4 的倍数米是 4 的倍数。
4. 米>最大限度(一种,b,ñ0).
5. 一种>0,b>0.
确切地说，当周期是米, 格子上的一个网格点在区间上[0,1]有大小1米被占用一次。

## 统计代写|金融统计代写financial statistics代考|Fibonacci Generators

ñ一世+1=ñ一世+ñ一世−1反对米

ñ一世+1=ñ一世−在+ñ一世−μ反对米

## 统计代写|金融统计代写financial statistics代考|Inversion Method

P\left(X_{i} \leq x\right)=P\left{F^{-1}\left(U_{i}\right) \leq x\right}=P\left{U_{i} \leq F(x)\right}=F(x)P\left(X_{i} \leq x\right)=P\left{F^{-1}\left(U_{i}\right) \leq x\right}=P\left{U_{i} \leq F(x)\right}=F(x)

f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|

f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|= |(-\lambda) \exp {-\lambda y}|=\lambda \exp {-\lambda y}f_{Y}(y)=f_{X}\left{h^{-1}(y)\right}\left|\frac{d h^{-1}(y)}{d y}\right|= |(-\lambda) \exp {-\lambda y}|=\lambda \exp {-\lambda y}

## 有限元方法代写

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