Posted on Categories:Linear Regression, 数据科学代写, 线性回归, 统计代写, 统计代考

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 统计代写|线性回归代写Linear Regression代考|Properties of the Estimates

Additional properties of the ols estimates are derived in Appendix A.8 and are only summarized here. Assuming that $\mathrm{E}(\mathbf{e} \mid X)=\mathbf{0}$ and $\operatorname{Var}(\mathbf{e} \mid X)=\sigma^2 \mathbf{I}_n$, then $\hat{\boldsymbol{\beta}}$ is unbiased, $\mathrm{E}(\hat{\boldsymbol{\beta}} \mid X)=\boldsymbol{\beta}$, and
$$\operatorname{Var}(\hat{\boldsymbol{\beta}} \mid X)=\sigma^2\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$$
Excluding the intercept regressor,
$$\operatorname{Var}\left(\hat{\boldsymbol{\beta}}^* \mid X\right)=\sigma^2\left(\mathcal{X}^{\prime} \mathcal{X}\right)^{-1}$$
and so $\left(\mathcal{X}^{\prime} \mathcal{X}\right)^{-1}$ is all but the first row and column of $\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$. An estimate of $\sigma^2$ is given by
$$\hat{\sigma}^2=\frac{\mathrm{RSS}}{n-(p+1)}$$
If $\mathbf{e}$ is normally distributed, then the residual sum of squares has a chi-squared distribution,
$$\frac{n-(p+1) \hat{\sigma}^2}{\sigma^2} \sim \chi^2(n-(p+1))$$
By substituting $\hat{\sigma}^2$ for $\sigma^2$ in (3.14), we find the estimated variance of $\hat{\boldsymbol{\beta}}$ to be
$$\widehat{\operatorname{Var}}(\hat{\boldsymbol{\beta}} \mid X)=\hat{\sigma}^2\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$$

## 统计代写|线性回归代写Linear Regression代考|Simple Regression in Matrix Notation

For simple regression, $\mathbf{X}$ and $\mathbf{Y}$ are given by
$$\mathbf{X}=\left(\begin{array}{cc} 1 & x_1 \ 1 & x_2 \ \vdots & \vdots \ 1 & x_n \end{array}\right) \quad \mathbf{Y}=\left(\begin{array}{c} y_1 \ y_2 \ \vdots \ y_n \end{array}\right)$$
and thus
$$\left(\mathbf{X}^{\prime} \mathbf{X}\right)=\left(\begin{array}{rr} n & \sum x_i \ \sum x_i & \sum x_i^2 \end{array}\right) \quad \mathbf{X}^{\prime} \mathbf{Y}=\left(\begin{array}{r} \sum y_i \ \sum x_i y_i \end{array}\right)$$
By direct multiplication, $\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$ can be shown to be
$$\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}=\frac{1}{\operatorname{SXX}}\left(\begin{array}{rr} \sum x_i^2 / n & -\bar{x} \ -\bar{x} & 1 \end{array}\right)$$
so that
\begin{aligned} \hat{\boldsymbol{\beta}} & =\left(\begin{array}{c} \hat{\beta}_0 \ \hat{\beta}_1 \end{array}\right)=\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{Y}=\frac{1}{\mathrm{SXX}}\left(\begin{array}{rr} x_i^2 / n & -\bar{x} \ -\bar{x} & 1 \end{array}\right)\left(\begin{array}{c} \sum y_i \ \sum x_i y_i \end{array}\right) \ & =\left(\begin{array}{c} \bar{y}-\hat{\beta}_1 \bar{x} \ \text { SXY } / \mathrm{SXX} \end{array}\right) \end{aligned}
as found previously. Also, since $\sum x_i^2 /(n \mathrm{SXX})=1 / n+\bar{x}^2 / \mathrm{SXX}$, the variances and covariances for $\hat{\beta}_0$ and $\hat{\beta}_1$ found in Chapter 2 are identical to those given by $\sigma^2\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$

## 统计代写|线性回归代写Linear Regression代考|Properties of the Estimates

ols估计数的其他性质载于附录A.8，在此仅作概述。假设$\mathrm{E}(\mathbf{e} \mid X)=\mathbf{0}$和$\operatorname{Var}(\mathbf{e} \mid X)=\sigma^2 \mathbf{I}_n$，那么$\hat{\boldsymbol{\beta}}$是无偏的，$\mathrm{E}(\hat{\boldsymbol{\beta}} \mid X)=\boldsymbol{\beta}$，和
$$\operatorname{Var}(\hat{\boldsymbol{\beta}} \mid X)=\sigma^2\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$$

$$\operatorname{Var}\left(\hat{\boldsymbol{\beta}}^* \mid X\right)=\sigma^2\left(\mathcal{X}^{\prime} \mathcal{X}\right)^{-1}$$

$$\hat{\sigma}^2=\frac{\mathrm{RSS}}{n-(p+1)}$$

$$\frac{n-(p+1) \hat{\sigma}^2}{\sigma^2} \sim \chi^2(n-(p+1))$$

$$\widehat{\operatorname{Var}}(\hat{\boldsymbol{\beta}} \mid X)=\hat{\sigma}^2\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$$

## 统计代写|线性回归代写Linear Regression代考|Simple Regression in Matrix Notation

$$\mathbf{X}=\left(\begin{array}{cc} 1 & x_1 \ 1 & x_2 \ \vdots & \vdots \ 1 & x_n \end{array}\right) \quad \mathbf{Y}=\left(\begin{array}{c} y_1 \ y_2 \ \vdots \ y_n \end{array}\right)$$

$$\left(\mathbf{X}^{\prime} \mathbf{X}\right)=\left(\begin{array}{rr} n & \sum x_i \ \sum x_i & \sum x_i^2 \end{array}\right) \quad \mathbf{X}^{\prime} \mathbf{Y}=\left(\begin{array}{r} \sum y_i \ \sum x_i y_i \end{array}\right)$$

$$\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}=\frac{1}{\operatorname{SXX}}\left(\begin{array}{rr} \sum x_i^2 / n & -\bar{x} \ -\bar{x} & 1 \end{array}\right)$$

\begin{aligned} \hat{\boldsymbol{\beta}} & =\left(\begin{array}{c} \hat{\beta}_0 \ \hat{\beta}_1 \end{array}\right)=\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1} \mathbf{X}^{\prime} \mathbf{Y}=\frac{1}{\mathrm{SXX}}\left(\begin{array}{rr} x_i^2 / n & -\bar{x} \ -\bar{x} & 1 \end{array}\right)\left(\begin{array}{c} \sum y_i \ \sum x_i y_i \end{array}\right) \ & =\left(\begin{array}{c} \bar{y}-\hat{\beta}_1 \bar{x} \ \text { SXY } / \mathrm{SXX} \end{array}\right) \end{aligned}

## MATLAB代写

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

Posted on Categories:Linear Regression, 数据科学代写, 线性回归, 统计代写, 统计代考

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 统计代写|线性回归代写Linear Regression代考|ADDING A REGRESSOR TO A SIMPLE LINEAR REGRESSION MODEL

We start with a response $Y$ and the simple linear regression mean function
$$\mathrm{E}\left(Y \mid X_1=x_1\right)=\beta_0+\beta_1 x_1$$
Now suppose we have a second variable $X_2$ and would like to learn about the simultaneous dependence of $Y$ on $X_1$ and $X_2$. By adding $X_2$ to the problem, we will get a mean function that depends on both the value of $X_1$ and the value of $X_2$,
$$\mathrm{E}\left(Y \mid X_1=x_1, X_2=x_2\right)=\beta_0+\beta_1 x_1+\beta_2 x_2$$
The main idea in adding $X_2$ is to explain the part of $Y$ that has not already been explained by $X_1$.
United Nations Data
We will use the United Nations data discussed in Problem 1.1. To the regression with response lifeExpF and regressor $\log (\mathrm{ppgdp}$ ) we consider adding fertility, the average number of children per woman. Interest therefore centers on the distribution of $\log ($ iffeExpF $)$ as $\log (\mathrm{ppgdp})$ and fertility both vary. The data are in the file UN11.
Figure 3.1a is a summary graph for the simple regression of lifeExpF on $\log (\mathrm{ppg} \mathrm{dp})$. This graph can also be called a marginal plot because it ignores all other regressors. The fitted mean function to the marginal plot using oLs is
$$\hat{\mathrm{E}}(\text { lifeExpF } \mid \log (\mathrm{ppgdp}))=29.815+5.019 \log (\mathrm{ppgdp})$$
with $R^2=0.596$, so about $60 \%$ of the variability in lifeExpF is explained by $\log (p p g d p)$. Expected lifeExpF increases as $\log (p p g d p)$ increases.
Similarly, Figure $3.1 \mathrm{~b}$ is the marginal plot for the regression of lifeExpF on fertility. This simple regression has fitted mean function
$$\hat{E}(\text { lifeExpFlfertility })=89.481-6.224 \text { fertility }$$
with $R^2=0.678$, so fertility explains about $68 \%$ of the variability in lifeExpF. Expected lifeExpF decreases as fertility increases. Thus, from Figure 3.1a, the response lifeExpF is related to the regressor $\log (\mathrm{ppgdp})$ ignoring fertility, and from Figure 3.1b, lifeExpF is related to fertility ignoring $\log (p p g d p)$.

## 统计代写|线性回归代写Linear Regression代考|Explaining Variability

Given these graphs, what can be said about the proportion of variability in lifeExpF explained jointly by $\log (\mathrm{ppgdp})$ and fertility? The total explained variation must be at least $67.8 \%$, the larger of the variation explained by each variable separately, since using both $\log (\mathrm{ppgdp})$ and fertility must surely be at least as informative as using just one of them. If the regressors were uncorrelated, then the variation explained by them jointly would equal the sum of the variations explained individually. In this example, the sum of the individual variations explained exceeds $100 \%, 59.6 \%+67.8 \%$ $=127.4 \%$. As confirmed by Figure 3.2, the regressors are correlated so this simple addition formula won’t apply. The variation explained by both variables can be smaller than the sum of the individual variation explained if the regressors are in part explaining the same variation. The total can exceed the sum if the variables act jointly so that knowing both gives more information than knowing just one of them. For example, the area of a rectangle may be only poorly determined by either the length or width alone, but if both are considered at the same time, area can be determined exactly. It is precisely this inability to predict the joint relationship from the marginal relationships that makes multiple regression rich and complicated.

To get the effect of adding fertility to the model that already includes $\log (\mathrm{ppgdp})$, we need to examine the part of the response lifeExpF not explained by $\log (p p g d p)$ and the part of the new regressor fertility not explained by $\log (p p g d p)$.

Compute the regression of the response lifeExpF on the first regressor $\log (\mathrm{ppgdp})$, corresponding to the ols line shown in Figure 3.1a. The fitted equation is given at (3.2). Keep the residuals from this regression. These residuals are the part of the response lifeExpF not explained by the regression on $\log (\mathrm{ppg} \mathrm{dp})$.

Compute the regression of fertility on $\log ($ ppgdp), corresponding to Figure 3.2. Keep the residuals from this regression as well. These residuals are the part of the new regressor fertility not explained by $\log ($ ppgdp $)$.

The added-variable plot is of the unexplained part of the response from (1) on the unexplained part of the added regressor from (2).

## 统计代写|线性回归代写Linear Regression代考|ADDING A REGRESSOR TO A SIMPLE LINEAR REGRESSION MODEL

$$\mathrm{E}\left(Y \mid X_1=x_1\right)=\beta_0+\beta_1 x_1$$

$$\mathrm{E}\left(Y \mid X_1=x_1, X_2=x_2\right)=\beta_0+\beta_1 x_1+\beta_2 x_2$$

$$\hat{\mathrm{E}}(\text { lifeExpF } \mid \log (\mathrm{ppgdp}))=29.815+5.019 \log (\mathrm{ppgdp})$$

$$\hat{E}(\text { lifeExpFlfertility })=89.481-6.224 \text { fertility }$$
$R^2=0.678$，所以生育率解释了$68 \%$生命指数的变化。预期寿命随着生育率的增加而下降。因此，从图3.1a中，响应lifeExpF与忽略生育率的回归量$\log (\mathrm{ppgdp})$相关，从图3.1b中，lifeExpF与忽略生育率$\log (p p g d p)$相关。

## 统计代写|线性回归代写Linear Regression代考|Explaining Variability

avatest.org 为您提供可靠及专业的论文代写服务以便帮助您完成您学术上的需求，让您重新掌握您的人生。我们将尽力给您提供完美的论文，并且保证质量以及准时交稿。除了承诺的奉献精神，我们的专业写手、研究人员和校对员都经过非常严格的招聘流程。所有写手都必须证明自己的分析和沟通能力以及英文水平，并通过由我们的资深研究人员和校对员组织的面试。

## MATLAB代写

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