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

Geometry ( Finally!!!)

 This is just such an unfair blog.  Like if one goes through this blog, one can notice how dominated  Algebra is!! Like 6 out of 9 blog post is Algebra dominated -_- Where as I am not a fan of Algebra, compared to other genres of Olympiad Math(as of now). And this was just injustice for Synthetic Geo. So this time , go geo!!!!!!!!!!!  These problems are randomly from A Beautiful Journey through Olympiad Geometry.  Also perhaps I will post geo after March, because I am studying combi.  Problem:  Let $ABC$ be an acute triangle where $\angle BAC = 60^{\circ}$. Prove that if the Euler’s line of $\triangle ABC$ intersects $AB$ and $AC$ at $D$ and $E$, respectively, then $\triangle ADE$ is equilateral. Solution:  Since $\angle A=60^{\circ}$ , we get $AH=2R\cos A=R=AO$. So $\angle EHA=\angle DOA.$ Also it's well known that $H$ and $O $ isogonal conjugates.$\angle OAD =\angle EAH.$ By $ASA$ congruence, we get $AE=AD.$ Hence $\triangle ADE$ is equilateral....

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

IMO 2023 P2

IMO 2023 P2 Well, IMO 2023 Day 1 problems are out and I thought of trying the geometry problem which was P2.  Problem: Let $ABC$ be an acute-angled triangle with $AB < AC$. Let $\Omega$ be the circumcircle of $ABC$. Let $S$ be the midpoint of the arc $CB$ of $\Omega$ containing $A$. The perpendicular from $A$ to $BC$ meets $BS$ at $D$ and meets $\Omega$ again at $E \neq A$. The line through $D$ parallel to $BC$ meets line $BE$ at $L$. Denote the circumcircle of triangle $BDL$ by $\omega$. Let $\omega$ meet $\Omega$ again at $P \neq B$. Prove that the line tangent to $\omega$ at $P$ meets line $BS$ on the internal angle bisector of $\angle BAC$. Well, here's my proof, but I would rather call this my rough work tbh. There are comments in the end! Proof Define $A'$ as the antipode of $A$. And redefine $P=A'D\cap (ABC)$. Define $L=SP\cap (PDB)$.  Claim1: $L-B-E$ collinear Proof: Note that $$\angle SCA=\angle SCB-\angle ACB=90-A/2-C.$$ So $$\angle SPA=90-A/2-C\implies \ang...

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

Problems with meeting people!

Yeah, I did some problems and here are a few of them! I hope you guys try them! Putnam, 2018 B3 Find all positive integers $n < 10^{100}$ for which simultaneously $n$ divides $2^n$, $n-1$ divides $2^n - 1$, and $n-2$ divides $2^n - 2$. Proof We have $$n|2^n\implies n=2^a\implies 2^a-1|2^n-1\implies a|n\implies a=2^b$$ $$\implies 2^{2^b}-2|2^{2^a}-2\implies 2^b-1|2^a-1\implies b|a\implies b=2^c.$$ Then simply bounding. USAMO 1987 Determine all solutions in non-zero integers $a$ and $b$ of the equation $$(a^2+b)(a+b^2) = (a-b)^3.$$ Proof We get $$ 2b^2+(a^2-3a)b+(a+3a^2)=0\implies b = \frac{3a-a^2\pm\sqrt{a^4-6a^3-15a^2-8a}}{4}$$ $$\implies a^4-6a^3-15a^2-8a=a(a-8)(a+1)^2\text{ a perfect square}$$ $$\implies a(a-8)=k^2\implies a^2-8a-k^2=0\implies \implies a=\frac{8\pm\sqrt{64+4k^2}}{2}=4\pm\sqrt{16+k^2}. $$ $$ 16+k^2=m^2\implies (m-k)(m+k)=16.$$ Now just bash. USAMO 1988 Suppose that the set $\{1,2,\cdots, 1998\}$ has been partitioned into disjoint pairs $\{a_i,b_i\}$ ($1...

Challenging myself? [Jan 15-Jan 27]

Ehh INMO was trash. I think I will get 17/0/0/0-1/3-5/10-14, which is def not good enough for qualifying from 12th grade. Well, I really feel sad but let's not talk about it and focus on EGMO rather.  INMO 2023 P1 Let $S$ be a finite set of positive integers. Assume that there are precisely 2023 ordered pairs $(x,y)$ in $S\times S$ so that the product $xy$ is a perfect square. Prove that one can find at least four distinct elements in $S$ so that none of their pairwise products is a perfect square. I will use Atul's sol, cause it's the exact same as mine.  Proof: Consider the graph $G$ induced by the elements of $S$ and edges being if the products are perfect squares. Note that if $xy = a^2$ and $xz = b^2$, then $yz = \left( \frac{ab}{x} \right)^2$, since its an integer and square of a rational number its a perfect square and so $yz$ is an edge too. So the graph is a bunch of disjoint cliques, say with sizes $c_1, c_2, \cdots, c_k$. Then $\sum_{i=1}^k c_i^2 = 2023$, which ...

Some random problems

  I know, I know. Different font indeed. I have deleted a few of my MSE answers. I felt they weren't that good in quality. And a few questions are from my prev aops account which I have deactivated now. I also have posted 10 IOQM types of problems. These can be used while preparing for IOQM. Problem: Prove that $\dfrac{ab}{c^3}+\dfrac{bc}{a^3}+\dfrac{ca}{b^3}> \dfrac{1}{a}+\dfrac{1}{b}+\dfrac{1}{c}$, where $a,b,c$  are different positive real numbers.  Proof: Note that by AM-GM $$\frac{ab}{c^3}+\frac{bc}{a^3}\ge \frac{2b}{ac}$$ and we also have $$\frac {b}{ac}+\frac{c}{ab}\ge \frac{2}{a}$$. Hence, $$\sum_{cyc}\frac{ab}{c^3}\ge\sum_{cyc}\frac{b}{ac}\ge\sum_{cyc}\frac{1}{a}$$ where everything we got is by applying AM-GM on $2$ terms and then dividing by $2$. USA TST 2007: Triangle $ABC$ which is inscribed in circle $\omega$. The tangent lines to $\omega$ at $B$ and $C$ meet at $T$. Point $S$ lies on ray $BC$ such that $AS$ is perpendicular to $AT$. Points $B_1$ and $C_1...

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

Orders and Primitive roots

 Theory  We know what Fermat's little theorem states. If $p$ is a prime number, then for any integer $a$, the number $a^p − a$ is an integer multiple of $p$. In the notation of modular arithmetic, this is expressed as \[a^{p}\equiv a{\pmod {p}}.\] So, essentially, for every $(a,m)=1$, ${a}^{\phi (m)}\equiv 1 \pmod {m}$. But $\phi (m)$ isn't necessarily the smallest exponent. For example, we know $4^{12}\equiv 1\mod 13$ but so is $4^6$. So, we care about the "smallest" exponent $d$ such that $a^d\equiv 1\mod m$ given $(a,m)=1$.  Orders Given a prime $p$, the order of an integer $a$ modulo $p$, $p\nmid a$, is the smallest positive integer $d$, such that $a^d \equiv 1 \pmod p$. This is denoted $\text{ord}_p(a) = d$. If $p$ is a primes and $p\nmid a$, let $d$ be order of $a$ mod $p$. Then $a^n\equiv 1\pmod p\implies d|n$. Let $n=pd+r, r\ll d$. Which implies $a^r\equiv 1\pmod p.$ But $d$ is the smallest natural number. So $r=0$. So $d|n$. Show that $n$ divid...