### 统计代写|金融统计代写Mathematics with Statistics for Finance代考|VARIANCE AND STANDARD DEVIATION

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

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

## 统计代写|金融统计代写Mathematics with Statistics for Finance代考|VARIANCE AND STANDARD DEVIATION

The variance of a random variable measures how noisy or unpredictable that random variable is. Variance is defined as the expected value of the difference between the variable and its mean squared:
$$\sigma^{2}=E\left[(X-\mu)^{2}\right]$$
where $\sigma^{2}$ is the variance of the random variable $X$ with mean $\mu$.
The square root of variance, typically denoted by $\sigma$, is called standard deviation. In finance we often refer to standard deviation as volatility. This is analogous to referring to the mean as the average. Standard deviation is a mathematically precise term, whereas volatility is a more general concept.In the previous example, we were calculating the population variance and standard deviation. $A l l$ of the possible outcomes for the derivative were known.

To calculate the sample variance of a random variable $X$ based on $n$ observations, $x_{1}, x_{2}, \ldots, x_{n}$, we can use the following formula:
$$E\left[\sigma_{x}^{2}\right]=\hat{\sigma}{x}^{2}=\frac{1}{n-1} \sum{i=1}^{n}\left(x_{i}-\hat{\mu}{x}\right)^{2}$$ where $\hat{\mu}{x}$ is the sample mean from Equation 3.2. Given that we have $n$ data points, it might seem odd that we are dividing the sum by $(n-1)$ and not $n$. The reason has to do with the fact that $\hat{\mu}{x}$ itself is an estimate of the true mean, which also contains a fraction of each $x{i}$. We leave the proof for a problem at the end of the chapter, but it turns out that dividing by $(n-1)$, not $n$, produces an unbiased estimate of $\sigma^{2}$. If the mean is known or we are calculating the population variance, then we divide by $n$. If instead the mean is also being estimated, then we divide by $n-1$.

Equation $3.18$ can easily be rearranged as follows (we leave the proof of this for an exercise, too):
$$\sigma^{2}=E\left[X^{2}\right]-\mu^{2}=E\left[X^{2}\right]-E[X]^{2}$$
Note that variance can be nonzero only if $E\left[X^{2}\right] \neq E[X]^{2}$.
When writing computer programs, this last version of the variance formula is often useful, since it allows you to calculate the mean and the variance in the same loop. Also, in finance it is often convenient to assume that the mean of a random variable is close to zero. For example, based on theory, we might expect the spread between two equity indexes to have a mean of zero in the long run. In this case, the variance is simply the mean of the squared returns.

## 统计代写|金融统计代写Mathematics with Statistics for Finance代考|STANDARDIZED VARIABLES

It is often convenient to work with variables where the mean is zero and the standard deviation is one. From the preceding section it is not difficult to prove that, given a random variable $X$ with mean $\mu$ and standard deviation $\sigma$, we can define a second random variable $Y$ :
$$Y=\frac{X-\mu}{\sigma}$$
such that $Y$ will have a mean of zero and a standard deviation of one. We say that $X$ has been standardized, or that $Y$ is a standard random variable. In practice, if we have a data set and we want to standardize it, we first compute the sample mean and the standard deviation. Then, for each data point, we subtract the mean and divide by the standard deviation.

The inverse transformation can also be very useful when it comes to creating computer simulations. Simulations often begin with standardized variables, which need to be transformed into variables with a specific mean and standard deviation. In this case, we simply take the output from the standardized variable, multiply by the desired standard deviation, and then add the desired mean. The order is important. Adding a constant to a random variable will not change the standard deviation, but multiplying a non-meanzero variable by a constant will change the mean.

## 统计代写|金融统计代写Mathematics with Statistics for Finance代考|COVARIANCE

Up until now we have mostly been looking at statistics that summarize one variable. In risk management, we often want to describe the relationship between two random variables. For example, is there a relationship between the returns of an equity and the returns of a market index?

Covariance is analogous to variance, but instead of looking at the deviation from the mean of one variable, we are going to look at the relationship between the deviations of two variables:
$$\sigma_{X Y}=E\left[\left(X-\mu_{X}\right)\left(Y-\mu_{Y}\right)\right]$$
where $\sigma_{X Y}$ is the covariance between two random variables, $X$ and $Y$, with means $\mu_{X}$ and $\mu_{Y}$, respectively. As you can see from the definition, variance is just a special case of covariance. Variance is the covariance of a variable with itself.

If $X$ tends to be above $\mu_{X}$ when $Y$ is above $\mu_{Y}$ (both deviations are positive), and $X$ tends to be below $\mu_{X}$ when $Y$ is below $\mu_{Y}$ (both deviations are negative), then the covariance will be positive (a positive number multiplied by a positive number is positive; likewise, for two negative numbers). If the opposite is true and the deviations tend to be of opposite sign, then the covariance will be negative. If the deviations have no discernible relationship, then the covariance will be zero.

Earlier in this chapter, we cautioned that the expectations operator is not generally multiplicative. This fact turns out to be closely related to the concept of covariance. Just as we rewrote our variance equation earlier, we can rewrite Equation $3.25$ as follows:
$$\sigma_{X Y}=E\left[\left(X-\mu_{X}\right)\left(Y-\mu_{Y}\right)\right]=E[X Y]-\mu_{X} \mu_{Y}=E[X Y]-E[X] E[Y]$$
In the special case where the covariance between $X$ and $Y$ is zero, the expected value of $X Y$ is equal to the expected value of $X$ multiplied by the expected value of $Y$ :
$$\sigma_{X Y}=0 \Rightarrow E[X Y]=E[X] E[Y]$$
If the covariance is anything other than zero, then the two sides of this equation cannot be equal. Unless we know that the covariance between two variables is zero, we cannot assume that the expectations operator is multiplicative.

In order to calculate the covariance between two random variables, $X$ and $Y$, assuming the means of both variables are known, we can use the following formula:
$$\hat{\sigma}{X, Y}=\frac{1}{n} \sum{i=1}^{n}\left(x_{i}-\mu_{X}\right)\left(y_{i}-\mu_{Y}\right)$$
If the means are unknown and must also be estimated, we replace $n$ with $(n-1)$ :
$$\hat{\sigma}{X, Y}=\frac{1}{n-1} \sum{i=1}^{n}\left(x_{i}-\hat{\mu}{X}\right)\left(y{i}-\hat{\mu}{Y}\right)$$ If we replaced $y{i}$ in these formulas with $x_{i}$, calculating the covariance of $X$ with itself, the resulting equations would be the same as the equations for calculating variance from the previous section.

## 统计代写|金融统计代写Mathematics with Statistics for Finance代考|VARIANCE AND STANDARD DEVIATION

σ2=和[(X−μ)2]

σ2=和[X2]−μ2=和[X2]−和[X]2

## 统计代写|金融统计代写Mathematics with Statistics for Finance代考|COVARIANCE

σX是=和[(X−μX)(是−μ是)]

σX是=和[(X−μX)(是−μ是)]=和[X是]−μXμ是=和[X是]−和[X]和[是]

σX是=0⇒和[X是]=和[X]和[是]

σ^X,是=1n∑一世=1n(X一世−μX)(是一世−μ是)

σ^X,是=1n−1∑一世=1n(X一世−μ^X)(是一世−μ^是)如果我们更换是一世在这些公式中X一世, 计算协方差X就其本身而言，得到的方程与上一节计算方差的方程相同。

## 广义线性模型代考

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