在下面的例子中,是否可以对花括号右侧的不等式宽容一些,以便它(并且只有那部分)可以延伸到边距之外?(这样,左侧的编号和等式都可以在同一行中)
\documentclass[leqno,10pt]{article}
\usepackage{soul}
\usepackage[margin=0.75in]{geometry}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 3}
\usepackage{mathtools}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\newtheorem*{mydef}{Definition}
\newtheorem*{mycases}{Special Cases}
\title{\ul{Conditional Expectations in Bivariate Probability Distribution}}
\date{}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%
\begin{description}%
}{%
\end{description}%
}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\providecommand\given{}
\DeclarePairedDelimiterX{\EV}[1]{E(}{)}{\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,} #1}
\providecommand\iven{}
\DeclarePairedDelimiterX{\V}[1]{V(}{)}{\renewcommand\iven{\nonscript\,\delimsize\vert\nonscript\,} #1}
\begin{document}
\newenvironment{Myitemize}{%
\renewcommand{\labelitemi}{{}}%
\begin{itemize}[nosep]}{\end{itemize}}
\maketitle
\newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets
\newcommand\litem[1]{\item{\bfseries {#1}}}
\thispagestyle{fancy}
\begin{mydef}
If the random vector $(X,Y)$ has joint \textbf{pdf} $f(x,y)$ with conditional \textbf{pdf} $g_{2}(y|x)$, and if $Z=h(X,Y)$ is a (single-valued) function of (X,Y). Then the conditional expectation of the random variable $Z$, given $X=x$ is
\begin{equation}
E(Z|x)=\int_{-\infty}^{\infty}{h(x,y)g_{2}(y|x)dy}
\label{eq:}
\end{equation}
\end{mydef}
\begin{mycases}
(a,b,c are constants; ($X^{*}=X-E(X); Y^{*}=Y-E(Y)$)\\
\begin{flalign}\label{cas}
& Z=a+bX+cY & \Rightarrow\quad & \!\begin{aligned}[t]\EV{Z \given x}&=\EV{a \given x}+b.\EV{X \given x}+c.\EV{Y \given x} \\&= a+bx+c.\EV{Y \given x} \end{aligned} &\hphantom{Z=a+bX+cY\quad(2)} & \\
& Z=XY & \Rightarrow\quad & \EV{Z \given x} = x\EV{Y \given x}\\
& Z = Y & \Rightarrow\quad & \EV{Z \given x} = \EV{Y \given x} = \mu_{Y|x} = \text{The CE of Y given X}\\
& Z=(Y-\mu_{Y|X})^{2} &\Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} = \sigma^{2}_{Y|x}=\text{The CV of Y given X}
\smash{\raisebox{-10pt}{$\left.\rule{0pt}{17pt}\right\} \EV{(Y-\mu_{Y|X})^{2} \given X}\leq \EV{Y-\mu_{Y})^{2} \given X}$}}\\
& Z=(Y-\mu_{Y})^{2} & \Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} + (\mu_{Y|x}-\mu_{Y})^2
\end{flalign}
\end{mycases}
\end{document}
答案1
这符合您的要求,但您可以考虑另一种方法,因为它会推到纸张边缘。尽管如此,我对您的 MWE 做了两件事。首先,我将 包裹\smash{}
在 中\rlap
,如\rlap{\smash{}}
。这具有忽略 参数\rlap
从当前位置向右重叠时占用的水平空间的效果(因此它可以防止 LaTeX 检测到相关的边距超限)。我还在\!
括号后插入了一个小的负空间,以尝试在右边距提供一些缓解。
\documentclass[leqno,10pt]{article}
\usepackage{soul}
\usepackage[margin=0.75in]{geometry}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 3}
\usepackage{mathtools}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\newtheorem*{mydef}{Definition}
\newtheorem*{mycases}{Special Cases}
\title{\ul{Conditional Expectations in Bivariate Probability Distribution}}
\date{}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%
\begin{description}%
}{%
\end{description}%
}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\providecommand\given{}
\DeclarePairedDelimiterX{\EV}[1]{E(}{)}{\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,} #1}
\providecommand\iven{}
\DeclarePairedDelimiterX{\V}[1]{V(}{)}{\renewcommand\iven{\nonscript\,\delimsize\vert\nonscript\,} #1}
\begin{document}
\newenvironment{Myitemize}{%
\renewcommand{\labelitemi}{{}}%
\begin{itemize}[nosep]}{\end{itemize}}
\maketitle
\newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets
\newcommand\litem[1]{\item{\bfseries {#1}}}
\thispagestyle{fancy}
\begin{mydef}
If the random vector $(X,Y)$ has joint \textbf{pdf} $f(x,y)$ with conditional \textbf{pdf} $g_{2}(y|x)$, and if $Z=h(X,Y)$ is a (single-valued) function of (X,Y). Then the conditional expectation of the random variable $Z$, given $X=x$ is
\begin{equation}
E(Z|x)=\int_{-\infty}^{\infty}{h(x,y)g_{2}(y|x)dy}
\label{eq:}
\end{equation}
\end{mydef}
\begin{mycases}
(a,b,c are constants; ($X^{*}=X-E(X); Y^{*}=Y-E(Y)$)\\
\begin{flalign}\label{cas}
& Z=a+bX+cY & \Rightarrow\quad & \!\begin{aligned}[t]\EV{Z \given x}&=\EV{a \given x}+b.\EV{X \given x}+c.\EV{Y \given x} \\&= a+bx+c.\EV{Y \given x} \end{aligned} &\hphantom{Z=a+bX+cY\quad(2)} & \\
& Z=XY & \Rightarrow\quad & \EV{Z \given x} = x\EV{Y \given x}\\
& Z = Y & \Rightarrow\quad & \EV{Z \given x} = \EV{Y \given x} = \mu_{Y|x} = \text{The CE of Y given X}\\
& Z=(Y-\mu_{Y|X})^{2} &\Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} = \sigma^{2}_{Y|x}=\text{The CV of Y given X}
\rlap{\smash{\raisebox{-10pt}{$\left.\rule{0pt}{17pt}\right\}\!\EV{(Y-\mu_{Y|X})^{2} \given X}\leq \EV{Y-\mu_{Y})^{2} \given X}$}}}\\
& Z=(Y-\mu_{Y})^{2} & \Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} + (\mu_{Y|x}-\mu_{Y})^2
\end{flalign}
\end{mycases}
\end{document}
以下是使用堆栈的替代方法,它遵循边距:
\documentclass[leqno,10pt]{article}
\usepackage{soul}
\usepackage[margin=0.75in]{geometry}
\usepackage{stackengine}
\stackMath
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 3}
\usepackage{mathtools}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\newtheorem*{mydef}{Definition}
\newtheorem*{mycases}{Special Cases}
\title{\ul{Conditional Expectations in Bivariate Probability Distribution}}
\date{}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%
\begin{description}%
}{%
\end{description}%
}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\providecommand\given{}
\DeclarePairedDelimiterX{\EV}[1]{E(}{)}{\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,} #1}
\providecommand\iven{}
\DeclarePairedDelimiterX{\V}[1]{V(}{)}{\renewcommand\iven{\nonscript\,\delimsize\vert\nonscript\,} #1}
\begin{document}
\newenvironment{Myitemize}{%
\renewcommand{\labelitemi}{{}}%
\begin{itemize}[nosep]}{\end{itemize}}
\maketitle
\newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets
\newcommand\litem[1]{\item{\bfseries {#1}}}
\thispagestyle{fancy}
\begin{mydef}
If the random vector $(X,Y)$ has joint \textbf{pdf} $f(x,y)$ with conditional \textbf{pdf} $g_{2}(y|x)$, and if $Z=h(X,Y)$ is a (single-valued) function of (X,Y). Then the conditional expectation of the random variable $Z$, given $X=x$ is
\begin{equation}
E(Z|x)=\int_{-\infty}^{\infty}{h(x,y)g_{2}(y|x)dy}
\label{eq:}
\end{equation}
\end{mydef}
\begin{mycases}
(a,b,c are constants; ($X^{*}=X-E(X); Y^{*}=Y-E(Y)$)\\
\begin{flalign}\label{cas}
& Z=a+bX+cY & \Rightarrow\quad & \!\begin{aligned}[t]\EV{Z \given x}&=\EV{a \given x}+b.\EV{X \given x}+c.\EV{Y \given x} \\&= a+bx+c.\EV{Y \given x} \end{aligned} &\hphantom{Z=a+bX+cY\quad(2)} & \\
& Z=XY & \Rightarrow\quad & \EV{Z \given x} = x\EV{Y \given x}\\
& Z = Y & \Rightarrow\quad & \EV{Z \given x} = \EV{Y \given x} = \mu_{Y|x} = \text{The CE of Y given X}\\
& Z=(Y-\mu_{Y|X})^{2} &\Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} = \sigma^{2}_{Y|x}=\text{The CV of Y given X}
\rlap{\smash{\raisebox{-10pt}{$\left.\rule{0pt}{17pt}\right\}\quad
\def\stackalignment{r}
\stackanchor{\EV{(Y-\mu_{Y|X})^{2} \given X}\leq\quad}{\EV{Y-\mu_{Y})^{2} \given X}}$}}}\\
& Z=(Y-\mu_{Y})^{2} & \Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} + (\mu_{Y|x}-\mu_{Y})^2
\end{flalign}
\end{mycases}
\end{document}
答案2
使用\mathrlap
(来自mathtools
),您可以实现您想要的。这不是一个可取的做法,但在某些情况下也许是可以接受的。可以放置\Rightarrow
更靠左的位置,在对齐的第三列中插入相关的水平空格(有待通过实验确定)。
以下是详细信息:
\documentclass[leqno,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{soulutf8}
\usepackage[margin=0.75in]{geometry}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 3}
\usepackage{mathtools}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\theoremstyle{definition}
\newtheorem*{mydef}{Definition}
\newtheorem*{mycases}{Special Cases}
\title{\ul{Conditional Expectations in Bivariate Probability Distribution}}
\date{}
\providecommand\given{}
\DeclarePairedDelimiterXPP\EV[1]{E}(){}{
\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,}
#1}
\DeclarePairedDelimiterXPP\V[1]{V}(){}{
\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,}
#1}
\begin{document}
\newenvironment{Myitemize}{%
\renewcommand{\labelitemi}{{}}%
\begin{itemize}[nosep]}{\end{itemize}}
\maketitle
\newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets
\newcommand\litem[1]{\item{\bfseries {#1}}}
\thispagestyle{fancy}
\begin{mydef}
If the random vector $(X,Y)$ has joint \textbf{pdf} $f(x,y)$ with conditional \textbf{pdf} $g_{2}(y\,\vert\,x)$, and if $Z=h(X,Y)$ is a (single-valued) function of (X,Y). Then the conditional expectation of the random variable $Z$, given $X=x$ is
\begin{equation}
\EV{Z \given x}=\int_{-\infty}^{\infty}{h(x,y)g_{2}(y\,\vert\, x)dy}
\label{eq:}
\end{equation}
\end{mydef}
\begin{mycases}
(a,b,c are constants; ($X^{*}=X-E(X); Y^{*}=Y-E(Y)$)\\
\begin{flalign}\label{cas}
& Z=a+bX+cY & \Rightarrow\quad &\EV{Z \given x}\!\begin{aligned}[t] &= \EV{a \given x}+b.\EV{X \given x}+c.\EV{Y \given x} \\&= a+bx+c.\EV{Y \given x} \end{aligned} & \hskip 5.1cm &
\\
& Z=XY & \Rightarrow \quad & \EV{Z \given x} = x\EV{Y \given x} & & \\
& Z = Y & \Rightarrow\quad& \EV{Z \given x} = \EV{Y \given x} = \mu_{Y|x} = \text{The CE of Y given X}\\
& Z=(Y-\mu_{Y|X})^{2} &\Rightarrow\quad & \mathrlap{\begin{rcases}\EV{Z \given x} = \V{Y \given x} = \sigma^{2}_{Y|x}=\text{The CV of Y given X}
\end{rcases}\EV{(Y-\mu_{Y|X})^{2} \given X}\leq\EV{()Y-\mu_{Y})^{2} \given X}}&
\\
& Z=(Y-\mu_{Y})^{2} & \Rightarrow\quad & \EV{Z \given x} = \V{Y \given x} + (\mu_{Y|x}-\mu_{Y})^2
\end{flalign}
\end{mycases}
\end{document}