Expected value of larger cut (basic probability)

101 Views Asked by At

I looked around a few questions on the site and examples from my textbooks and couldn't really understand how the expected value of something is calculated. I'm a student of computer science and for some reason they decided to teach us tons of probability subjects in less than a week cause we need it to analyze running time of code.

So i would like a (simple words, im slow) explanation of the idea if Expected value and help regarding this specific question:

Let us have a Chocolate bar of the size n (1 to n). Let us choose some index k and split the bar at that index. We give one part to our friend and leave the other to ourselves. We LOVE chocolate so we always take the bigger part of the bar for ourselves. What is the Expected size of the piece we will get? (You may approximate when confronted with non integers).

(NOTES): We learned of basic probabilty and ONLY the definition of probability space. We learned of Expected value generally, and specifically about its linearity and about the face that when the random indicator variables X, Y are independent this occurs: E(XY)=E(X)E(Y)

EDIT:edit: fixed picture with my try to solve this

2

There are 2 best solutions below

5
On

The expected value is simply the average size of the piece we will get over a large number of trials. In this case

If $k<=\frac{n}{2}$ then you get the other piece ((n-k) of the chocolate)

If $k>=\frac{n}{2}$ then you get that piece (k of the chocolate)

We are assuming k is evenly distributed, so both the possibilities are equally likely. Thus, the average cut will be made halfway in the middle of the interval.

We must then add up the overall expected value as follows:

E(k) = 0.5 * (average value of k in the first interval) + 0.5 * (1-average value of k in the second interval)

(The 0.5 is because both are equally likely)

Since the average values of k are $\frac{n}{4}$ and $\frac{3n}{4}$ in the two intervals, the resulting average (expected) size of chocolate is $\frac{3n}{4}$

7
On

I preassume that the index $k$ must be an element of $\{1,2,\dots, n-1\}$.

There are so-called events that can occur and let $E_k$ denote the event that the bar is split at $k$. In that case the size of the piece we get is $\max(k,n-k)$.

Further the events $E_1,E_2,\dots, E_{n-1}$ are firstly mutually exclusive which means that at most one of the events will occur. Secondly they are covering which means that at leas one of the events will occur. Taking this together we just get the statement that exactly one of the events will occur.

Then consequently if $p_k$ denotes the probability that event $E_k$ will occur we have:$$p_1+p_2+\cdots+p_{n-1}=1\tag1$$

The expectation of the length of the piece we get takes the shape:$$p_1\max(1,n-1)+p_2\max(2,n-2)+\cdots+p_{n-1}\max(n-1,1)\tag2$$

It might be that you had in mind already that the mentioned events have equal probability to occur. If so then on base of $(1)$ we find that $p_k=\frac1{n-1}$ for every $k$ and $(2)$ simplifies to:$$\frac1{n-1}\left(\max(1,n-1)+\max(2,n-2)+\cdots+\max(n-1,1)\right)\tag3$$

(Good exercise to find the outcome as an expression in $n$ yourself)

It can be shown that - if you share a lot of such pieces of chocolate - then the average of the length of the piece we get will come very close to this expression. And the expression is unique in having that property. This to give you an idea of the importance/background of the concept "expectation".