Home » Basic probability » Expectations

Category Archives: Expectations

Minimum Dice Roll

Suppose that three fair 6-sided dice are rolled.

  1. Let \(M\) be the minimum of three numbers rolled. Find \(\mathbb{E}(M)\).
  2. Let \(S\) be the sum of the largest two rolls. Find \(\mathbb{E}(S)\).

Dinner Party Seating

A host invites \(n\) guests to a party (guest #1, guest #2, … , guest #n). Each guest brings with them their best friend. At the party there is a large circular table with \2n\) seats. All of the \(n\) invited guests and their best friends sit in a random seat.

  1. What is the probability that guest #1 is seated next to their best friend?
  2. What is the expected number of the \(n\) invited guests who are seated next to their best friend?

A Dice Rolling Game

15 players each roll a fair 6-sided die once. If two or more players roll the same number, those players are eliminated. What is the expected number of players who get eliminated?

January Birthdays at a Call Center

Calls arrive at a call center according to a Poisson arrival process with an average rate of 2 calls/minute. Each caller has a 1/12 chance of having a January birthday, independent of other callers. What is the expected wait time until the call center receives 3 calls from callers with January birthdays?

Another Birthday Problem

A host invites guests to a party. How many guests should be invited in order for the expected number of guests who share a birthday with at least one other guest to be at least 4?

Almost geometric

An experimenter rolls a fair 6-sided die until they’ve seen both a 1 and a 2 (not necessarily consecutively). What is the experimenter’s expected number of rolls?

Handing back tests

A professor randomly hands back test in a class of \(n\) people paying no attention to the names on the paper. Let \(N\) denote the number of people who got the right test. Let \(D\) denote the pairs of people who got each others tests. Let \(T\) denote the number of groups of three who none got the right test but yet among the three of them that have each others tests. Find:

  1. \(\mathbf{E} (N)\)
  2. \(\mathbf{E} (D)\)
  3. \(\mathbf{E} (T)\)

Using the Cauchy–Schwarz inequality

Recall that the Cauchy–Schwarz inequality stats that for any two random variable \(X\) and \(Y\) one has that
\[ \mathbf E |XY| \leq \sqrt{\mathbf E [X^2]}\,\sqrt{  \mathbf E [Y^2]}\]

  1. Use it to show that
    \[ \mathbf E |X| \leq \sqrt{\mathbf E [X^2]}\]

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]

Tail-sum formula for continuous random variable

Let \(X\) be a positive random variable with c.d.f \(F\).

  1. Show using the representation \(X=F^{-1}(U)\) where \(U\) is \(\textrm{unif}(1,0)\) that \(\mathbf{E}(X)\) can be interpreted as the area above the graph on  \(y=F(x)\) but below the line \(y=1\). Using this deduce that
    \[\mathbf{E}(X)=\int_0^\infty [1-F(x)] dx = \int_0^\infty \mathbf{P}(X> x) dx \ .\]
  2. Deduce that if \(X\) has possible values \(0,1,2,\dots\) , then
    \[\mathbf{E}(X)=\sum_{k=1}^\infty \mathbf{P}(X\geq  k)\]

probability density example

Suppose  \(X\) takes values in\( (0,1) \) and has a density

\[f(x)=\begin{cases}c x^2 (1-x)^2 \qquad &x\in(0,1)\\  0 & x \not \in (0,1)\end{cases}\]

for some \(c>0\).

  1. Find \( c \).
  2. Find \(\mathbf{E}(X)\).
  3. Find \(\mathrm{Var}(X) \).

 

Infinite Mean

Suppose that \(X\) is a random variable whose density is

\[f(x)=\frac{1}{2(1+|x|)^2} \quad x \in (-\infty,\infty)\]

 

  1. Draw a graph of \(f(x)\).
  2. Find \(\mathbf{P}(-1 <X<2)\).
  3. Find \(\mathbf{P}(X>1)\).
  4. Is \(\mathbf{E}(X) \) defined ? Explain.

Expectation of min of exponentials

There are \(15\) stock brokers. The returns (in thousands of dollars) on each brokers is modeled as a separate independent exponential distribution \(X_1 \sim \mbox{Exp}(\lambda_1),…,X_{15} \sim \mbox{Exp}(\lambda_{15})\). Define \(Z = \min\{X_1,…,X_{15}\}\).

What is \(\mathbf{E}(Z)\) ?

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)\).

 

Expectation of geometric

Use the expectation as tail sum tool to compute the expectation of the geometric distribution.

Expectation of mixture distribution

Consider the following mixture distribution.

  1. Draw \(X \sim \mbox{Ber}(p=.3)\)
  2. If \(X=1\) then \(Y \sim \mbox{Geometric}(p_1)\)
  3. If \(X= 0\) then  \(Y \sim \mbox{Bin}(n,p_2)\)

What is \(\mathbf{E}(Y)\) ?. (*) What is \(\mathbf{E}(Y | X )\) ?.

A simple mean calculation

Suppose that \(X \in \{1,2,3\}\) and \(Y = X+ 1\), and \(\mathbf{P}(X = 1) = 0.3, \ \mathbf{P}(X = 2) = 0.5,\ \mathbf{P}(X = 3) = 0.2.\)

(a) Find \(\mathbf{E}(X)\).

(b) Find \(\mathbf{E}(Y)\).

(c) Find \(\mathbf{E}(X + Y)\).

[Author Mark Huber. Licensed under Creative Commons.]

Expected Value and Mean Error

Let \(X\) be a random variable with \(\mu_1=\mathbf{E}(X)\) and \(\mu_2=\mathbf{E}(X^2)\). For any number \(a\) define the mean squared error

\[J(a)=\mathbf{E}\big[(X-a)^2\big] \]

and the absolute error

\[K(a)=\mathbf{E}\big[|X-a|\big] \]

  1. Write \(J(a)\) in terms of  \(a\), \(\mu_1\), and \(\mu_2\) ?
  2. Use the above answer to calculate \(\frac{d J(a)}{d\, a}\) .
  3. Find the \(a\) which is the  solution to \(\frac{d J(a)}{d\, a}=0 ?\) Comment on this answer in light of the name  “Expected Value” and argue that it is actually a minimum.
  4. Assume that \(X\) only takes values \(\{x_1,x_2,\dots,x_n\}\).  Use the fact that
    \[ \frac{d\ }{d a} |x-a| = \begin{cases} -1 & \text{if \(a < x\)}\\
    1 & \text{if \(a > x\)}\end{cases}
    \]
    to show that as long as \(a \not\in \{x_1,x_2,\dots,x_n\}\) one has
    \[ \frac{d K(a)}{d\, a} =\mathbf{P}(X<a) – \mathbf{P}(X>a)\]
  5. Now show that if \( a \in (x_k,x_{k+1})\) then \(\mathbf{P}(X<a) – \mathbf{P}(X>a) = 2\mathbf{P}(X \leq x_k) – 1\).
  6. The median is any point \(a\) so that both  \(\mathbf{P}(X\leq a) \geq \frac12 \) and \(\mathbf{P}(X\geq a) \geq\frac12\). Give an example where the median is not unique. (That is to say there is more than one such \(a\).
  7. Use the above calculations  to show that if \(a\) is any median (not equal to one of the \(x_k\)), then it solves  \(\frac{d K(a)}{d\, a} =0\) and that it is a minimizer.

 

Three Valued Random Variable

Show that the distribution of a random variable \(X\) with possible values of 0,1  and 2 is determined by \(\mu_1=\mathbf{E}(X)\) and \(\mu_2=\mathbf{E}(X^2)\), by finding a formula for \(\mathbf{P}(X=x)\) in terms of \(\mu_1\) and \(\mu_2\).

 

[Pitman p. 184. #20]

Expectation of geometric distribution

Compute the expectation of the geometric distribution using the fact that in this case

\(\mathbf{E}(X)= \sum_{k=1}^{\infty} \mathbf{Pr}(X\geq k) \)

Expectations of die rolls

A fair die is rolled ten times. Find numerical values for the expectations of each of the following random variables

  1. the sum of the numbers in the ten rolls;
  2. the sum of the largest two numbers in the first three rolls;
  3. the maximum number in the first five rolls;
  4. the number of multiples of three in the first ten rolls;
  5. the number of faces which fail to appear in the ten rolls;
  6. the number of different faces that appear in the ten rolls.

[From Pitman page 183]

Subsequence problem

Scoring subsequences or lengths of similar matches or runs is common to a variety of problems from matches in genetic codes to similar runs in bits.

Consider the following question about two sequences of letters. Set both sequences to have length \(k\). At each location of the sequences the probability of a match in letters is \(.7\) and the probability of a mismatch is \(.3\). At each location a match is assigned a score of \(4\) and a mismatch is assigned a score of \(-1\). The total score of the sequence is the sum of the scores at each location, there are \(k\) locations.

Answer the following:

  1. What is the PMF of the total score if \(k=5\).
  2. What is the PMF of the total score for a general \(k\) ?

 

Putting expectations together

Suppose \(\mathbf{E}(X^2)=3\), \(\mathbf{E}(Y^2)=4\) and \(\mathbf{E}(XY)=2\). What is  \(\mathbf{E}[(X+Y)^2]\) ?

 

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]

Indicatior functions and expectations

Let \(A\) and \(B\) be independent events and let \(\mathbf{1}_A\) and \(\mathbf{1}_B\) be the associated indicator functions. Answer the following questions in terms of \(\mathbf{P}(A)\) and \(\mathbf{P}(B)\).

  1. Describe the distribution of \( \mathbf{1}_A\).
  2. What is \(\mathbf{E} \mathbf{1}_A\) ?
  3. Describe the distribution of \((\mathbf{1}_A +\mathbf{1}_B)^2\).
  4. What is \(\mathbf{E}(\mathbf{1}_A +\mathbf{1}_B)^2 \) ?

Topics