统计代写|数值分析和优化代写numerical analysis and optimazation代考|Forward and Backward Error Analysis

如果你也在 怎样代写数值分析和优化numerical analysis and optimazation这个学科遇到相关的难题,请随时右上角联系我们的24/7代写客服。

数值分析是根据数学模型提出的问题,建立求解问题的数值计算方法并进行方法的理论分析,直到编制出算法程序上机计算得到数值结果,以及对结果进行分析。

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

我们提供的数值分析和优化numerical analysis and optimazation及其相关学科的代写,服务范围广, 其中包括但不限于:

  • Statistical Inference 统计推断
  • Statistical Computing 统计计算
  • Advanced Probability Theory 高等楖率论
  • Advanced Mathematical Statistics 高等数理统计学
  • (Generalized) Linear Models 广义线性模型
  • Statistical Machine Learning 统计机器学习
  • Longitudinal Data Analysis 纵向数据分析
  • Foundations of Data Science 数据科学基础
统计代写|数值分析和优化代写numerical analysis and optimazation代考|Forward and Backward Error Analysis

统计代写|数值分析和优化代写numerical analysis and optimazation代考|Forward and Backward Error Analysis

Forward error analysis examines how perturbations of the input propagate. For example, consider the function $f(x)=x^{2}$. Let $x^{}=x(1+\delta)$ be the representation of $x$, then squaring both sides gives $$ \begin{aligned} \left(x^{}\right)^{2} &=x^{2}(1+\delta)^{2} \
&=x^{2}\left(1+2 \delta+\delta^{2}\right) \
& \approx x^{2}(1+2 \delta)
\end{aligned}
$$
because $\delta^{2}$ is small. This means the relative error is approximately doubled. Forward error analysis often leads to pessimistic overestimates of the error, especially when a sequence of calculations is considered and in each calculation the error of the worst case is assumed. When error analyses were first performed, it was feared that the final error could be unacceptable, because of the accumulation of intermediate errors. In practice, however, errors average out. An error in one calculation gets reduced by an error of opposite sign in the next calculation.

Backward error analysis examines the question: How much error in input would be required to explain all output error? It assumes that an approximate

solution to a problem is good if it is the exact solution to a nearby problem. Returning to our example, the output error can be written as
$$
[f(x)]^{}=\left(x^{2}\right)^{}=x^{2}(1+\rho),
$$
where $\rho$ denotes the relative error in the output such that $\rho \leq u$. As $\rho$ is small, $1+\rho>0$. Thus there exists $\tilde{\rho}$ such that $(1+\tilde{\rho})^{2}=1+\rho$ with $|\tilde{\rho}|<|\rho| \leq u$, since $(1+\tilde{\rho})^{2}=1+2 \tilde{\rho}+\tilde{\rho}^{2}=1+\tilde{\rho}(2+\tilde{\rho})$. We can now write
$$
\begin{aligned}
{[f(x)]^{*} } &=x^{2}(1+\tilde{\rho})^{2} \
&=f[x(1+\tilde{\rho})]
\end{aligned}
$$
If the backward error is small, we accept the solution, since it is the correct solution to a nearby problem.

Another reason for the preference which is given to backward error analysis is that often the inverse of a calculation can be performed much easier than the calculation itself. Take for example
$$
f(x)=\sqrt{x}
$$
with the inverse
$$
f^{-1}(y)=y^{2}
$$

统计代写|数值分析和优化代写numerical analysis and optimazation代考|Loss of Significance

Consider
$$
\begin{aligned}
x_{1}^{}+x_{2}^{} &=x_{1}\left(1+\delta_{1}\right)+x_{2}\left(1+\delta_{2}\right) \
&=x_{1}+x_{2}+\left(x_{1} \delta_{1}+x_{2} \delta_{2}\right) \
&=x_{1}+x_{2}+\left(\epsilon_{1}+\epsilon_{2}\right)
\end{aligned}
$$
Note how the error build-up in addition and subtraction depends on the absolute errors $\epsilon_{1}$ and $\epsilon_{2}$ in representing $x_{1}, x_{2}$, respectively. In the worst case scenario $\epsilon_{1}$ and $\epsilon_{2}$ have the same sign, i.e., the absolute error in $x_{1}^{}+x_{2}^{}$ is no worse than $\left|\epsilon_{1}\right|+\left|\epsilon_{2}\right|$.

Using the fact that $\left(-x_{2}\right) =-x_{2}-\epsilon_{2}$ we get that the absolute error in $x_{1}^{}-x_{2}^{*}$ is also no worse than $\left|\epsilon_{1}\right|+\left|\epsilon_{2}\right|$. However, the relative error is
$$
\frac{\left|\epsilon_{1}\right|+\left|\epsilon_{2}\right|}{x_{1}-x_{2}}
$$

Suppose we calculate $\sqrt{10}-\pi$ using a computer with precision $p=6$. Then $\sqrt{10} \approx 3.16228$ with absolute error of about $2 \times 10^{-6}$ and $\pi \approx 3.14159$ with absolute error of about $3 \times 10^{-6}$. The absolute error in the result $\sqrt{10}-\pi \approx$ $0.02069$ is about $5 \times 10^{-6}$. However, calculating the relative error, we get approximately
$$
5 \times 10^{-6} / 0.02068 \ldots \approx 2 \times 10^{-4} .
$$
This means that the relative error in the subtraction is about 100 times as big as the relative error in $\sqrt{10}$ or $\pi$.

This problem is known as loss of significance. It can occur whenever two similar numbers of equal sign are subtracted (or two similar numbers of opposite sign are added). If possible it should be avoided programmatically. We will see an example of how to do so later when discussing robustness.

As another example with the same precision $p=6$, consider the numbers $x_{1}=1.00000$ and $x_{2}=9.99999 \times 10^{-1}$. The true solution of $x_{1}-x_{2}=$ $0.000001$. However, when calculating the difference, the computer first adjusts the magnitude such that both $x_{1}$ and $x_{2}$ have the same magnitude. This way $x_{2}$ becomes $0.99999$. Note that we have lost one digit in $x_{2}$. The computed result is $1.00000-0.99999=0.00001$ and the absolute error is $\mid 0.000001-$ $0.00001 \mid=0.000009$. The relative error is $0.000009 / 0.000001=9$. We see that the relative error has become as large as the base minus one. The following theorem generalizes this for any base.

统计代写|数值分析和优化代写numerical analysis and optimazation代考| Robustness

An algorithm is described as robust if for any valid data input which is reasonably representable, it completes successfully. This is often achieved at the expense of time. Robustness is best illustrated by example. We consider the quadratic equation $a x^{2}+b x+c=0$. Solving it seems to be a very elementary problem. Since it is often part of a larger calculation, it is important that it is implemented in a robust way, meaning that it will not fail and give reasonably accurate answers for any coefficients $a, b$ and $c$ which are not too close to overflow or underflow. The standard formula for the two roots is
$$
x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} .
$$

A problem arises if $b^{2}$ is much larger than $|4 a c|$. In the worst case the difference in the magnitudes of $b^{2}$ and $|4 a c|$ is so large that $b^{2}-4 a c$ evaluates to $b^{2}$ and the square root evaluates to $b$, and one of the calculated roots lies at zero. Even if the difference in magnitude is not that large, one root is still small. Without loss of generality we assume $b>0$ and the small root is given by
$$
x=\frac{-b+\sqrt{b^{2}-4 a c}}{2 a}
$$
We note that there is loss of significance in the numerator. As we have seen before, this can lead to a large relative error in the result compared to the relative error in the input. The problem can be averted by manipulating the formula in the following way:
$$
\begin{aligned}
x &=\frac{-b+\sqrt{b^{2}-4 a c}}{2 a} \times \frac{-b-\sqrt{b^{2}-4 a c}}{-b-\sqrt{b^{2}-4 a c}} \
&=\frac{b^{2}-\left(b^{2}-4 a c\right)}{2 a\left(-b-\sqrt{b^{2}-4 a c}\right)} \
&=\frac{-2 c}{b+\sqrt{b^{2}-4 a c}} .
\end{aligned}
$$
Now quantities of similar size are added instead of subtracted.
Taking $a=1, b=100000$ and $c=1$ and as accuracy $2 \times 10^{-10}$, Equation (1.3) gives $x=-1.525878906 \times 10^{-5}$ for the smaller root while (1.4) gives $x=-1.000000000 \times 10^{-5}$, which is the best this accuracy allows.

In general, adequate analysis has to be conducted to find cases where numerical difficulties will be encountered, and a robust algorithm must use an appropriate method in each case.

统计代写|数值分析和优化代写numerical analysis and optimazation代考|Forward and Backward Error Analysis

数值分析代写

统计代写|数值分析和优化代写numerical analysis and optimazation代考|Forward and Backward Error Analysis

前向误差分析检查输入的扰动如何传播。例如,考虑函数F(X)=X2. 让X=X(1+d)代表X,然后对两边进行平方得到(X)2=X2(1+d)2 =X2(1+2d+d2) ≈X2(1+2d)
因为d2是小。这意味着相对误差大约增加了一倍。前向误差分析通常会导致对误差的悲观高估,特别是在考虑一系列计算并且在每次计算中假设最坏情况的误差时。当第一次进行错误分析时,人们担心最终的错误可能是不可接受的,因为中间错误的累积。然而,在实践中,错误是平均的。一次计算中的错误会因下一次计算中的相反符号错误而减少。

后向错误分析检查了以下问题:解释所有输出错误需要多少输入错误?它假设一个近似值

一个问题的解决方案是好的,如果它是对附近问题的精确解决方案。回到我们的例子,输出误差可以写成
[F(X)]=(X2)=X2(1+ρ),
在哪里ρ表示输出中的相对误差,使得ρ≤在. 作为ρ是小,1+ρ>0. 因此存在ρ~这样(1+ρ~)2=1+ρ和|ρ~|<|ρ|≤在, 自从(1+ρ~)2=1+2ρ~+ρ~2=1+ρ~(2+ρ~). 我们现在可以写
[F(X)]∗=X2(1+ρ~)2 =F[X(1+ρ~)]
如果后向误差很小,我们接受该解决方案,因为它是附近问题的正确解决方案。

优先考虑反向误差分析的另一个原因是,计算的逆运算通常比计算本身更容易执行。举个例子
F(X)=X
与逆
F−1(是)=是2

统计代写|数值分析和优化代写numerical analysis and optimazation代考|Loss of Significance

考虑
$$
\begin{aligned}
x_{1}^{ }+x_{2}^{ } &=x_{1}\left(1+\delta_{1}\right)+x_{2}\left( 1+\delta_{2}\right) \
&=x_{1}+x_{2}+\left(x_{1} \delta_{1}+x_{2} \delta_{2}\right) \
& =x_{1}+x_{2}+\left(\epsilon_{1}+\epsilon_{2}\right)
\end{aligned}
$$
注意加法和减法累积的误差如何取决于绝对值错误ε1和ε2在代表X1,X2, 分别。在最坏的情况下ε1和ε2符号相同,即 $x_{1}^{ }+x_{2}^{ }中的绝对误差一世sn这在这rs和吨H一种n\left|\epsilon_{1}\right|+\left|\epsilon_{2}\right|$。

利用这个事实(−X2)=−X2−ε2我们得到了绝对误差X1−X2∗也不比|ε1|+|ε2|. 但是,相对误差是
|ε1|+|ε2|X1−X2

假设我们计算10−圆周率精确地使用计算机p=6. 然后10≈3.16228绝对误差约为2×10−6和圆周率≈3.14159绝对误差约为3×10−6. 结果中的绝对误差10−圆周率≈ 0.02069是关于5×10−6. 然而,计算相对误差,我们得到大约
5×10−6/0.02068…≈2×10−4.
这意味着减法中的相对误差大约是减法中的相对误差的 100 倍。10或者圆周率.

这个问题被称为重要性损失。每当减去两个相似数量的等号(或添加两个相似数量的相反符号)时,就会发生这种情况。如果可能的话,应该以编程方式避免它。我们将在稍后讨论鲁棒性时看到一个如何做到这一点的示例。

作为另一个具有相同精度的示例p=6, 考虑数字X1=1.00000和X2=9.99999×10−1. 真正的解决方案X1−X2= 0.000001. 但是,在计算差值时,计算机首先会调整幅度,使得两者X1和X2具有相同的量级。这边走X2变成0.99999. 请注意,我们在X2. 计算结果为1.00000−0.99999=0.00001绝对误差是∣0.000001− 0.00001∣=0.000009. 相对误差为0.000009/0.000001=9. 我们看到相对误差已经变得与底数减一一样大。以下定理将这一点推广到任何基础。

统计代写|数值分析和优化代写numerical analysis and optimazation代考| Robustness

如果对于任何可合理表示的有效数据输入,算法成功完成,则该算法被描述为稳健。这通常是以牺牲时间为代价来实现的。稳健性最好通过示例来说明。我们考虑二次方程一种X2+bX+C=0. 解决它似乎是一个非常基本的问题。由于它通常是大型计算的一部分,因此以稳健的方式实现它很重要,这意味着它不会失败并为任何系数提供合理准确的答案一种,b和C不太接近溢出或下溢。两个根的标准公式是
X=−b±b2−4一种C2一种.

如果出现问题b2远大于|4一种C|. 在最坏的情况下,大小的差异b2和|4一种C|大到b2−4一种C评估为b2并且平方根计算为b,并且计算的根之一位于零。即使幅度上的差异不是那么大,一个根仍然很小。不失一般性,我们假设b>0小根由下式给出
X=−b+b2−4一种C2一种
我们注意到分子中的重要性有所损失。正如我们之前所见,与输入中的相对误差相比,这可能导致结果中的相对误差较大。可以通过以下方式处理公式来避免该问题:
X=−b+b2−4一种C2一种×−b−b2−4一种C−b−b2−4一种C =b2−(b2−4一种C)2一种(−b−b2−4一种C) =−2Cb+b2−4一种C.
现在相似大小的数量被添加而不是被减去。
服用一种=1,b=100000和C=1和准确性2×10−10, 等式 (1.3) 给出X=−1.525878906×10−5对于较小的根,而 (1.4) 给出X=−1.000000000×10−5,这是该精度允许的最佳值。

一般来说,必须进行充分的分析以找出会遇到数值困难的情况,并且稳健的算法必须在每种情况下使用适当的方法。

统计代写|数值分析和优化代写numerical analysis and optimazation代考 请认准statistics-lab™

统计代写请认准statistics-lab™. statistics-lab™为您的留学生涯保驾护航。统计代写|python代写代考

随机过程代考

在概率论概念中,随机过程随机变量的集合。 若一随机系统的样本点是随机函数,则称此函数为样本函数,这一随机系统全部样本函数的集合是一个随机过程。 实际应用中,样本函数的一般定义在时间域或者空间域。 随机过程的实例如股票和汇率的波动、语音信号、视频信号、体温的变化,随机运动如布朗运动、随机徘徊等等。

贝叶斯方法代考

贝叶斯统计概念及数据分析表示使用概率陈述回答有关未知参数的研究问题以及统计范式。后验分布包括关于参数的先验分布,和基于观测数据提供关于参数的信息似然模型。根据选择的先验分布和似然模型,后验分布可以解析或近似,例如,马尔科夫链蒙特卡罗 (MCMC) 方法之一。贝叶斯统计概念及数据分析使用后验分布来形成模型参数的各种摘要,包括点估计,如后验平均值、中位数、百分位数和称为可信区间的区间估计。此外,所有关于模型参数的统计检验都可以表示为基于估计后验分布的概率报表。

广义线性模型代考

广义线性模型(GLM)归属统计学领域,是一种应用灵活的线性回归模型。该模型允许因变量的偏差分布有除了正态分布之外的其它分布。

statistics-lab作为专业的留学生服务机构,多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务,包括但不限于Essay代写,Assignment代写,Dissertation代写,Report代写,小组作业代写,Proposal代写,Paper代写,Presentation代写,计算机作业代写,论文修改和润色,网课代做,exam代考等等。写作范围涵盖高中,本科,研究生等海外留学全阶段,辐射金融,经济学,会计学,审计学,管理学等全球99%专业科目。写作团队既有专业英语母语作者,也有海外名校硕博留学生,每位写作老师都拥有过硬的语言能力,专业的学科背景和学术写作经验。我们承诺100%原创,100%专业,100%准时,100%满意。

机器学习代写

随着AI的大潮到来,Machine Learning逐渐成为一个新的学习热点。同时与传统CS相比,Machine Learning在其他领域也有着广泛的应用,因此这门学科成为不仅折磨CS专业同学的“小恶魔”,也是折磨生物、化学、统计等其他学科留学生的“大魔王”。学习Machine learning的一大绊脚石在于使用语言众多,跨学科范围广,所以学习起来尤其困难。但是不管你在学习Machine Learning时遇到任何难题,StudyGate专业导师团队都能为你轻松解决。

多元统计分析代考


基础数据: $N$ 个样本, $P$ 个变量数的单样本,组成的横列的数据表
变量定性: 分类和顺序;变量定量:数值
数学公式的角度分为: 因变量与自变量

时间序列分析代写

随机过程,是依赖于参数的一组随机变量的全体,参数通常是时间。 随机变量是随机现象的数量表现,其时间序列是一组按照时间发生先后顺序进行排列的数据点序列。通常一组时间序列的时间间隔为一恒定值(如1秒,5分钟,12小时,7天,1年),因此时间序列可以作为离散时间数据进行分析处理。研究时间序列数据的意义在于现实中,往往需要研究某个事物其随时间发展变化的规律。这就需要通过研究该事物过去发展的历史记录,以得到其自身发展的规律。

回归分析代写

多元回归分析渐进(Multiple Regression Analysis Asymptotics)属于计量经济学领域,主要是一种数学上的统计分析方法,可以分析复杂情况下各影响因素的数学关系,在自然科学、社会和经济学等多个领域内应用广泛。

MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中,其中问题和解决方案以熟悉的数学符号表示。典型用途包括:数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发,包括图形用户界面构建MATLAB 是一个交互式系统,其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题,尤其是那些具有矩阵和向量公式的问题,而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问,这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展,得到了许多用户的投入。在大学环境中,它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域,MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要,工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数(M 文件)的综合集合,可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。

R语言代写问卷设计与分析代写
PYTHON代写回归分析与线性模型代写
MATLAB代写方差分析与试验设计代写
STATA代写机器学习/统计学习代写
SPSS代写计量经济学代写
EVIEWS代写时间序列分析代写
EXCEL代写深度学习代写
SQL代写各种数据建模与可视化代写

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注