枚举列表环境按方程分割

枚举列表环境按方程分割

我需要重现以下文字:

文本示例

基本上,我有一个以 (1.) 开始的枚举列表,然后是一个方程环境,然后是一些与先前结束的点 1. 相关的文本,然后是另一个枚举列表。

通常情况下,我会输入以下代码

\documentclass[12pt, a4widepaper]{article}

\usepackage{enumerate}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}
\item Suppose that Susan ... She sets up th regression model:
\end{enumerate}
\begin{equation*}
Y_i = \beta_0+ \beta_i X_i + u_i
\end{equation*}
% TEXT MISSING RELATED TO ITEM ENDED BEFORE EQUATION
\begin{enumerate}
\item Suppose you are interested ...
\end{enumerate}

\end{document}

这样做之后,“与等式前结束的项目相关的缺失文本”将不再被视为环境的一部分\enumerate

最后补充说明:使用此代码,等式环境会在所述等式上方和下方产生空白。有没有办法像本例一样在两个段落之间更好地呈现等式?

答案1

只需输入方程式里面;没有enumerate理由结束它。

如果您觉得在这种情况下应该减少方程式周围的间距,您可以使用enumitem特征,但我认为您不应该这样做。

\documentclass{article}
\usepackage{amsmath}
\usepackage{enumitem}

\DeclareMathOperator{\Var}{Var}
\setlist[enumerate]{
  before=\setlength{\abovedisplayskip}{.5\abovedisplayskip}%
         \setlength{\belowdisplayskip}{\belowdisplayshortskip},
}

\begin{document}

\begin{enumerate}
\item Suppose that Susan is a research analyst working for an insurance 
company. She wants to analyze whether the color of a car has a significant 
effect on the probability of its causing an accident. She has a data set 
for the probability of causing an accident (obtained from other data sources) 
(denoted by~$Y$) and the dummy variable~$X$ which takes the value~$1$ if the 
car's color is red and $0$~otherwise. The observations $\{(X_i,Y_i)\}_{i=1}^n$ 
are i.i.d.\@ and $n=100$. She sets up the regression model:
\begin{equation*}
Y_i = \beta_0+ \beta_i X_i + u_i
\end{equation*}
and assumes that $\Var(X_1)>0$ and $E[u_i\mid X_i]=0$. Susan's regression
estimate of $\beta_1$ has turned out to be $0.15$. Provide a verbal
interpretation of this result.

\item Suppose you are interested in estimating the effect of hours spent in
an SAT preparation course ($\mathit{hours}$) on SAT score ($\mathit{sat}$).
The population is high school seniors for a particular year. Write the
population regression model as
\begin{equation*}
\mathit{sat}=\beta_0+\beta_1\mathit{hours}+u.
\end{equation*}
List at least two factors contained in~$u$. Are these likely to have a
negative or positive correlation with $\mathit{hours}$? Analyze the sign
of the bias of the OLS estimator of $\beta_1$ in the presence of these
omitted factors.
\end{enumerate}

\end{document}

需要注意的几点:

  1. 没有a4widepaper选择
  2. 要么加载,enumerate要么enumitem不加载;后者更可取
  3. 我修复了给定示例中的一些弱点

在此处输入图片描述

相关内容