\hypertarget chapter-3}{%
\section{Chapter 3}\label{chapter-3}}

\hypertarget{example}{%
\subsubsection{Example}\label{example}}

Suppose there are 30 resistors, 7 of them do not work. You randomly
choose 3 of them. Let \(X\) be the number of defective resistors. Find
the probability distribution of \(X\).

\[ X = [0,3]\]
\[P(X=0) = { {7 \choose 0} {23 \choose 3} \over {30 \choose 3} } = 0.436\]
\[P(X=1) = { {7 \choose 1} {23 \choose 2} \over {30 \choose 3} } = 0.436\]
\[P(X=2) = { {7 \choose 2} {23 \choose 1} \over {30 \choose 3} } = 0.119\]
\[P(X=3) = { {7 \choose 3} {23 \choose 0} \over {30 \choose 3} } = 0.009\]

Probability distribution: \[P(X = x) =
\begin{cases}
0.436 & x=0 \\
0.436 & x=1 \\
0.119 & x=2 \\
0.009 & x=3
\end{cases}
\]

\hypertarget{the-cumulative-distribution-function}{%
\subsection{The Cumulative Distribution
Function}\label{the-cumulative-distribution-function}}

The cumulative distribution function (CDF), \(F(x)\), of a discrete
random variable, \(x\), with probability distribution, \(f(x)\), is:
\[F(x) = P(X \le x)\]

Find CDF for the example above: \[F(0) = P(X \le 0) = P(X = 0) = 0.436\]
\[F(1) = P(X \le 1) = P((X = 0) \cup (X=1)) = 0.872\]
\[F(2) = P(X \le 2) = P((X=0) \cup (X=1) \cup (X=2)) = 0.991\] Since 3
is the largest possible value for \(x\): \[F(3) = P(X \le 3) = 1\]

As a piecewise function: \[F(x) = 
\begin{cases}
0 & x < 0 \\
0.436 & 0 \le x < 1 \\
0.872 & 1 \le x < 2 \\
0.991 & 2 \le x < 3 \\
1 & x \ge 3
\end{cases}\]

\hypertarget{exercise}{%
\subsubsection{Exercise}\label{exercise}}

Suppose that a days production of 850 manufactured parts contains 50
parts that to not conform to customer requirements. 2 parts are selected
at random from the batch. Let \(X\) be the number of non-conforming
parts.

\hypertarget{a}{%
\paragraph{a)}\label{a}}

Find the probability distribution for \(X\)
\[P(X = 0) = { {50 \choose 0} {800 \choose 2} \over {850 \choose 2 }} = 0.8857\]
\[P(X = 1) = { {50 \choose 1} {800 \choose 1} \over {850 \choose 2 }} = 0.1109\]
\[P(X = 2) = { {50 \choose 2} {800 \choose 0} \over {850 \choose 2 }} = 0.0034\]

\[P(X = x) =
\begin{cases}
0.8857 & x=0 \\
0.1109 & x=1 \\
0.0034 & x=2
\end{cases}
\]

\hypertarget{b}{%
\paragraph{b)}\label{b}}

Find the CDF \(F(x)\) \[F(x) = 
\begin{cases}
0 & x < 0 \\
0.8857 & 0 \le x < 1 \\
0.9966 & 1 \le x < 2 \\
1 & x \ge 2
\end{cases}\]

\hypertarget{c}{%
\paragraph{c)}\label{c}}

Plot \(F(x)\):

\hypertarget{continuous-probability-distributions}{%
\subsection{Continuous Probability
Distributions}\label{continuous-probability-distributions}}

A continuous random variable is a variable that can take on any value
within a range. It takes on infinitely many possible value within the
range. \includegraphics{NormalDistribution.png}

For a continuous distribution, \(f(x)\): \[P(X = x) = 0\]
\[P(x_0 \le X \le x_1) = \int\limits_{x_0}^{x_1} f(x) dx\]
\[P(X \ge x_0) = \int\limits_{x_0}^{\infty} f(x) dx\]

\hypertarget{definition}{%
\subsubsection{Definition}\label{definition}}

The function, \(f(x)\), is a probability density function fo the
continuous random variable, \(X\), defined over \(\Reals\) if:

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
  \[f(x) \ge 0, \forall x \in \Reals\]
\item
  \[\int\limits_{-\infty}^{\infty} f(x) dx = 1\]
\item
  \[P(x_0 \le X \le x_1) = P(x_0 < X < x_1)\] \[= P(x_0 \le X < x_1)\]
  \[= P(x_0 < X \le x_1)\]
\end{enumerate}

\hypertarget{example-1}{%
\subsubsection{Example}\label{example-1}}

Suppose that the error in the reaction temperature in
\(^\circ \text{C}\) for a controlled lab experiment is a continuous
random variable, \(X\), having PDF: \[f(x) =
\begin{cases}
{x^2 \over 3} & -1 < x < 2 \\
0 & elsewhere
\end{cases}\]

\hypertarget{a-1}{%
\paragraph{a)}\label{a-1}}

Verify that \(f(x)\) is a PDF.
\[\int\limits_{-1}^{2} {x^2 \over 3} dx \stackrel{?}{=} 1\]
\[{1 \over 3} \left[{1 \over 3} x^3 \Big\vert_{-1}^{2}\right] = {1\over9}[8- (-1)] = 1\]

\hypertarget{b-1}{%
\paragraph{b)}\label{b-1}}

Find \(P(0 < X < 0.5)\):
\[P(0 < X < 0.5) = \int\limits_0^{0.5} {x^2 \over 3}dx\]
\[{1\over9}\left[x^3 \Big|_0^{0.5}\right] = {1\over9}[0.125] = 0.01389\]

\hypertarget{definition-1}{%
\subsubsection{Definition}\label{definition-1}}

The CDF, \(F(x)\) of a continuous random variabl, \(X\), with
probability density function \(f(x)\) is:
\[F(x) = P(X \le x) = \int\limits_{-\infty}^x f(t) dt\]

\textbf{Note:}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
  \[P(a < X < b) = F(b) - F(a)\]
\item
  \[f(x) = {d\over dx}F(x)\]
\end{enumerate}

\hypertarget{example-2}{%
\subsubsection{Example}\label{example-2}}

Find the CDF of the previous example \[f(x) =
\begin{cases}
{x^2 \over 3} & -1 < x < 2 \\
0 & elsewhere
\end{cases}\]

\[F(x) = \int\limits_{-1}^x {t^2 \over 3} dt\]
\[{1/over 9}\left[t^3\Big|_{-1}^x\right] = {1\over 9}\left[x^3 + 1\right]\]
\[F(x) = \begin{cases}
0 & t < -1 \\
{1\over 9} \left[x^3 + 1\right] & -1 \le x \le 2 \\
1 & elsewhere
\end{cases}\]

\hypertarget{example-3}{%
\subsubsection{Example}\label{example-3}}

The proportion of the budget for a certain type of industrial copany
that is allotted to environmential and pollution control is coming under
scrutiny. A data collection project determines that the distribution of
these proportions is given by: \[f(y) = \begin{cases}
k(1-y)^4 & 0 \le y \le 1 \\
0 & elsewhere
\end{cases}\]

Find \(k\) that renders \$f(y) a valid density function:
\[\int\limits_0^1 k(1-y)^4dy = 1\] \[{k\over5} = 1\]
\[\therefore k = 5\]
