# 统计代写|线性回归分析代写linear regression analysis代考|Simple Regression in Matrix Terms

#### Doug I. Jones

Lorem ipsum dolor sit amet, cons the all tetur adiscing elit

couryes™为您提供可以保分的包课服务

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

## 统计代写|线性回归分析代写linear regression analysis代考|Simple Regression in Matrix Terms

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 \quad \mathbf{X}^{\prime} \mathbf{Y}=\left(\begin{array}{c} \sum y_i \ \sum y_i^2 \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}{S X X}\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}{S X X}\left(\begin{array}{rr} \sum x_i^2 / n & -\bar{x} \ -\bar{x} & \sum x_i y_i \end{array}\right)\left(\begin{array}{r} \sum y_i \ \sum y_i^2 \end{array}\right) \ & =\left(\begin{array}{r} \bar{y}-\hat{\beta}_1 \bar{x} \ S X Y / S X X \end{array}\right) \end{aligned}
as found previously. Also, since $\sum x_i^2 /(n S X X)=1 / n+\bar{x}^2 / S X X$, 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}$

The results are simpler in the deviations from the sample average form, since
$$\mathcal{X}^{\prime} \mathcal{X}=S X X \quad \mathcal{X}^{\prime} \mathcal{Y}=S X Y$$
and
\begin{aligned} & \hat{\beta}_1=\left(\mathcal{X}^{\prime} \mathcal{X}\right)^{-1} \mathcal{X}^{\prime} \mathcal{Y}=\frac{S X Y}{S X X} \ & \hat{\beta}_0=\bar{y}-\hat{\beta}_1 \bar{x} \end{aligned}

## 统计代写|线性回归分析代写linear regression analysis代考|Fuel Consumption Data

We will generally let $p$ equal the number of terms in a mean function excluding the intercept, and $p^{\prime}=p+1$ equal if the intercept is included; $p^{\prime}=p$ if the intercept is not included. We shall now fit the mean function with $p^{\prime}=5$ terms, including the intercept for the fuel consumption data. Continuing a practice we have already begun, we will write Fuel on Tax Dlic Income $\log$ (Miles) as shorthand for using oLs to fit the multiple linear regression model with mean function
$$\mathrm{E}(\text { Fuel } \mid X)=\beta_0+\beta_1 \text { Tax }+\beta_2 \text { Dlic }+\beta_3 \text { Income }+\beta_4 \log (\text { Miles })$$
where conditioning on $X$ is short for conditioning on all the terms in the mean function. All the computations are based on the summary statistics, which are the sample means given in Table 3.1 and the sample covariance matrix $\mathcal{C}$ defined at (3.10) and given by
$\begin{array}{lrrrrr} & \text { Tax } & \text { Dlic } & \text { Income } & \text { logMiles } & \text { Fuel } \ \text { Tax } & 20.6546 & -28.4247 & -0.2162 & -0.2955 & -104.8944 \ \text { Dlic } & -28.4247 & 5308.2591 & -57.0705 & 3.3135 & 3036.5905 \ \text { Income } & -0.2162 & -57.0705 & 19.8171 & -1.9580 & -183.9126 \ \text { logMiles } & -0.2955 & 3.3135 & -1.9580 & 2.2103 & 55.8172 \ \text { Fuel } & -104.8944 & 3036.5905 & -183.9126 & 55.8172 & 7913.8812\end{array}$
Most statistical software will give the sample correlations rather than the covariances. The reader can verify that the correlations in Table 3.2 can be obtained from these covariances. For example, the sample correlation between Tax and Income is $-0.2162 / \sqrt{(20.6546 \times 19.8171)}=-0.0107$ as in Table 3.2. One can convert back from correlations and sample variances to covariances; the square root of the sample variances are given in Table 3.1.
The $5 \times 5$ matrix $\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$ is given by
$\begin{array}{lrrrrr} & \text { Intercept } & \text { Tax } & \text { Dlic } & \text { Income } & \text { logMiles } \ \text { Intercept } & 9.02151 & -2.852 \mathrm{e}-02 & -4.080 \mathrm{e}-03 & -5.981 \mathrm{e}-02 & -1.932 \mathrm{e}-01 \ \text { Tax } & -0.02852 & 9.788 \mathrm{e}-04 & 5.599 \mathrm{e}-06 & 4.263 \mathrm{e}-05 & 1.602 \mathrm{e}-04 \ \text { Dlic } & -0.00408 & 5.599 \mathrm{e}-06 & 3.922 \mathrm{e}-06 & 1.189 \mathrm{e}-05 & 5.402 \mathrm{e}-06 \ \text { Income } & -0.05981 & 4.263 \mathrm{e}-05 & 1.189 \mathrm{e}-05 & 1.143 \mathrm{e}-03 & 1.000 \mathrm{e}-03 \ \text { logMiles } & -0.19315 & 1.602 \mathrm{e}-04 & 5.402 \mathrm{e}-06 & 1.000 \mathrm{e}-03 & 9.948 \mathrm{e}-03\end{array}$

# 线性回归代写

## 统计代写|线性回归分析代写linear regression analysis代考|Simple Regression in Matrix Terms

$$\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 \quad \mathbf{X}^{\prime} \mathbf{Y}=\left(\begin{array}{c} \sum y_i \ \sum y_i^2 \end{array}\right)$$

$$\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}=\frac{1}{S X X}\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}{S X X}\left(\begin{array}{rr} \sum x_i^2 / n & -\bar{x} \ -\bar{x} & \sum x_i y_i \end{array}\right)\left(\begin{array}{r} \sum y_i \ \sum y_i^2 \end{array}\right) \ & =\left(\begin{array}{r} \bar{y}-\hat{\beta}_1 \bar{x} \ S X Y / S X X \end{array}\right) \end{aligned}

$$\mathcal{X}^{\prime} \mathcal{X}=S X X \quad \mathcal{X}^{\prime} \mathcal{Y}=S X Y$$

\begin{aligned} & \hat{\beta}_1=\left(\mathcal{X}^{\prime} \mathcal{X}\right)^{-1} \mathcal{X}^{\prime} \mathcal{Y}=\frac{S X Y}{S X X} \ & \hat{\beta}_0=\bar{y}-\hat{\beta}_1 \bar{x} \end{aligned}

## 统计代写|线性回归分析代写linear regression analysis代考|Fuel Consumption Data

$$\mathrm{E}(\text { Fuel } \mid X)=\beta_0+\beta_1 \text { Tax }+\beta_2 \text { Dlic }+\beta_3 \text { Income }+\beta_4 \log (\text { Miles })$$

$\begin{array}{lrrrrr} & \text { Tax } & \text { Dlic } & \text { Income } & \text { logMiles } & \text { Fuel } \ \text { Tax } & 20.6546 & -28.4247 & -0.2162 & -0.2955 & -104.8944 \ \text { Dlic } & -28.4247 & 5308.2591 & -57.0705 & 3.3135 & 3036.5905 \ \text { Income } & -0.2162 & -57.0705 & 19.8171 & -1.9580 & -183.9126 \ \text { logMiles } & -0.2955 & 3.3135 & -1.9580 & 2.2103 & 55.8172 \ \text { Fuel } & -104.8944 & 3036.5905 & -183.9126 & 55.8172 & 7913.8812\end{array}$

$5 \times 5$矩阵$\left(\mathbf{X}^{\prime} \mathbf{X}\right)^{-1}$由
$\begin{array}{lrrrrr} & \text { Intercept } & \text { Tax } & \text { Dlic } & \text { Income } & \text { logMiles } \ \text { Intercept } & 9.02151 & -2.852 \mathrm{e}-02 & -4.080 \mathrm{e}-03 & -5.981 \mathrm{e}-02 & -1.932 \mathrm{e}-01 \ \text { Tax } & -0.02852 & 9.788 \mathrm{e}-04 & 5.599 \mathrm{e}-06 & 4.263 \mathrm{e}-05 & 1.602 \mathrm{e}-04 \ \text { Dlic } & -0.00408 & 5.599 \mathrm{e}-06 & 3.922 \mathrm{e}-06 & 1.189 \mathrm{e}-05 & 5.402 \mathrm{e}-06 \ \text { Income } & -0.05981 & 4.263 \mathrm{e}-05 & 1.189 \mathrm{e}-05 & 1.143 \mathrm{e}-03 & 1.000 \mathrm{e}-03 \ \text { logMiles } & -0.19315 & 1.602 \mathrm{e}-04 & 5.402 \mathrm{e}-06 & 1.000 \mathrm{e}-03 & 9.948 \mathrm{e}-03\end{array}$

## 有限元方法代写

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

Days
Hours
Minutes
Seconds

# 15% OFF

## On All Tickets

Don’t hesitate and buy tickets today – All tickets are at a special price until 15.08.2021. Hope to see you there :)