% 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 09 Continuous Random Variables}
% For single author (just remove % characters)
%\author{\Large Probability}
\vspace{-2cm}
\date{ }
% For two authors (default example)
\maketitle \thispagestyle{empty}

Oct 6, 2005


\begin{enumerate}

\item The cumulative distribution of $X$ is defined as $F(x) = P(X
\leq x)$. $F(-\infty) = 0, F(\infty) =1$.

\item Problem. For $X \sim Binomial(n,p)$,
$$F(x) = \sum_{y=0}^i {n \choose y}p^y(1-p)^{n-y}$$
for integer $i \leq x \leq i+1$.\\

\item Problem. For positive integer valued discrete random variable $X$, show
$$\mathbb{E} X = \sum_{x=1}^{\infty} P(X \geq x).$$
Note $\sum_{x=1}^{\infty} P(X \geq x) = \sum_{x=1}^{\infty}
\sum_{y=x}^{\infty} P(y) = \sum_{y=1}^{\infty}\sum_{x=1}^y p(y) =
\sum_{y=1}^{\infty} yp(y) = \mathbb{E} X.$

\item The constant $\pi$ is usually computed by summing up infinite series, i.e.$$\pi=4\Big(1-\frac{1}{3}+ \frac{1}{5} - \frac{1}{7} + \cdots\Big) = 3.141592 \cdots.$$
The convergence for computing this series is very slow. There is a
radially different way to compute the digits of $\pi$ based on the
theory of probability. Let $A$ be the area of a unit circle bounded
by a unit square $B$. Suppose we throw darts at the square at
random. Let $(X,Y)$ be the coordinates of the dart. It is a pair of
random variables. $X$ is continuously defined at every point of the
continuous domain $A$. This type of random variable is called a {\em
continuous} random variable. Now define binary random variable $Z=1$
if a dart hits $A$ and $Z=0$ if it hits $B/A$.  Now we define $Z_i$
similarly for the $i$-th dart thrown. Then we can show

$$\lim_{n \to \infty} \frac{\sum_{i=1}^n Z_i}{n} \to \pi.$$ The computer
code {\tt MATLAB} to simulate 1,000,000 dart throwing experiment.
\begin{verbatim}
x=rand(100000,1);
y=rand(100000,1);
rsquare=x.^2+y.^2;
accept=find(rsquare <1);
>> accept'
ans =
     2 3 4 5 6 7 8 10 11 15 ...
plot(x(accept),y(accept),'.')
>>4*size(accept,1)/1000000
ans =
    3.1336
\end{verbatim}

\begin{figure}
\centering
\includegraphics[scale=0.2]{lecture09-fig1.eps}
\end{figure}

\item Formally, $X$ is a {\em continuous} random variable if there is
nonnegative function $f$, called {probability density}, such that
$$P(X \in B) = \int_B f(x) \;dx.$$
for every $B \subset \mathbb{R}$. Let $B=[a,b]$. Then
$$P( a \leq X \leq b) = \int_a^b f(x)\; dx.$$
By letting $a=b$, $$P( a \leq X \leq a) = \int_a^a f(x)\;dx = 0.$$
By letting $a=-\infty$ and $b=\infty$, $$1=P( -\infty \leq X \leq
\infty) = \int_{-\infty}^{\infty} f(x)\;dx = 0.$$



\item Let $X$ have the probability density function $f(x)= c|x|$ for $-1 <x<1$
and $f(x)=0$ otherwise, where $|x|$ denotes the absolute value of
$x$. Find the value $c$. {\em solution}. To find $c$, we integrate
$$\int_{-1}^1 c|x| \; dx =
\int_{-1}^0 -cx \; dx + \int_0^1 cx \; dx =1.$$ So $c=1$.

\end{enumerate}



\end{document}
