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)$相关。

## 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代考|ESTIMATING σ 2

Since the variance $\sigma^2$ is essentially the average squared size of the $e_i^2$, we should expect that its estimator $\hat{\sigma}^2$ is obtained by averaging the squared residuals. Under the assumption that the errors are uncorrelated random variables with zero means and common variance $\sigma^2$, an unbiased estimate of $\sigma^2$ is obtained by dividing $R S S=\sum \hat{e}_i^2$ by its degrees of freedom (df), where residual $\mathrm{df}=$ number of cases minus the number of parameters in the mean function. For simple regression, residual df $=n-2$, so the estimate of $\sigma^2$ is given by
$$\hat{\sigma}^2=\frac{R S S}{n-2}$$
This quantity is called the residual mean square. In general, any sum of squares divided by its df is called a mean square. The residual sum of squares can be computed by squaring the residuals and adding them up. It can also be computed from the formula (Problem 2.9)
$$R S S=S Y Y-\frac{S X Y^2}{S X X}=S Y Y-\hat{\beta}_1^2 S X X$$
Using the summaries for Forbes’ data given at (2.6), we find
\begin{aligned} R S S & =427.79402-\frac{475.31224^2}{530.78235} \ & =2.15493 \ \sigma^2 & =\frac{2.15493}{17-2}=0.14366 \end{aligned}
The square root of $\hat{\sigma}^2, \hat{\sigma}=\sqrt{0.14366}=0.37903$ is often called the standard error of regression. It is in the same units as is the response variable.

## 统计代写|线性回归代写Linear Regression代考|PROPERTIES OF LEAST SQUARES ESTIMATES

The oLs estimates depend on data only through the statistics given in Table 2.1 . This is both an advantage, making computing easy, and a disadvantage, since any two data sets for which these are identical give the same fitted regression, even if a straight-line model is appropriate for one but not the other, as we have seen in Anscombe’s examples in Section 1.4. The estimates $\hat{\beta}_0$ and $\hat{\beta}_1$ can both be written as linear combinations of $y_1, \ldots, y_n$, for example, writing $c_i=\left(x_i-\bar{x}\right) / S X X$ (see Appendix A.3)
$$\hat{\beta}_1=\sum\left(\frac{x_i-\bar{x}}{S X X}\right) y_i=\sum c_i y_i$$
The fitted value at $x=\bar{x}$ is
$$\widehat{\mathrm{E}}(Y \mid X=\bar{x})=\bar{y}-\hat{\beta}_1 \bar{x}+\hat{\beta}_1 \bar{x}=\bar{y}$$
so the fitted line must pass through the point $(\bar{x}, \bar{y})$, intuitively the center of the data. Finally, as long as the mean function includes an intercept, $\sum \hat{e}_i=0$. Mean functions without an intercept will usually have $\sum \hat{e}_i \neq 0$.

Since the estimates $\hat{\beta}_0$ and $\hat{\beta}_1$ depend on the random $e_i \mathrm{~s}$, the estimates are also random variables. If all the $e_i$ have zero mean and the mean function is correct, then, as shown in Appendix A.4, the least squares estimates are unbiased,
\begin{aligned} & E\left(\hat{\beta}_0\right)=\beta_0 \ & E\left(\hat{\beta}_1\right)=\beta_1 \end{aligned}
The variance of the estimators, assuming $\operatorname{Var}\left(e_i\right)=\sigma^2, i=1, \ldots, n$, and $\operatorname{Cov}\left(e_i, e_j\right)=0, i \neq j$, are from Appendix A.4,
\begin{aligned} & \operatorname{Var}\left(\hat{\beta}_1\right)=\sigma^2 \frac{1}{S X X} \ & \operatorname{Var}\left(\hat{\beta}_0\right)=\sigma^2\left(\frac{1}{n}+\frac{\bar{x}^2}{S X X}\right) \end{aligned}
The two estimates are correlated, with covariance
$$\operatorname{Cov}\left(\hat{\beta}_0, \hat{\beta}_1\right)=-\sigma^2 \frac{\bar{x}}{S X X}$$

## 统计代写|线性回归代写Linear Regression代考|ESTIMATING σ 2

$$\hat{\sigma}^2=\frac{R S S}{n-2}$$

$$R S S=S Y Y-\frac{S X Y^2}{S X X}=S Y Y-\hat{\beta}_1^2 S X X$$

\begin{aligned} R S S & =427.79402-\frac{475.31224^2}{530.78235} \ & =2.15493 \ \sigma^2 & =\frac{2.15493}{17-2}=0.14366 \end{aligned}
$\hat{\sigma}^2, \hat{\sigma}=\sqrt{0.14366}=0.37903$的平方根通常被称为回归的标准误差。它和响应变量的单位是一样的。

## 统计代写|线性回归代写Linear Regression代考|PROPERTIES OF LEAST SQUARES ESTIMATES

oLs估计仅取决于表2.1所列统计数据的数据。这既是一个优点，使计算变得容易，也是一个缺点，因为任何两个相同的数据集都会给出相同的拟合回归，即使直线模型适用于其中一个而不适用于另一个，正如我们在1.4节中的Anscombe示例中所看到的那样。估算值$\hat{\beta}_0$和$\hat{\beta}_1$都可以写成$y_1, \ldots, y_n$的线性组合，例如写成$c_i=\left(x_i-\bar{x}\right) / S X X$(参见附录A.3)。
$$\hat{\beta}_1=\sum\left(\frac{x_i-\bar{x}}{S X X}\right) y_i=\sum c_i y_i$$
$x=\bar{x}$处的拟合值为
$$\widehat{\mathrm{E}}(Y \mid X=\bar{x})=\bar{y}-\hat{\beta}_1 \bar{x}+\hat{\beta}_1 \bar{x}=\bar{y}$$

\begin{aligned} & E\left(\hat{\beta}_0\right)=\beta_0 \ & E\left(\hat{\beta}_1\right)=\beta_1 \end{aligned}

\begin{aligned} & \operatorname{Var}\left(\hat{\beta}_1\right)=\sigma^2 \frac{1}{S X X} \ & \operatorname{Var}\left(\hat{\beta}_0\right)=\sigma^2\left(\frac{1}{n}+\frac{\bar{x}^2}{S X X}\right) \end{aligned}

$$\operatorname{Cov}\left(\hat{\beta}_0, \hat{\beta}_1\right)=-\sigma^2 \frac{\bar{x}}{S X X}$$

## 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代考|Predicting the Weather

Can early season snowfall from September 1 until December 31 predict snowfall in the remainder of the year, from January 1 to June 30 ? Figure 1.6, using data from the data file ftcollinssnow.txt, gives a plot of Late season snowfall from January 1 to June 30 versus Early season snowfall for the period September 1 to December 31 of the previous year, both measured in inches at Ft. Collins, Colorado $^2$. If Late is related to Early, the relationship is considerably weaker than in the previous examples, and the graph suggests that early winter snowfall and late winter snowfall may be completely unrelated, or uncorrelated. Interest in this regression problem will therefore be in testing the hypothesis that the two variables are uncorrelated versus the alternative that they are not uncorrelated, essentially comparing the fit of the two lines shown in Figure 1.6. Fitting models will be helpful here.

Turkey Growth
This example is from an experiment on the growth of turkeys (Noll, Weibel, Cook, and Witmer, 1984). Pens of turkeys were grown with an identical diet, except that each pen was supplemented with a Dose of the amino acid methionine as a percentage of the total diet of the birds. The methionine was provided using either a standard source or one of two experimental sources. The response is average weight gain in grams of all the turkeys in the pen.

Figure 1.7 provides a summary graph based on the data in the file turkey . txt. Except at Dose $=0$, each point in the graph is the average response of five pens of turkeys; at $D o s e=0$, there were ten pens of turkeys. Because averages are plotted, the graph does not display the variation between pens treated alike. At each value of Dose $>0$, there are three points shown, with different symbols corresponding to the three sources of methionine, so the variation between points at a given Dose is really the variation between sources. At Dose $=0$, the point has been arbitrarily labelled with the symbol for the first group, since Dose $=0$ is the same treatment for all sources.

For now, ignore the three sources and examine Figure 1.7 in the way we have been examining the other summary graphs in this chapter. Weight gain seems to increase with increasing Dose, but the increase does not appear to be linear, meaning that a straight line does not seem to be a reasonable representation of the average dependence of the response on the predictor. This leads to study of mean functions.

## 统计代写|线性回归代写Linear Regression代考|MEAN FUNCTIONS

Imagine a generic summary plot of $Y$ versus $X$. Our interest centers on how the distribution of $Y$ changes as $X$ is varied. One important aspect of this distribution is the mean function, which we define by
$$\mathrm{E}(Y \mid X=x)=\text { a function that depends on the value of } x$$
We read the left side of this equation as “the expected value of the response when the predictor is fixed at the value $X=x$,” if the notation ” $\mathrm{E}(\mathrm{)}$ ” for expectations and “Var( )” for variances is unfamiliar, please read Appendix A.2. The right side of (1.1) depends on the problem. For example, in the heights data in Example 1.1, we might believe that
$$\mathrm{E}(\text { Dheight } \mid \text { Mheight }=x)=\beta_0+\beta_1 x$$
that is, the mean function is a straight line. This particular mean function has two parameters, an intercept $\beta_0$ and a slope $\beta_1$. If we knew the values of the $\beta \mathrm{s}$, then the mean function would be completely specified, but usually the $\beta$ s need to be estimated from data.

Figure 1.8 shows two possibilities for $\beta \mathrm{s}$ in the straight-line mean function (1.2) for the heights data. For the dashed line, $\beta_0=0$ and $\beta_1=1$. This mean function would suggest that daughters have the same height as their mothers on average. The second line is estimated using ordinary least squares, or oLs, the estimation method that will be described in the next chapter. The oLs line has slope less than one, meaning that tall mothers tend to have daughters who are taller than average because the slope is positive but shorter than themselves because the slope is less than one. Similarly, short mothers tend to have short daughters but taller than themselves. This is perhaps a surprising result and is the origin of the term regression, since extreme values in one generation tend to revert or regress toward the population mean in the next generation.

## 统计代写|线性回归代写Linear Regression代考|Predicting the Weather

9月1日至12月31日的早期降雪能否预测1月1日至6月30日的降雪?图1.6使用数据文件ftcollinsnow .txt中的数据，给出了1月1日至6月30日晚季降雪量与前一年9月1日至12月31日早季降雪量的对比图，两者均以英寸为单位，位于科罗拉多州的Ft Collins $^2$。如果Late与Early相关，则这种关系比前面的例子弱得多，并且该图表明，初冬降雪和晚冬降雪可能完全不相关或不相关。因此，对这个回归问题的兴趣将在于检验两个变量不相关的假设与它们不相关的替代假设，本质上是比较图1.6所示两条线的拟合。在这里，拟合模型会有所帮助。

## 统计代写|线性回归代写Linear Regression代考|MEAN FUNCTIONS

$$\mathrm{E}(Y \mid X=x)=\text { a function that depends on the value of } x$$

$$\mathrm{E}(\text { Dheight } \mid \text { Mheight }=x)=\beta_0+\beta_1 x$$

## MATLAB代写

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