### 经济代写|计量经济学作业代写Econometrics代考|Conditional Expectation Function

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

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

## 经济代写|计量经济学作业代写Econometrics代考|Conditional Expectation Function

An important determinant of wage levels is education. In many empirical studies economists measure educational attainment by the number of years ${ }^{8}$ of schooling. We will write this variable as education.

The conditional mean of log wages given gender, race, and education is a single number for each

category. For example
$$\mathbb{E}[\log (\text { wage }) \mid \text { gender }=\text { man, } \text { race }=\text { white, education }=12]=2.84 .$$
We display in Figure $2.3$ the conditional means of $\log ($ wage $)$ for white men and white women as a function of education. The plot is quite revealing. We see that the conditional mean is increasing in years of education, but at a different rate for schooling levels above and below nine years. Another striking feature of Figure $2.3$ is that the gap between men and women is roughly constant for all education levels. As the variables are measured in logs this implies a constant average percentage gap between men and women regardless of educational attainment.

In many cases it is convenient to simplify the notation by writing variables using single characters, typically $y, x$ and/or $z$. It is conventional in econometrics to denote the dependent variable (e.g. $\log ($ wage) ) by the letter $y$, a conditioning variable (such as gender) by the letter $x$, and multiple conditioning variables (such as race, education and gender) by the subscripted letters $x_{1}, x_{2}, \ldots, x_{k}$.
Conditional expectations can be written with the generic notation
$$\mathbb{E}\left[y \mid x_{1}, x_{2}, \ldots, x_{k}\right]=m\left(x_{1}, x_{2}, \ldots, x_{k}\right)$$
We call this the conditional expectation function (CEF). The CEF is a function of $\left(x_{1}, x_{2}, \ldots, x_{k}\right)$ as it varies with the variables. For example, the conditional expectation of $y=\log ($ wage $)$ given $\left(x_{1}, x_{2}\right)=($ gender, race) is given by the six entries of Table??. The CEF is a function of (gender, race) as it varies across the entries.
For greater compactness, we will typically write the conditioning variables as a vector in $\mathbb{R}^{k}$ :
$$\boldsymbol{x}=\left(\begin{array}{c} x_{1} \ x_{2} \ \vdots \ x_{k} \end{array}\right)$$

Here we follow the convention of using lower case bold italics $\boldsymbol{x}$ to denote a vector. Given this notation, the CEF can be compactly written as
$$\mathbb{E}[y \mid \boldsymbol{x}]=m(\boldsymbol{x}) \text {. }$$
The CEFE $[y \mid \boldsymbol{x}]$ is a random variable as it is a function of the random variable $\boldsymbol{x}$. It is also sometimes useful to view the CEF as a function of $\boldsymbol{x}$. In this case we can write $m(\boldsymbol{u})=\mathbb{E}[y \mid \boldsymbol{x}=\boldsymbol{u}]$, which is a function of the argument $\boldsymbol{u}$. The expression $\mathbb{E}|y| \boldsymbol{x}=\boldsymbol{u} \mid$ is the conditional expectation of $y$, given that we know that the random variable $\boldsymbol{x}$ equals the specific value $\boldsymbol{u}$. However, sometimes in econometrics we take a notational shortcut and use $\mathbb{E}[y \mid x]$ to refer to this function. Hopefully, the use of $E[y \mid x]$ should be apparent from the context.

## 经济代写|计量经济学作业代写Econometrics代考|Continuous Variables

In the previous sections, we implicitly assumed that the conditioning variables are discrete. However, many conditioning variables are continuous. In this section, we take up this case and assume that the variables $(y, \boldsymbol{x})$ are continuously distributed with a joint density function $f(y, \boldsymbol{x})$.

As an example, take $y=\log ($ wage $)$ and $x=$ experience, the number of years of potential labor market experience ${ }^{9}$. The contours of their joint density are plotted on the left side of Figure $2.4$ for the population of white men with 12 years of education.

Given the joint density $f(y, \boldsymbol{x})$ the variable $\boldsymbol{x}$ has the marginal density
$$f_{x}(\boldsymbol{x})=\int_{-\infty}^{\infty} f\left(y_{1} \boldsymbol{x}\right) d y$$
For any $\boldsymbol{x}$ such that $f_{x}(\boldsymbol{x})>0$ the conditional density of $y$ given $\boldsymbol{x}$ is defined as
$$f_{y \backslash x}(y \mid x)=\frac{f(y, \boldsymbol{x})}{f_{x}(\boldsymbol{x})} .$$

The conditional density is a (renormalized) slice of the joint density $f(y, x)$ holding $\boldsymbol{x}$ fixed. The slice is renormalized (divided by $f_{x}(\boldsymbol{x})$ so that it integrates to one and is thus a density.) We can visualize this by slicing the joint density function at a specific value of $\boldsymbol{x}$ parallel with the $y$-axis. For example, take the density contours on the left side of Figure $2.4$ and slice through the contour plot at a specific value of experience, and then renormalize the slice so that it is a proper density. This gives us the conditional density of $\log ($ wage $)$ for white men with 12 years of education and this level of experience. We do this for four levels of experience $(5,10,25$, and 40 years), and plot these densities on the right side of Figure 2.4. We can see that the distribution of wages shifts to the right and becomes more diffuse as experience increases from 5 to 10 years, and from 10 to 25 years, but there is little change from 25 to 40 years experience.
The CEF of $y$ given $x$ is the mean of the conditional density (2.4)
$$m(\boldsymbol{x})=\mathbb{E}[y \mid \boldsymbol{x}]=\int_{-\infty}^{\infty} y f_{y \mid x}(y \mid x) d y .$$
Intuitively, $m(\boldsymbol{x})$ is the mean of $y$ for the idealized subpopulation where the conditioning variables are fixed at $\boldsymbol{x}$. This is idealized since $\boldsymbol{x}$ is continuously distributed so this subpopulation is infinitely small.
This definition (2.5) is appropriate when the conditional density (2.4) is well defined. However, the conditional mean $m(\boldsymbol{x})$ exists quite generally. In Theorem $2.13$ in Section $2.31$ we show that $m(\boldsymbol{x})$ exists solong as $\mathbb{E}|y|<\infty$.

In Figure $2.4$ the CEF of log(wage) given experience is plotted as the solid line. We can see that the CEF is a smooth but nonlinear function. The CEF is initially increasing in experience, flattens out around experience $=30$, and then decreases for high levels of experience.

## 经济代写|计量经济学作业代写Econometrics代考|Law of Iterated Expectations

An extremely useful tool from probability theory is the law of iterated expectations. An important special case is the known as the Simple Law.
Theorem 2.1 Simple Law of Iterated Expectations If $E|y|<\infty$ then for any random vector $\boldsymbol{x}$,
$$\mathbb{E}[\mathbb{E}[y \mid x]]=\mathbb{E}[y]$$
The simple law states that the expectation of the conditional expectation is the unconditional expectation. In other words the average of the conditional averages is the unconditional average. When $\boldsymbol{x}$ is discrete
$$\mathbb{E}[\mathbb{E}[y \mid x]]=\sum_{j=1}^{\infty} \mathbb{E}\left[y \mid x=x_{j}\right] \mathbb{P}\left[x=x_{j}\right]$$
and when $\boldsymbol{x}$ is continuous
$$\mathbb{E}[\mathbb{E}[y \mid \boldsymbol{x}]]=\int_{\mathrm{x}^{k}} \mathbb{E}[y \mid \boldsymbol{x}] f_{x}(\boldsymbol{x}) d \boldsymbol{x} \text {. }$$
Going back to our investigation of average log wages for men and women, the simple law states that
\begin{aligned} &\mathbb{E}[\log (\text { wage }) \mid \text { gender }=\text { man }] \mathbb{P}[\text { gender }=\text { man }] \ &+\mathbb{E}[\log (\text { wage }) \mid \text { gender }=\text { woman }] \mathbb{P}[\text { gender }=\text { woman }] \ &=\mathbb{E}[\log (\text { wage })] \end{aligned}

Or numerically,
$$3.05 \times 0.57+2.81 \times 0.43=2.95 .$$
The general law of iterated expectations allows two sets of conditioning variables.

## 经济代写|计量经济学作业代写Econometrics代考|Conditional Expectation Function

X=(X1 X2 ⋮ Xķ)

CEFE[是∣X]是随机变量，因为它是随机变量的函数X. 有时将 CEF 视为X. 在这种情况下，我们可以写米(在)=和[是∣X=在]，它是参数的函数在. 表达方式和|是|X=在∣是条件期望是，假设我们知道随机变量X等于特定值在. 然而，有时在计量经济学中，我们采用符号捷径并使用和[是∣X]参考这个功能。希望使用和[是∣X]从上下文中应该是显而易见的。

## 经济代写|计量经济学作业代写Econometrics代考|Continuous Variables

FX(X)=∫−∞∞F(是1X)d是

F是∖X(是∣X)=F(是,X)FX(X).

## 经济代写|计量经济学作业代写Econometrics代考|Law of Iterated Expectations

3.05×0.57+2.81×0.43=2.95.

## 有限元方法代写

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