Skip to main content

Global Probability: Expected Value

 Hey, welcome back! This blog post is a continuation of my previous blog post which you can read over here . These are just notes and problems. 

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.

I am reading expected value because it's a prerequisite to the Otis combo unit Global. Hence the name Global Probability."

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}.$
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$$
$$=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$$

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}$$

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$$ 
$$ =\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.
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 
$$\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}].$$
Now, let $$X_i= 1 \text{ if P_i HH}, 0 \text{ else }$$
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]=\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}$$


Yes!! I worked very hard on this post tbh! I think a sequel to the blogpost will come containing harder problems and the state's expected value problems. 

I hope you guys liked it! Tomorrow, I will be posting 2 blog posts, one on GT and the other on recursion! 

Sunaina 💜

Comments

Post a Comment

Popular posts from this blog

My experiences at EGMO, IMOTC and PROMYS experience

Yes, I know. This post should have been posted like 2 months ago. Okay okay, sorry. But yeah, I was just waiting for everything to be over and I was lazy. ( sorry ) You know, the transitioning period from high school to college is very weird. I will join CMI( Chennai Mathematical  Institue) for bsc maths and cs degree. And I am very scared. Like very very scared. No, not about making new friends and all. I don't care about that part because I know a decent amount of CMI people already.  What I am scared of is whether I will be able to handle the coursework and get good grades T_T Anyways, here's my EGMO PDC, EGMO, IMOTC and PROMYS experience. Yes, a lot of stuff. My EGMO experience is a lot and I wrote a lot of details, IMOTC and PROMYS is just a few paras. Oh to those, who don't know me or are reading for the first time. I am Sunaina Pati. I was IND2 at EGMO 2023 which was held in Slovenia. I was also invited to the IMOTC or International Mathematical Olympiad Training Cam...

How to prepare for RMO?

"Let's wait for this exam to get over".. *Proceeds to wait for 2 whole fricking years!  I always wanted to write a book recommendation list, because I have been asked so many times! But then I was always like "Let's wait for this exam to get over" and so on. Why? You see it's pretty embarrassing to write a "How to prepare for RMO/INMO" post and then proceed to "fail" i.e not qualifying.  Okay okay, you might be thinking, "Sunaina you qualified like in 10th grade itself, you will obviously qualify in 11th and 12th grade." No. It's not that easy. Plus you are talking to a very underconfident girl. I have always underestimated myself. And I think that's the worst thing one can do itself. Am I confident about myself now? Definitely not but I am learning not to self-depreciate myself little by little. Okay, I shall write more about it in the next post describing my experience in 3 different camps and 1 program.  So, I got...

Solving Random ISLs And Sharygin Solutions! And INMO happened!!

Some of the ISLs I did before INMO :P  [2005 G3]:  Let $ABCD$ be a parallelogram. A variable line $g$ through the vertex $A$ intersects the rays $BC$ and $DC$ at the points $X$ and $Y$, respectively. Let $K$ and $L$ be the $A$-excenters of the triangles $ABX$ and $ADY$. Show that the angle $\measuredangle KCL$ is independent of the line $g$ Solution: Note that $$\Delta LDK \sim \Delta XBK$$ and $$\Delta ADY\sim \Delta XCY.$$ So we have $$\frac{BK}{DY}=\frac{XK}{LY}$$ and $$\frac{DY}{CY}=\frac{AD}{XC}=\frac{AY}{XY}.$$ Hence $$\frac{BK}{CY}=\frac{AD}{XC}\times \frac{XK}{LY}\implies \frac{BK}{BC}=\frac{CY}{XC}\times \frac{XK}{LY}=\frac{AB}{BC}\times \frac{XK}{LY} $$ $$\frac{AB}{LY}\times \frac{XK}{BK}=\frac{AB}{LY}\times \frac{LY}{DY}=\frac{AB}{DL}$$ $$\implies \Delta CBK\sim \Delta LDK$$ And we are done. We get that $$\angle KCL=360-(\angle ACB+\angle DKC+\angle BCK)=\angle DAB/2 +180-\angle DAB=180-\angle DAB/2$$ Motivation: I took a hint on this. I had other angles but I did...

IMO Shortlist 2021 C1

 I am planning to do at least one ISL every day so that I do not lose my Olympiad touch (and also they are fun to think about!). Today, I tried the 2021 IMO shortlist C1.  (2021 ISL C1) Let $S$ be an infinite set of positive integers, such that there exist four pairwise distinct $a,b,c,d \in S$ with $\gcd(a,b) \neq \gcd(c,d)$. Prove that there exist three pairwise distinct $x,y,z \in S$ such that $\gcd(x,y)=\gcd(y,z) \neq \gcd(z,x)$. Suppose not. Then any $3$ elements $x,y,z\in S$ will be $(x,y)=(y,z)=(x,z)$ or $(x,y)\ne (y,z)\ne (x,z)$. There exists an infinite set $T$ such that $\forall x,y\in T,(x,y)=d,$ where $d$ is constant. Fix a random element $a$. Note that $(x,a)|a$. So $(x,a)\le a$.Since there are infinite elements and finite many possibilities for the gcd (atmost $a$). So $\exists$ set $T$ which is infinite such that $\forall b_1,b_2\in T$ $$(a,b_1)=(a,b_2)=d.$$ Note that if $(b_1,b_2)\ne d$ then we get a contradiction as we get a set satisfying the proble...

Symmetric Polynomials #week 6

Well... I haven't seen much symmetric polynomials in Olympiads, but still I am learning, because I found them cute. And I am basically using this blog as my notes :P What are symmetric polynomials?  One can understand this with  examples. If we are considering over 3 variables, $x_1,x_2,x_3$ then  $$\sum_{sym}x_1^2\cdot x_2^3\cdot x_3=x_1^2\cdot x_2^3\cdot x_3+x_1^2\cdot x_3^3\cdot x_2+x_2^2\cdot x_1^3\cdot x_3+x_2^2\cdot x_3^3\cdot x_1+x_3^2\cdot x_1^3\cdot x_2.$$ See? $3!$ terms! Let's take one more example with again over 3 variables, $x_1,x_2,x_3$ then $$\sum_{sym}x_1^2\cdot x_2^2= x_1^2\cdot x_2^2+x_1^2\cdot x_3^2+x_2^2\cdot x_1^2+x_2^2\cdot x_3^2+x_3^2\cdot x_1^2+x_3^2\cdot x_2^2$$ Wait.. why 2 times ? So basically what happens in symmetrictric sums, is we go through all $n!$ possible permutations. So, here we have $a^2\cdot b^2\cdot c^0$ as like the "general" form type, right? Now, list down all the $3!=6$ permutations of $x_1,x_2,x_3$, and put them in the gene...

New year with a new beginning! And a recap of 2024..and all the best for INMO 2025!

Hi everyone! Happy New Year :)  Thank you so much for 95k+ views!!! How was everyone's 2024? What are everyone's resolutions? ( Do write down in the comment section! And you can come back 1 year later to see if you made them possible!). A Better Mathematician  Well, technically a theoretical computer scientist.  I am so grateful to be allowed to study at CMI where I can interact with so many brilliant professors, access the beautiful library and obviously discuss mathematics ( sometimes non math too ) with the students.    And this year, I want to learn more mathematics and clear my fundamentals. I have become much worse in math actually. And hopefully, read some research papers too :)  And discuss a lot of mathematics with other people.  However, with that whole depressing 2024 year, I have lost a lot of my confidence in mathematics. And to be a better mathematician, I should gain the confidence that I can be a mathematician. And well, I am working on...

Some Geometry Problems for everyone to try!

 These problems are INMO~ish level. So trying this would be a good practice for INMO!  Let $ABCD$ be a quadrilateral. Let $M,N,P,Q$ be the midpoints of sides $AB,BC,CD,DA$. Prove that $MNPQ$ is a parallelogram. Consider $\Delta ABD$ and $\Delta BDC$ .Note that $NP||BD||MQ$. Similarly, $NM||AC||PQ$. Hence the parallelogram. In $\Delta ABC$, $\angle A$ be right. Let $D$ be the foot of the altitude from $A$ onto $BC$. Prove that $AD^2=BD\cdot CD$. Note that $\Delta ADB\sim \Delta CDA$. So by similarity, we have $$\frac{AD}{BD}=\frac{CD}{AD}.$$ In $\Delta ABC$, $\angle A$ be right. Let $D$ be the foot of the altitude from $A$ onto $BC$. Prove that $AD^2=BD\cdot CD$. Let $D\in CA$, such that $AD = AB$.Note that $BD||AS$. So by the Thales’ Proportionality Theorem, we are done! Given $\Delta ABC$, construct equilateral triangles $\Delta BCD,\Delta CAE,\Delta ABF$ outside of $\Delta ABC$. Prove that $AD=BE=CF$. This is just congruence. N...

IMO Shortlist 2022 C1

  Today we shall try IMO Shortlist $2022$ C1. A $\pm 1$-sequence is a sequence of $2022$ numbers $a_1, \ldots, a_{2022},$ each equal to either $+1$ or $-1$. Determine the largest $C$ so that, for any $\pm 1$-sequence, there exists an integer $k$ and indices $1 \le t_1 < \ldots < t_k \le 2022$ so that $t_{i+1} - t_i \le 2$ for all $i$, and$$\left| \sum_{i = 1}^{k} a_{t_i} \right| \ge C.$$ We claim that the answer is $\boxed{506}$. $506$ is the upper bound. Just consider the sequence $$+1,-1,-1,+1,+1,-1,-1,+1\dots,-1,-1,+1,+1,-1.$$ Here $1, -1, -1, 1$ is repeated $505$ times and $1,-1$ is concatted to it. Now,our sequence would be $a_1,a_3,a_4,a_5,a_7,\dots$ which on summing would give $506$. And clearly, this would give the upper bound. Now, we show that $506$ is attainable by every sequence. WLOG there are at least $1011$ positive numbers in the sequence. Then we choose $+1$ whenever we can. Let the sequence be $c_1,b_1,\dots, c_n,b_n$ where $c_i$ are ...

Problems I did this week [Jan8-Jan14]

Yeyy!! I am being so consistent with my posts~~ Here are a few problems I did the past week and yeah INMO going to happen soon :) All the best to everyone who is writing!  I wont be trying any new problems and will simply revise stuffs :) Some problems here are hard. Try them yourself and yeah~~Solutions (with sources) are given at the end! Problems discussed in the blog post Problem1: Let $ABC$ be a triangle whose incircle $\omega$ touches sides $BC, CA, AB$ at $D,E,F$ respectively. Let $H$ be the orthocenter of $DEF$ and let altitude $DH$ intersect $\omega$ again at $P$ and $EF$ intersect $BC$ at $L$. Let the circumcircle of $BPC$ intersect $\omega$ again at $X$. Prove that points $L,D,H,X$ are concyclic. Problem 2: Let $ ABCD$ be a convex quadrangle, $ P$ the intersection of lines $ AB$ and $ CD$, $ Q$ the intersection of lines $ AD$ and $ BC$ and $ O$ the intersection of diagonals $ AC$ and $ BD$. Show that if $ \angle POQ= 90^\circ$ then $ PO$ is the bisector of $ \angle AOD$ ...

Just spam combo problems cause why not

This post is mainly for Rohan Bhaiya. He gave me/EGMO contestants a lot and lots of problems. Here are solutions to a very few of them.  To Rohan Bhaiya: I just wrote the sketch/proofs here cause why not :P. I did a few more extra problems so yeah.  I sort of sorted the problems into different sub-areas, but it's just better to try all of them! I did try some more combo problems outside this but I tried them in my tablet and worked there itself. So latexing was tough. Algorithms  "Just find the algorithm" they said and they died.  References:  Algorithms Pset by Abhay Bestrapalli Algorithms by Cody Johnson Problem1: Suppose the positive integer $n$ is odd. First Al writes the numbers $1, 2,\dots, 2n$ on the blackboard. Then he picks any two numbers $a, b$ erases them, and writes, instead, $|a - b|$. Prove that an odd number will remain at the end.  Proof: Well, we go $\mod 2$. Note that $$|a-b|\equiv a+b\mod 2\implies \text{ the final number is }1+2+\dots ...