在这种情况下可以应用数组环境吗?

在这种情况下可以应用数组环境吗?

请考虑以下文档:

基本上我想要的是两件事:

右侧的花括号包含下面的方程式 (5) 和 (6)(在环境中flalign)。我希望从花括号得到\Rightarrow一个方程式 (a=b)。

\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}\\
 & 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

我承认这是一个临时解决方案(也就是说,它是针对你的具体问题而量身定制的,而不是通用的方法),但我在倒数第二个等式的末尾添加了以下内容: \quad\smash{\raisebox{-10pt}{$\left.\rule{0pt}{17pt}\right\} a=b$}}

\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}
\quad\smash{\raisebox{-10pt}{$\left.\rule{0pt}{17pt}\right\} a=b$}}\\
 & 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}

在此处输入图片描述

相关内容