Today's blog post is an introduction to the Expected value and hopefully would be helpful to the kids who would be attending the upcoming Expected Value Lecture.
The handouts/ books I referred to are Evan Chen's Probability handout , AOPS introduction to Counting and probability, Calt's Expected value handout, brilliant and this IIT Delhi handout.
Probability is Global
Expected Value:
- The expected value is the sum of the probability of each individual event multiplied by the number of times the event happens.
- It is denoted as $\Bbb E$ $[x]$
- We have $$\Bbb E[x]=\sum x_n P(x_n)$$
where $x_n$ is the value of the outcome and $P(x_n)$ is the probability that $x_n$ occurs.
Problem 1: What is the expected value of the number that shows up when you roll a fair $6$ sided
dice?
Solution: Since it's a fair dice, we get each outcome to have equal probability i.e $\frac {1}{6}.$
Solution: Since it's a fair dice, we get each outcome to have equal probability i.e $\frac {1}{6}.$
So $$\Bbb E[x]=\frac 16 \cdot 1+\frac 16 \cdot 2+\frac 16 \cdot 3+\frac 16 \cdot 4+\frac 16 \cdot 5+\frac 16 \cdot 6=\frac {21}{6}=3.5$$
Problem 2: Find the expected value of a roll on a fair $n$ sided dice, labelled from $1$ to $n.$
Solution: Since it's a fair dice, we get each outcome to have equal probability i.e $\frac {1}{n}.$ So $$\Bbb E[x]=\frac 1n \cdot 1+\frac 1n \cdot 2+\dots+\frac 1n \cdot (n-1)+\frac 1n\cdot n=\frac {n+1}{2}$$
Problem 3: Suppose you have a weighted coin in which heads comes up with probability $3/4$ and tails $1/4$ with probability . If you flip heads, you win $2$ but if you flip tails, you lose $1.$ What is the expected win of a coin flip in dollars?
Solution: $$\Bbb E[x]=\frac{3}{4} 2+\frac{1}{4}(-1)=1.25$$
Problem 4: At a raffle, $25$ tickets are sold at $1$ each for $3$ prizes of $100, 50,$ and $10.$ You buy $1$ ticket. What is the expected value of your gain?
Solution: $$\Bbb E[x]= \frac{1}{25}\cdot 99+ \frac{1}{25}\cdot 49+ \frac{1}{25}\cdot 9-\frac{22}{25}\cdot 1=\frac{135}{25}=5.4$$
Problem 5: Linda estimates the number of questions she answered correctly on a test. She answered $10$ correctly with probability $0.6,$ $20$ correctly with probability $0.3,$ and $50$ correctly with probability $0.1.$ What is the expected value of the number of questions Linda answered correctly?
Solution: $$\Bbb E[x]=\frac{6}{10}\cdot 10+\frac{3}{10}\cdot 20+\frac{1}{10}\cdot 50$$
Solution: $$\Bbb E[x]=\frac{6}{10}\cdot 10+\frac{3}{10}\cdot 20+\frac{1}{10}\cdot 50$$
$$=17$$
Problem 6: Mara is playing a game. There are two marbles in a bag. If she chooses the purple marble, she will win $10.$ If she chooses the orange marble, she will win $200.$ What is the expected value of Mara's winnings from the game?
Solution: $$\Bbb E[x]=\frac 12 \cdot 10+\frac 12 \cdot 200= 105$$
Solution: $$\Bbb E[x]=\frac 12 \cdot 10+\frac 12 \cdot 200= 105$$
Problem 7: In the casino game roulette, a wheel with $38$ spaces ($18$ red, $18$ black, and $2$ green) is spun. In one possible bet, the player bets $1$ on a single number. If that number is spun on the wheel, then they receive $36$ (their original $1 + 35$). Otherwise, they lose their $1.$ On average, how much money should a player expect to win or lose if they play this game repeatedly?
Solution: $$\Bbb E[x]=\frac{1}{38} \cdot 35-\frac{37}{38}\cdot 1=\frac{-2}{38}$$
Solution: $$\Bbb E[x]=\frac{1}{38} \cdot 35-\frac{37}{38}\cdot 1=\frac{-2}{38}$$
Problem 8: In a certain state's lottery, $48$ balls numbered $1$ through $48$ are placed in a machine and six of them are drawn at random. If the six numbers are drawn match the numbers that a player had chosen, the player wins $1,000,000.$ If they match $5$ numbers, then win $1,000.$ It costs $1$ to buy a ticket. Find the expected value.
Solution: $$\Bbb E[x]=\ \frac{1}{\binom{48}{6}}\cdot 1000000+ \frac{6\cdot 42}{\binom{48}{6}}\cdot 1000-\frac{\binom{48}{6}-253}{\binom{48}{6}}\cdot 1$$
Solution: $$\Bbb E[x]=\ \frac{1}{\binom{48}{6}}\cdot 1000000+ \frac{6\cdot 42}{\binom{48}{6}}\cdot 1000-\frac{\binom{48}{6}-253}{\binom{48}{6}}\cdot 1$$
$$ =\frac{12271259}{12271512}$$
Linearity of Expectation:
If there exist variables $a_1 , a_2 , a_3 ,\dots, a_n ,$ independent or dependent,
$$\Bbb E[a_1+a_2+\dots+a_n]=\Bbb E[a_1]+\dots+ \Bbb E[a_n]$$
Also $$\Bbb E[X\times Y]=\Bbb E[X]\times \Bbb E[Y]$$ holds when $X,Y$ independent.
Problem 9: What is the expected value of the sum of two dice rolls?
Solution: Let the expected value of the first dice be $X$ and the second dice be $Y.$
So $$\Bbb E[X+Y]=\Bbb E[X]+\Bbb E[Y]= 2\cdot \frac{7}{2}=7.$$
Problem 10: Caroline is going to flip $10$ fair coins one after the other. If she flips $n$ heads, she will be paid $n$. What is the expected value of her payout?
Solution: Let $X_i$ be $1$ if heads and $0.$ Also, denote $X_i$ as the outcome of the $i$ th coin flip.
Solution: Let $X_i$ be $1$ if heads and $0.$ Also, denote $X_i$ as the outcome of the $i$ th coin flip.
So $$\Bbb E[X]=\Bbb E[X_1+\dots + X_{10}]=\Bbb E[X_1]+\dots +\Bbb E[X_{10}]=10\cdot \frac 12=5$$
Problem 11: Sammy is lost and starts to wander aimlessly. Each minute, he walks one meter forward with probability $\frac{1}{2}$ , stays where he is with probability $\frac{1}{3}$ , and walks one meter backward with probability $\frac{1}{6}$. After one hour, what is the expected value for the forward distance (in meters) that Sammy has travelled?
Solution: Let $X_i$ be the move sammy does in $i$ minute. Note that
Solution: Let $X_i$ be the move sammy does in $i$ minute. Note that
$$\Bbb E[X_i]=\frac{1}{2}\cdot 1+\frac{1}{3}\cdot 0-\frac{1}{6}=\frac{1}{3}$$
So $$ \Bbb E[X]=\Bbb E[X_1+\dots +X_60]=\Bbb E[X_1]+\dots + \Bbb E[X_60]=60\cdot \frac{1}{3}=20$$
Problem 12: $25$ independent, fair coins are tossed in a row. What is the expected number of consecutive HH pairs?
Solution: So consider the consecutive pairs. Let $C_i$ denote the $i$th coin in the row.. Then we consider the pairs $$P_1=[C_1,C_2], P_2=[C_2,C_3],\dots, P_{24}=[C_{24},C_{25}].$$
Solution: So consider the consecutive pairs. Let $C_i$ denote the $i$th coin in the row.. Then we consider the pairs $$P_1=[C_1,C_2], P_2=[C_2,C_3],\dots, P_{24}=[C_{24},C_{25}].$$
Now, let $$X_i= 1 \text{ if P_i HH}, 0 \text{ else }$$
Note that $$\Bbb E[X_i]=\frac{1}{4}.$$
Note that $$\Bbb E[X_i]=\frac{1}{4}.$$
Hence, even though they are dependent, by linearity of expectation,
$$\Bbb E[\text{ no of consecutive pair} ] =\Bbb E[X_1]+\dots +\Bbb E[X_{24}]=24\cdot \frac{1}{4}=6$$
Problem 13: Suppose that $A$ and $B$ each randomly, and independently,
choose $3$ of $10$ objects. Find the expected number of objects chosen by both $A$ and $B.$
Solution: Let $X$ be the number of objects chosen by both A and B. Then let $$X_i= 1\text{ if A and B both select i}, 0 \text{ else }.$$
So $$\Bbb E[X_i]=\Bbb P[ \text{ A and B select i}]=\Bbb P[ \text{A selects i }] \times \Bbb P[\text{ B selects i }]=\frac{9}{100}$$ Alternatively, we have $$\Bbb E[X_i]=\frac{\binom{9}{2}^2}{\binom{10}{3}^2}$$
So $$\Bbb E[X_i]=\Bbb P[ \text{ A and B select i}]=\Bbb P[ \text{A selects i }] \times \Bbb P[\text{ B selects i }]=\frac{9}{100}$$ Alternatively, we have $$\Bbb E[X_i]=\frac{\binom{9}{2}^2}{\binom{10}{3}^2}$$
So $$\Bbb E[X]=\Bbb E[X_1]+\dots \Bbb E[X_{10}]=10\cdot \Bbb E[X_i]= 10\cdot \frac{9}{100}.$$
Problem 14: At a nursery, $2006$ babies sit in a circle. Suddenly, each baby randomly pokes either the baby to its left or to its right. What is the expected value of the number of unpoked babies?
Solution: Let the babies be $B_1, B_2, \dots B_{2006}.$
Note that any pair $$\Bbb E[X_i]= \frac{1}{4}$$ ( defining $1$ when unpoked)
And then we do linearity of Expectation.
$$\Bbb E[x]= \Bbb E[X_1+\dots +X_{2006}]=\Bbb E[X_1]+\Bbb E[X_2]+\dots+ \Bbb E[X_{2006}]= 2006\cdot \frac{1}{4}$$
It's the famous paradox game. :P
Problem 15: You are playing a game in which prize pool starts at $1.$ On every turn, you flip a fair coin. If you flip head, then the prize pool doubles. If tails, the game ends.
Solution: Note that $$P(T)=\frac{1}{2}, P(HT)=\frac{1}{4}, P(HHT)=\frac{1}{8},\dots $$
$$ \Bbb E(X) = \frac{1}{2}\cdot 1 + \frac{1}{4} \cdot 2 + \frac{1}{8}4 + \frac{1}{16}8 + \cdots = 0.5 + 0.5 + 0.5 + 0.5 + \cdots = \infty $$ A paradox. Cause expected value cant be infinite :P
Problem 16: Two random, not necessarily distinct, permutations of the digits $2017$ are selected and added together. What is the expected value of this sum?
Solution: Thanks to Pranav for the write up.
Let the permutations be $P_1,\dots, P_{24}.$ And the sums be $S_1,S_2,\dots,S_{288}.$
Total number of permutations of $2017 = 4!$. Total number of distinct sums $= \frac{1}{2} \cdot (24)^2 = 288$.
Let $s$ be a random variable representing sum of two permutations of $2017$ taken at random. Then, $$\Bbb{E}[s] = \sum s \cdot \Bbb{P}(s) = \sum s \cdot \frac{1}{288} = \frac{1}{288} \cdot \sum s$$. Now, we have to calculate $\sum s$. Clearly, $$s = 3! \cdot (2000 + 1000 + 7000) + 3! \cdot (200 + 100 + 700) + 3! \cdot (20 + 10 + 70) + 3! \cdot (2 + 1 + 7)$$ $$\implies s = 6 \cdot 11110 = 66660$$ $$\implies \Bbb{E}[s] = \frac{66660}{288} = 231.458\overline{3}$$
The following proof is from the calt handout! The handout is very nice!!!!
Theorem: If the probability of a variable $x$ occurring is $p,$ then the expected number of times we must repeat the event so that we get $x$ is $\frac{1}{p}$.
Proof: Let $X$ be the number of times we would have to repeat to get $x.$
So $$\Bbb E[X]= 1\cdot \Bbb P[\text{ x occurring in 1st turn}] + 2\cdot \Bbb P[\text{ x occurring in 2nd turn}]+\dots $$
$$ p+2\cdot (p-1)p+3 \cdot (p-1)^2\cdot p+\dots = p( 1+ 2(p-1)+ 3 (p-1)^2+ \dots )$$
multiplying by $(1-p)$ and subtracting,
$$ \implies p\cdot \Bbb E[X]= p(1 +( 1-p)+ (1-p)^2+\dots ) = p \frac {1}{p}$$
$$ \implies \Bbb E[X]= \frac{1}{p}$$
Yeah, that is it! Hope you enjoyed reading this post!
Sunaina 💚
Comments
Post a Comment