% This is a simple LaTex sample document that gives a submission format
%   for IEEE PAMI-TC conference submissions.  Use at your own risk.

% Make two column format for LaTex 2e.


\documentclass[11pt,twocolumn]{article} %
\usepackage[dvips]{graphicx,graphics,color}
\usepackage{times,amsmath,amsfonts}
%\usepackage{pancyhdr}
\setlength{\textheight}{10.5in} \setlength{\textwidth}{7in}
\setlength{\columnsep}{0.3in} \setlength{\topmargin}{-0.5in}
\setlength{\headheight}{-0.2in} \setlength{\headsep}{0in}
\setlength{\parindent}{1pc}
\setlength{\oddsidemargin}{-.2in}  % Centers text.
\setlength{\evensidemargin}{-.2in}

% Add the period after section numbers.  Adjust spacing.
\newcommand{\Section}[1]{\vspace{-8pt}\section{\hskip -1em.~~#1}\vspace{-3pt}}
\newcommand{\SubSection}[1]{\vspace{-3pt}\subsection{\hskip -1em.~~#1}
        \vspace{-3pt}}


\newcommand{\bqn}{\begin{eqnarray}}
\newcommand{\eqn}{\end{eqnarray}}
\newcommand{\bq}{\begin{eqnarray*}}
\newcommand{\eq}{\end{eqnarray*}}


\begin{document}

% Don't want date printed
% Make title bold and 14 pt font (Latex default is non-bold, 16pt)

\title{Stat 311-Lecture 14 Conditional distributions}
% For single author (just remove % characters)
%\author{\Large Probability}
\vspace{-2cm}
\date{ }
% For two authors (default example)
\maketitle \thispagestyle{empty}

Nov 10, 2005

\begin{enumerate}

\item The {\em conditional probability mass function} of $Y$ given
$X=x$ is given by $$p(y|x) = \frac{p(x,y)}{p_X(x)}.$$ The
conditional expectation of $Y$ given $X=x$ is then
$$\mathbb{E} (Y|X=x) = \sum_{y} yp(y|x). $$
If $X$ and $Y$ are independent, $\mathbb{E} (Y|X=x) = \mathbb{E} Y$.


\item Problem. Suppose $X, Y \sim Binomial(n,\frac{1}{2})$ and they are independent. Find $\mathbb{E}(X|X+Y=z)$.\\
{\em Solution.} We need to compute the conditional distribution
first. Note $$Z=X+Y \sim Binomial(2n,\frac{1}{2}).$$ Then the
conditional probability mass function is given by
\bq p(x|z)&=&\frac{P(X=x,Y=z-x)}{P(X+Y=z)}\\
&=&\frac{{n \choose x}{n \choose z-x}}{{2n \choose z}}.\eq This is a hypergeometric distribution.\\
\bq &&\mathbb{E}[X|X+Y=z] = \sum_{x=0}^z xp(x|z)\\
&=& \sum_{x=0}^z x \frac{{n \choose x}{n \choose z-x}}{{2n \choose
z}}= \sum_{x=0}^z \frac{n{n-1 \choose x-1}{n \choose
z-x}}{\frac{2n}{z}{2n-1 \choose z-1}}= \frac{z}{2}.\eq


\item The {\em conditional probability density} of $Y$ given $X=x$ is
given by $$f_{Y|X}(y|x) = \frac{f(x,y)}{f_X(x)}.$$ The {\em
conditional expectation} of $Y$ given $X=x$ is $$\mathbb{E}
(Y|X=x)=\int_{-\infty}^{\infty} yf_{Y|X}(y|x)\;dy.$$



\item Problem. Given $f(y_1,y_2) = \frac{1}{y_1}$ for $0 \leq y_2 \leq y_1 \leq
1$ and 0 otherwise, determine $P(Y_2 > \frac{1}{4} | Y_1 =
\frac{1}{2}) =\frac{1}{8}$. $P(Y_1 \geq \frac{1}{2}|Y_2 =4) =
\frac{1}{2}$.






\item Let $X_1, X_2$ be i.i.d. Uniform(0,a) and let $Y_1=\min(X_1,X_2), Y_2=\max(X_1,X_2)$. Find the joint probability density of $Y_1$ and $Y_2$. \\
{\it solution.} First note that $0<y_1<y_2<a$ is the domain for the
joint density. The joint c.d.f. of $Y_1$ and $Y_2$ is
\bq &&F_{Y_1,Y_2}(y_1,y_2) = P(Y_1 \leq y_1, Y_2 \leq y_2) \\
&=& P(Y_2 \leq y_2) - P(Y_1 > y_1,Y_2 \leq y_2) \\
&=& P(X_1 \leq y_2)P(X_2 \leq y_2)\\
&& - P(y_1 < X_1 < y_2)P(y_1 < X_2 < y_2) \\
&=& \Big(\frac{y_2}{a}\Big)^2 - \Big(\frac{y_2-y_1}{a}\Big)^2,
0<y_1<y_2<a.\eq Then the joint density is $f_{Y_1,Y_2}(y_1,y_2) =
\frac{\partial^2}{\partial y_1\partial y_2} F_{Y_1,Y_2}(y_1,y_2) =
\frac{2}{a^2}, 0<y_1<y_2<a.$ So it is a uniform distribution over a
triangle $0 < y_1<y_2<a$.

\end{enumerate}


\end{document}
