71 problems found
Let \(X\) be a random variable which takes only the finite number of different possible real values \(x_{1},x_{2},\ldots,x_{n}.\) Define the expectation \(\mathbb{E}(X)\) and the variance \(\var(X)\) of \(X\). Show that , if \(a\) and \(b\) are real numbers, then \(\E(aX+b)=a\E(X)+b\) and express \(\var(aX+b)\) similarly in terms of \(\var(X)\). Let \(\lambda\) be a positive real number. By considering the contribution to \(\var(X)\) of those \(x_{i}\) for which \(\left|x_{i}-\E(X)\right|\geqslant\lambda,\) or otherwise, show that \[ \mathrm{P}\left(\left|X-\E(X)\right|\geqslant\lambda\right)\leqslant\frac{\var(X)}{\lambda^{2}}\,. \] Let \(k\) be a real number satisfying \(k\geqslant\lambda.\) If \(\left|x_{i}-\E(X)\right|\leqslant k\) for all \(i\), show that \[ \mathrm{P}\left(\left|X-\E(X)\right|\geqslant\lambda\right)\geqslant\frac{\var(X)-\lambda^{2}}{k^{2}-\lambda^{2}}\,. \]
Solution: Definition: \(\displaystyle \mathbb{E}(X) = \sum_{i=1}^n x_i \mathbb{P}(X = x_i)\) Definition: \(\displaystyle \mathrm{Var}(X) = \sum_{i=1}^n (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i)\) Claim: \(\mathbb{E}(aX+b) = a\mathbb{E}(X)+b\) Proof: \begin{align*} \mathbb{E}(aX+b) &= \sum_{i=1}^n (ax_i+b) \mathbb{P}(X = x_i) \\ &= a\sum_{i=1}^n x_i \mathbb{P}(X = x_i) + b\sum_{i=1}^n \mathbb{P}(X = x_i)\\ &= a \mathbb{E}(X) + b \end{align*} Claim: \(\mathrm{Var}(aX+b) = a^2 \mathrm{Var}(X)\) Claim: \(\mathrm{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right)\leqslant\frac{\mathrm{var}(X)}{\lambda^{2}}\) Proof: \begin{align*} \mathrm{Var}(X) &= \sum_{i=1}^n (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i) \\ &\geq \sum_{|x_i - \mathbb{E}(X)| \geq \lambda} (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i) \\ &\geq \sum_{|x_i - \mathbb{E}(X)| \geq \lambda} \lambda^2 \mathbb{P}(X = x_i) \\ &= \lambda^2 \sum_{|x_i - \mathbb{E}(X)| \geq \lambda} \mathbb{P}(X = x_i) \\ &= \lambda^2 \mathrm{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right) \end{align*} Claim: \[ \mathrm{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right)\geqslant\frac{\mathrm{var}(X)-\lambda^{2}}{k^{2}-\lambda^{2}}\,. \] Proof: \begin{align*} && \mathrm{Var}(X) &= \sum_{i=1}^n (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i) \\ &&&= \sum_{|x_i - \mathbb{E}(X)| \geq \lambda} (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i) + \sum_{|x_i - \mathbb{E}(X)| < \lambda} (x_i-\mathbb{E}(X))^2 \mathbb{P}(X = x_i) \\ &&& \leq \sum_{|x_i - \mathbb{E}(X)| \geq \lambda} k^2 \mathbb{P}(X = x_i) + \sum_{|x_i - \mathbb{E}(X)| < \lambda} \lambda^2 \mathbb{P}(X = x_i) \\ &&&= k^2 \mathbb{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right) + \lambda^2 \mathbb{P}\left(\left|X-\mathrm{E}(X)\right| < \lambda\right) \\ &&&= k^2 \mathbb{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right) + \lambda^2(1- \mathbb{P}\left(\left|X-\mathrm{E}(X)\right| \leq \lambda\right) \\ &&&= (k^2 - \lambda^2) \mathbb{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right) + \lambda^2 \\ \Rightarrow&& \frac{\mathrm{Var}(X)-\lambda^2}{k^2 - \lambda^2} &\leq \mathbb{P}\left(\left|X-\mathrm{E}(X)\right|\geqslant\lambda\right) \end{align*} [Note: This result is known as Chebyshev's inequality, and is an important starting point to understanding the behaviour of tails of random variables]
I have a bag containing \(M\) tokens, \(m\) of which are red. I remove \(n\) tokens from the bag at random without replacement. Let \[ X_{i}=\begin{cases} 1 & \mbox{ if the ith token I remove is red;}\\ 0 & \mbox{ otherwise.} \end{cases} \] Let \(X\) be the total number of red tokens I remove.
Solution:
The probability of throwing a head with a certain coin is \(p\) and the probability of throwing a tail is \(q=1-p\). The coin is thrown until at least two heads and at least two tails have been thrown; this happens when the coin has been thrown \(N\) times. Write down an expression for the probability that \(N=n\). Show that the expectation of \(N\) is $$ 2\bigg({1\over pq} -1-pq\bigg). $$
Solution: This can either occur via \(N-2\) heads and \(1\) tail in the first \(N-1\) flips, followed by a tail, or \(N-2\) tails and \(1\) head in the first \(N-1\) flips, followed by another head, ie \begin{align*} \mathbb{P}(N = n) &= \underbrace{\binom{n-1}{1}}_{\text{ways to choose when the first tail occurs}}p^{n-2}q^2 + \underbrace{\binom{n-1}{1}}_{\text{ways to choose when the first head occurs}}q^{n-2}p^2 \\ &= (n-1)p^2q^2(p^{n-4}+q^{n-4}) \\ \\ \mathbb{E}(N) &= \sum_{n=4}^{\infty} n \cdot \mathbb{P}(N = n) \\ &= \sum_{n=4}^{\infty} n \cdot (n-1)p^2q^2(p^{n-4}+q^{n-4}) \\ &= \sum_{n=4}^{\infty} n \cdot (n-1)(p^{n-2}q^2+q^{n-2}p^2) \\ &= q^2\sum_{n=4}^{\infty} n(n-1)p^{n-2}+p^2\sum_{n=4}^{\infty} n(n-1)q^{n-2} \\ &= q^2\left ( \sum_{n=2}^{\infty} n(n-1)p^{n-2} -2 \cdot 1 - 3 \cdot 2 \cdot p\right)+p^2\left ( \sum_{n=2}^{\infty} n(n-1)q^{n-2} - 2-6q\right) \\ &= q^2\left ( 2(1-p)^{-3} -2 - 6 p\right)+p^2\left ( 2(1-q)^{-3} - 2-6q\right) \\ &= q^2\left ( 2q^{-3} -2 - 6 p\right)+p^2\left ( 2p^{-3} - 2-6q\right) \\ &= \frac{2}{q} - 2q^2 - 6pq^2+\frac{2}{p} -2p^2-6p^2q \\ &= \frac{2}{q}+\frac2p - 2(p^2+q^2) - 6pq \\ &= \frac{2}{pq} - 2((p+q)^2-2pq) - 6pq \\ &= \frac{2}{pq} - 2 -2pq \\ &= 2 \left (\frac1{pq} - 1 - pq \right) \end{align*}
Integers \(n_{1},n_{2},\ldots,n_{r}\) (possibly the same) are chosen independently at random from the integers \(1,2,3,\ldots,m\). Show that the probability that \(\left|n_{1}-n_{2}\right|=k\), where \(1\leqslant k\leqslant m-1\), is \(2(m-k)/m^{2}\) and show that the expectation of \(\left|n_{1}-n_{2}\right|\) is \((m^{2}-1)/(3m)\). Verify, for the case \(m=2\), the result that the expection of \(\left|n_{1}-n_{2}\right|+\left|n_{2}-n_{3}\right|\) is \(2(m^{2}-1)/(3m).\) Write down the expectation, for general \(m\), of \[ \left|n_{1}-n_{2}\right|+\left|n_{2}-n_{3}\right|+\cdots+\left|n_{r-1}-n_{r}\right|. \] Desks in an examination hall are placed a distance \(d\) apart in straight lines. Each invigilator looks after one line of \(m\) desks. When called by a candidate, the invigilator walks to that candidate's desk, and stays there until called again. He or she is equally likely to be called by any of the \(m\) candidates in the line but candidates never call simultaneously or while the invigilator is attending to another call. At the beginning of the examination the invigilator stands by the first desk. Show that the expected distance walked by the invigilator in dealing with \(N+1\) calls is \[ \frac{d(m-1)}{6m}[2N(m+1)+3m]. \]
The random variables \(X\) and \(Y\) take integer values \(x\) and \(y\) respectively which are restricted by \(x\geqslant1,\) \(y\geqslant1\) and \(2x+y\leqslant2a\) where \(a\) is an integer greater than 1. The joint probability is given by \[ \mathrm{P}(X=x,Y=y)=c(2x+y), \] where \(c\) is a positive constant, within this region and zero elsewhere. Obtain, in terms of \(x,c\) and \(a,\) the marginal probability \(\mathrm{P}(X=x)\) and show that \[ c=\frac{6}{a(a-1)(8a+5)}. \] Show that when \(y\) is an even number the marginal probability \(\mathrm{P}(Y=y)\) is \[ \frac{3(2a-y)(2a+2+y)}{2a(a-1)(8a+5)} \] and find the corresponding expression when \(y\) is off. Evaluate \(\mathrm{E}(Y)\) in terms of \(a\).
A target consists of a disc of unit radius and centre \(O\). A certain marksman never misses the target, and the probability of any given shot hitting the target within a distance \(t\) from \(O\) it \(t^{2}\), where \(0\leqslant t\leqslant1\). The marksman fires \(n\) shots independently. The random variable \(Y\) is the radius of the smallest circle, with centre \(O\), which encloses all the shots. Show that the probability density function of \(Y\) is \(2ny^{2n-1}\) and find the expected area of the circle. The shot which is furthest from \(O\) is rejected. Show that the expected area of the smallest circle, with centre \(O\), which encloses the remaining \((n-1)\) shots is \[ \left(\frac{n-1}{n+1}\right)\pi. \]
Solution: Another way to describe \(Y\) is the maximum distance of any shot from \(O\). Let \(X_i\), \(1 \leq i \leq n\) be the \(n\) shots then, \begin{align*} F_Y(y) &= \mathbb{P}(Y \leq y) \\ &= \mathbb{P}(X_i \leq y \text{ for all } i) \\ &= \prod_{i=1}^n \mathbb{P}(X_i \leq y) \tag{each shot independent}\\ &= \prod_{i=1}^n y^2\\ &= y^{2n} \end{align*} Therefore \(f_Y(y) = \frac{\d}{\d y} (y^{2n}) = 2n y^{2n-1}\). \begin{align*} \mathbb{E}(\pi Y^2) &= \int_0^1\pi y^2 \f_Y(y) \d y \\ &=\pi \int_0^1 2n y^{2n+1} \d y \\ &=\left ( \frac{n}{n+1} \right )\pi \end{align*}. Let \(Z\) be the distance of the second furthest shot, then: \begin{align*} && F_Z(z) &= \mathbb{P}(Z \leq z) \\ &&&= \mathbb{P}(X_i \leq z \text{ for at least } n - 1\text{ different } i) \\ &&&= n\mathbb{P}(X_i \leq z \text{ for all but 1}) + \mathbb{P}(X_i \leq z \text{ for all } i) \\ &&&= n \left ( \prod_{i=1}^{n-1} \mathbb{P}(X_i \leq z) \right) \mathbb{P}(X_n > z) + z^{2n} \\ &&&= nz^{2n-2}(1-z^2) + z^{2n} \\ &&&= nz^{2n-2} -(n-1)z^{2n} \\ \Rightarrow && f_Z(z) &= n(2n-2)z^{2n-3}-2n(n-1)z^{2n-1} \\ \Rightarrow && \mathbb{E}(\pi Z^2) &= \int_0^1 \pi z^2 \left (n(2n-2)z^{2n-3}-2n(n-1)z^{2n-1} \right) \d z \\ &&&= \pi \left ( \frac{n(2n-2)}{2n} - \frac{2n(n-1)}{2n+2}\right) \\ &&&= \left ( \frac{n-1}{n+1} \right) \pi \end{align*}
I can choose one of three routes to cycle to school. Via Angle Avenue the distance is 5\(\,\)km, and I am held up at a level crossing for \(A\) minutes, where \(A\) is a continuous random variable uniformly distributed between \(0\) and 10. Via Bend Boulevard the distance is 4\(\,\)km, and I am delayed, by talking to each of \(B\) friends for 3\(\,\)minutes, for a total of \(3B\) minutes, where \(B\) is a random variable whose distribution is Poisson with mean 4. Via Detour Drive the distance should be only 2\(\,\)km, but in addition, due to never-ending road works, there are five places at each of which, with probability \(\frac{4}{5},\) I have to make a detour that increases the distance by 1\(\,\)km. Except when delayed by talking to friends or at the level crossing, I cycle at a steady 12\(\,\)km\(\,\)h\(^{-1}\). For each of the three routs, calculate the probability that a journey lasts at least 27 minutes. Each day I choose one of the three routes at random, and I am equally likely to choose any of the three alternatives. One day I arrive at school after a journey of at least 27 minutes. What is the probability that I came via Bend Boulevard? Which route should I use all the time: \begin{questionparts} \item if I wish my average journey time to be as small as possible; \item if I wish my journey time to be less than 32 minutes as often as possible? \end{questionpart} Justify your answers.
Solution: \(A \sim 5\cdot 5 + U[0,10]\) \(B \sim 4 \cdot 5 + 3 \textrm{Po}(4)\) \(C \sim 2 \cdot 5 + B(5, \frac{4}{5}) \cdot 5\) \begin{align*} && \mathbb{P}(A \leq 27) &= \mathbb{P}(U \leq 2) = 0.2 \\ && \mathbb{P}(B \leq 27) &= \mathbb{P}(3 \textrm{Po}(4) \leq 7) \\\ &&&= \mathbb{P}(Po(4) \leq 2) \\ &&&= e^{-4}(1 + 4 + \frac{4^2}{2}) \\ &&&= 0.23810\ldots \\ && \mathbb{P}(C \leq 27) &= \mathbb{P}(5 \cdot B(5,\tfrac45) \leq 17) \\ &&&= \mathbb{P}(B(5,\tfrac45) \leq 3) \\ &&&= \binom{5}{0} (\tfrac15)^5 + \binom{5}{1} (\tfrac45)(\tfrac 15)^4+ \binom{5}{2} (\tfrac45)^2(\tfrac 15)^3 + \binom{5}3 (\tfrac45)^3(\tfrac 15)^2+\\ &&&= 0.26272 \end{align*} \begin{align*} \mathbb{P}(\text{came via B} | \text{at least 27 minutes}) &= \frac{\mathbb{P}(\text{came via B and at least 27 minutes})}{\mathbb{P}(\text{at least 27 minutes})} \\ &= \frac{\frac13 \cdot 0.23810\ldots }{\frac13 \cdot 0.2 + \frac13 \cdot 0.23810\ldots + \frac13 \cdot 0.26272} \\ &= 0.3397\ldots \\ &= 0.340 \, \, (3\text{ s.f.}) \end{align*}
The continuous random variable \(X\) is uniformly distributed over the interval \([-c,c].\) Write down expressions for the probabilities that:
Solution:
Let \(X\) be a standard normal random variable. If \(M\) is any real number, the random variable \(X_{M}\) is defined in terms of \(X\) by \[ X_{M}=\begin{cases} X & \mbox{if }X < M,\\ M & \mbox{if }X\geqslant M. \end{cases} \] Show that the expectation of \(X_{M}\) is given by \[ \mathrm{E}(X_{M})=-\phi(M)+M(1-\Phi(M)), \] where \(\phi\) is the probability density function, and \(\Phi\) is the cumulative distribution function of \(X\). Fifty times a year, 1024 tourists disembark from a cruise liner at the port of Slaka. From there they must travel to the capital either by taxi or by bus. Officials of HOGPo are equally likely to direct a tourist to the bus station or to the taxi rank. Each bus of the bus coorperative holds 31 passengers, and the coorperative currently runs 16 buses. The bus coorperative makes a profit of 1 vloska for each passenger carried. It carries all the passengers it can, with any excess being (eventually) transported by taxi. What is the largest annual bribe the bus coorperative should consider paying to HOGPo in order to be allowed to run an extra bus?
Solution: Let \(X \sim N(0,1)\), and $\displaystyle X_{M}=\begin{cases} X & \text{if }X < M,\\ M & \text{if }X\geqslant M. \end{cases} $. Then we can calculate: \begin{align*} \mathbb{E}[X_M] &= \int_{-\infty}^M xf_X(x)\,dx + M\mathbb{P}(X \geq M) \\ &= \int_{-\infty}^M x \frac1{\sqrt{2\pi}}e^{-\frac12x^2}\,dx + M\mathbb{P}(X \geq M) \\ &= \left [ -\frac{1}{\sqrt{2\pi}}e^{-\frac12x^2} \right ]_{-\infty}^M + M (1-\mathbb{P}(X < M)) \\ &= -\phi(M) + M(1-\Phi(M)) \end{align*} Let \(B \sim B\left (1024, \frac12 \right)\) be the number of potential bus passengers. Then \(B \approx N(512, 256) = N(512, 16^2)\) which is a good approximation since both \(np\) and \(nq\) are large. The question is asking us, how much additional profit would the bus company get if they ran an additional bus. Currently each week they is (on average) \(512\) passengers worth of demand, but they can only supply \(496\) seats, so we should expect that there is demand for another bus. The question is how much that demand is worth. Using the first part of the question, we can see that their profit is something like a `capped normal', \(X_M\), except we are scaled and with a different cap. So we are interested in $\displaystyle Y_{M}=\begin{cases} B & \mbox{if }B< M,\\ M & \mbox{if }B\geqslant M. \end{cases}\(, but since \)B \approx N\left (512,16^2\right)$ this is similar to \begin{align*} Y_{M}&=\begin{cases} 16X+512 & \mbox{if }16X+512< M,\\ M & \mbox{if }16X+512\geq M. \end{cases} \\ &= \begin{cases} 16X+512 & \mbox{if }X< \frac{M-512}{16},\\ M & \mbox{if }X \geq \frac{M-512}{16}. \end{cases} \\ &= 16X_{\frac{M-512}{16}} + 512\end{align*} We are interested in \(\mathbb{E}[Y_{16\times31}]\) and \(\mathbb{E}[Y_{17\times31}]\), which are \(16\mathbb{E}[X_{-1}]+512\) and \(16\mathbb{E}[Y_{\frac{15}{16}}]+512\) Since \(\frac{15}{16} \approx 1\), lets look at \(16(\mathbb{E}[X_1] - \mathbb{E}[X_{-1}])\) \begin{align*} \mathbb{E}[X_1] - \mathbb{E}[X_{-1}] &= \left ( -\phi(1) + 1-\Phi(1)\right) - \left ( - \phi(-1) -(1 - \Phi(-1)) \right ) \\ &= -\phi(1) + \phi(-1) + 1-\Phi(1) + 1 - \Phi(-1) \\ &= 1 - \Phi(1) + \Phi(1) \\ &= 1 \end{align*} Therefore the extra \(31\) will fill roughly \(16\) of them. (This is a slight overestimate, which is worth bearing in mind). A better approximation might be that \(\mathbb{E}[X_t] - \mathbb{E}[X_{-1}] = \frac{t +1}{2}\) for \(t \approx 1\), (since we want something increasing). This would give us an approximation of \(15.5\), which is very close to the `true' answer. Therefore, over \(50\) bus runs, we should earn roughly \(800\) vloska extra from an additional bus. (Again an overestimate, and with an uncertain pay-off, they should consider offering maybe \(600\)). Since this is the future, we can quite easily calculate the exact values using the binomial distribution on a computer. This gives the true value as \(15.833\), and so they should pay up to \(791\)
Each day, books returned to a library are placed on a shelf in order of arrival, and left there. When a book arrives for which there is no room on the shelf, that book and all books subsequently returned are put on a trolley. At the end of each day, the shelf and trolley are cleared. There are just two-sizes of book: thick, requiring two units of shelf space; and thin, requiring one unit. The probability that a returned book is thick is \(p\), and the probability that it is thin is \(q=1-p.\) Let \(M(n)\) be the expected number of books that will be put on the shelf, when the length of the shelf is \(n\) units and \(n\) is an integer, on the assumption that more books will be returned each day than can be placed on the shelf. Show, giving reasoning, that
Solution:
Balls are chosen at random without replacement from an urn originally containing \(m\) red balls and \(M-m\) green balls. Find the probability that exactly \(k\) red balls will be chosen in \(n\) choices \((0\leqslant k\leqslant m,0\leqslant n\leqslant M).\) The random variables \(X_{i}\) \((i=1,2,\ldots,n)\) are defined for \(n\leqslant M\) by \[ X_{i}=\begin{cases} 0 & \mbox{ if the \(i\)th ball chosen is green}\\ 1 & \mbox{ if the \(i\)th ball chosen is red. } \end{cases} \] Show that
Solution: There are \(\displaystyle \binom{m}{k} \binom{M-m}{n-k}\) ways to choose \(k\) red and and \(n-k\) green balls out of a total \(\displaystyle \binom{M}{n}\) ways to choose balls. Therefore the probability is: \[ \mathbb{P}(\text{exactly }k\text{ red balls in }n\text{ choices}) = \frac{\binom{m}{k} \binom{M-m}{n-k}}{ \binom{M}{n}}\]