%10.11.13
\documentclass[a4paper, 12pt]{article}
%\usepackage[magyar]{babel}
\usepackage{t1enc}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{hhline}
\usepackage[leqno,intlimits]{amsmath}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
%\usepackage{subfigure}
\usepackage{psfrag}
\usepackage{enumerate}
\usepackage{mdwlist}
% \usepackage{enumitem}
\usepackage{color}
%\usepackage{enumitem}


%\hyphenpenalty=10
\tolerance=1000

\setlength{\marginparwidth}{0pt}
\addtolength{\textwidth}{100pt}
\addtolength{\hoffset}{-50pt}
\addtolength{\textheight}{160pt}
\setlength{\voffset}{-80pt}

\newcommand*{\hop}{\bigskip\noindent}
\newcommand{\TT}{\mathbb{T}}
\newcommand{\Sb}{\mathbb{S}}
\newcommand{\Rb}{\mathbb{R}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\prob}{\mathbb{P}}

\begin{document}
\begin{center}
{\bf Advanced Mathematics for Electrical Engineers B\\
homeworks for the ``Stochastics 2'' part}\\
fall semester 2014
\end{center}
\noindent
Every week, the assigned homeworks are worth 1 point in total.

\begin{itemize}
%
 \item[{\bf HW 1:}] (due date: 15.09.2014 -- \textbf{extended to 24.09.2014})
 \begin{itemize}
   \item[HW 1.1] A server computer has $70$ users. At any given time, some users are ``logged in'' to the server, while others are not.
   On a Monday morning each user wants to log in with probability $\frac{3}{10}$, independently of the other users.
    \begin{enumerate}[a.)]
     \item What is the probability that there will be exactly $21$ users logged in?
     \item If more that $65$ users want to log in, the server becomes overloaded, and will not work correctly. What is the probability that this happens?
    \end{enumerate}
   \item[HW 1.2] Let the random variable $X$ be binomially distributed with parameters $n$ and $p$. Use a calculator or a computer to calculate the value $\prob(X=3)$ \emph{numerically}, with $4$ digits precision, for the following parameter values:
    \begin{enumerate}[a.)]
     \item $n=10$, $p=\frac{2}{10}$
     \item $n=100$, $p=\frac{2}{100}$
     \item $n=1000$, $p=\frac{2}{1000}$
     \item $n=10000$, $p=\frac{2}{10000}$
     \item Calculate the value of $e^{-2}\cdot\frac{2^3}{3!}$, where $e$ is the Euler number $e\approx 2.71828182845905$.
    \end{enumerate}
 \end{itemize}
%
 \item[{\bf HW 2:}] (due date: 01.10.2014)
 \begin{itemize}
   \item[HW 2.1] We toss a fair coin. If the result is heads, we toss it another $2$ times (and then stop). If it is tails, then we toss it another $3$ times (and then stop). Let $X$ denote the total number of heads we see (during all the $3$ or $4$ tosses). Use the law of total expectation to calculate the expectation of $X$.
   \item[HW 2.2] Let the random variable $Y$ have binomial distribution with parameters $n=10$ and $p=\frac13$. 
   \begin{enumerate}[a.)]
     \item Calculate the generating function of $Y$. \emph{(Hint: to calcualte the sum in a closed form, use the binomial theorem: $(a+b)^n=\sum_{k=0}^n \binom{n}{k}a^k b^{n-k}$.)}
     \item Use the properties of the generating function to calcualte the expectation and the variance of $Y$.
    \end{enumerate}
 \end{itemize}
%
\item[{\bf HW 3:}] (due date: 08.10.2014)
\begin{itemize}
\item[HW 3.1] We keep rolling a fair die until we first roll a $6$. Let $X$ denote the \emph{sum} of the numbers rolled before (and not including) that $6$. Calculate
\begin{enumerate}[a.)]
\item the generating function of $X$,
\item the expectation of $X$.
\end{enumerate}
\emph{(Hint: write $X$ as a sum with random number of terms. What is the distribution of the number of terms? \textbf{Warning}: What is the \emph{conditional} distribution of a number rolled \emph{under the condition that it's not a $6$}?)}
%
\item[HW 3.2]
Harry is organizing a \emph{pyramid scheme} in his family.\\ (See http://en.wikipedia.org/wiki/Pyramid\_scheme) The participants are not too persistent: every participant keeps trying to recruit new participants until the first failure (i.e. until he is first rejected). The probability of such a failure is $p$ at every recruit attempt, independently of the history of the scheme.

The first participant is Harry, he forms the $0$-th generation alone. The first generation consists of those recruited (directly) by Harry. The second generation consists of those recruited (directly) by members of the first generation, and so on.

Let $Z_k$ denote the size of the $k$-th generation ($k=0,1,2,\dots$), and let $N$ denote the total number of participants in the scheme (meaning $N=\sum_{k=0}^\infty Z_k$).

Answer the questions below
\begin{enumerate}[I.]
 \item for $p=\frac{2}{3}$,
 \item for $p=\frac{1}{3}$:
\end{enumerate}
%
\begin{enumerate}[a.)]
 \item Let $X$ denote the number of participants recruited directly by Harry (so $Z_1=X$). What is the distribution of $X$? What is the generating function of $X$? \textbf{Answering this question correctly is crucial for the rest of the exercise.}
 \item What is the generating function of $Z_2$?
 \item What is the expectation of $Z_{10}$?
 \item How much is the probability $\prob(Z_3=0)$?
 \item What is the probability that the scheme dies out (that is, one of the generations will already be empty)? \emph{(You only need to answer this for $p=\frac23$. We will learn the solution for $p=\frac13$ later.)}
 \item What is the expectation of $N$?
\end{enumerate}
%
\end{itemize}
%
\item[{\bf HW 4:}] (due date: 15.10.2014)
\begin{itemize}
\item[HW 4.1] Answer question e.) of Exercise 3.2 for $p=\frac13$ (as well as $p=\frac23$).
%
\item[HW 4.2]
%
An internet service provider has $10000$ (ten thousand) clients. The amount of data downloaded by each client is random, with expectation $100 MB$ and standard deviation $200 MB$. The random amounts downloaded by the different clients are independent and identically distributed.

Use the central limit theorem to estimate the probability that the total amount of data downloaded by the clients on a certain day exceeds $1020000 MB$ (one million and twenty thousand Megabytes).
%
\end{itemize}
%

%
\end{itemize}
%

\end{document}

