# Tag Archives: JCM_math340_HW5_F13

## A p.m.f. and expectation example

Let $$X$$ be a random variable with probability mass function

$p(n) = \frac{c}{n!}\quad \text{for \mathbf{N}=0,1,2\cdots}$

and $$p(x)=0$$ otherwise.

1. Find $$c$$. Hint use the Taylor series expansion of $$e^x$$.
2. Compute the probability that $$X$$ is even.
3. Computer the expected value of $$X$$

[Meester ex 2.7.14]

## Prime Dice

Suppose that we have a very special die which has exactly $$k$$ faces where $$k$$ is prime. The faces are numbered $$1,\dots,k$$. We throw the die once and see which number comes up.

1. What would be an appropriate outcome space and probability measure for this random experiment ?
2. Suppose that the events $$A$$ and $$B$$ are independent. Show that $$\mathbf{P}(A)$$ or $$\mathbf{P}(B)$$ is always either 0 or 1. Or in other wards $$A$$ or $$B$$ is always either the full space or the empty set.

[ from Meester, ex 1.7.32]

## Conditioning and Polya’s urn

An urn contains 1 black and 2 white balls. One ball is drawn at random and its color noted. The ball is replaced in the urn, together with an additional ball of its color. There are now four balls in the urn. Again, one ball is drawn at random from the urn, then replaced along with an additional ball of its color. The process continues in this way.

1. Let $$B_n$$ be the number of black balls in the urn just before the $$n$$th ball is drawn. (Thus $$B_1= 1$$.) For $$n \geq 1$$, find $$\mathbf{E} (B_{n+1} | B_{n})$$.
2. For $$n \geq 1$$,  find $$\mathbf{E} (B_{n})$$. [Hint: Use induction based on the previous answer and the fact that $$\mathbf{E}(B_1) =1$$]
3.   For $$n \geq 1$$, what is the expected proportion of black balls in the urn just before the $$n$$th ball is drawn ?

[From pitman p 408, #6]

## Random Errors in a Book

A book has 200 pages. The number of mistakes on each page is a Poisson random variable with mean 0.01, and is independent of the number of mistakes on all other pages.

1. What is the expected number of pages with no mistakes ? What is the variance of the number of pages with no mistakes ?
2. A person proofreading the book finds a given mistake with probability 0.9 . What is the expected number of pages where this person will find a mistake ?
3. What, approximately, is the probability that the book has two or more pages with mistakes ?

[Pitman p235, #15]

## Expectation of hierachical model

Consider the following hierarchical random variable

1. $$\lambda \sim \mbox{Geometric}(p)$$
2. $$Y \mid \lambda \sim \mbox{Poisson}(\lambda)$$
Compute $$\mathbf{E}(Y)$$.

## Random Digit

Let $$D_i$$ be a random digit chosen uniformly from $$\{0,1,2,3,4,5,6,7,8,9\}$$. Assume that each of the $$D_i$$ are independent.

Let $$X_i$$ be the last digit of $$D_i^2$$. So if $$D_i=9$$ then $$D_i^2=81$$ and $$X_i=1$$. Define $$\bar X_n$$ by

$\bar X_n = \frac{X_1 + \cdots+X_n}{n}$

1. Predict the value of $$\bar X_n$$ when $$n$$ is large.
2. Find the number $$\epsilon$$ such that for $$n=10,000$$ the chance that you prediction is off by more than $$\epsilon$$ is about 1/200.
3. Find approximately the least value of $$n$$ such that your prediction of $$\bar X_n$$ is correct to within 0.01 with probability at least 0.99 .
4. If you just had to predict the first digit of  $$\bar X_{100}$$, what digit should you choose to maximize your chance of being correct, and what is that chance ?

[Pitman p206, #30]

## Games with Black and White Balls

Consider the following gambling game for two players, Black and White. Black puts $$b$$ black balls and White puts $$w$$ white balls in a box. Black and White take turns at drawing randomly from the box, with replacement between draws until either Black wins by drawing a black ball or White wins by drawing a white ball. Suppose Black gets to draw first.

1. Calculate $$\mathbf{P}(\text{Black wins})$$ and $$\mathbf{P}(\text{White wins})$$ in terms of $$p=b/(b+w)$$.
2. What value of $$p$$ makes the game fair (equal chances of wining) ?
3. Is the game ever fair ?
4. What is the least total number of balls in the game, $$(b+w)$$, such that neither player has more that that $$51\%$$ chance of winning ?

[Pitman P219, #13]

## The Coupon-Collector

Suppose that there are $$N$$ different types of coupons. Each box contains one coupon. The type of the coupon is chosen uniformly among $$\{1,2,\cdots,N\}$$.

1. If we open $$k$$ boxes what is the expected number of different  coupons thus we will find ? What is the limit  of this quantity as $$k \rightarrow \infty$$ ?
2. Let $$T_k$$, for $$k=1,\cdots,N$$, be the number of boxes needed to obtain the $$k$$th unique type of coupon. Clearly $$T_1=1$$ . For future reference define $$\tau_1=1$$ and $$\tau_k=T_k- T_{k-1}$$ for $$k=2,3,\cdots$$.
1. What is the distribution of $$\tau_k$$ ?
2. What is the expected value of $$T_N$$ ? What is it approximately for $$N$$ large ?
3. What is the variance of $$\mathbf{Var}(T_N)$$?
4. Show that $$\mathbf{SD}(T_N) < cn$$ from some constant $$c>0$$.
5. Use Chebychev’s inequality to show that the probability that for large $$N$$, $$T_N$$ differs from $$N\log(N)$$  by at most only a small multiple of $$N$$ with high probabilty.
3. (***) What is the distribution of $$(T_N- N\log(N) \,)/N$$ as $$N\rightarrow \infty$$ ? Hint: It is not normal !

## Mixture of Poisson

The following is a mixture model. The following experiment is used to draw a random variable $$Y$$. With probability $$p$$  draw from a Poisson distribution with parameter $$\lambda = 1$$ so with probability $$1-p$$ you are drawing from a Poisson distribution with parameter $$\lambda =2$$.

What is $$\mathbf{E}(Y)$$ ?

## Expection and dice rolls

A standard 6 sided die is rolled three times.

1. What is the expected value of the first roll ?
2. What is the expected values of the sum of the three rolls ?
3. What is the expected number of twos appearing in the three rolls ?
4. What is the expected number of sixes appearing in the three rolls ?
5. What is the expected number of odd numbers ?

Based on [Pitman, p. 182 #3]