# Expected length of middle piece in a randomly broken pole

This question has appeared here before requesting the expected length of the smallest piece and of the largest piece. What about the middle piece?

I break a meter long pole into three random pieces. What is the expected value of the second longest piece?

We could do this by one minus the expected value of the largest plus the expected value of the smallest (I think?) but I would prefer a more direct calculation.

Denote the break points by $$X,Y\sim \operatorname{Unif}(0,1)$$.

Suppose that $$X. In this case, the three pieces have length $$X$$, $$Y-X$$, $$1-Y$$. There are three cases for the longest piece: $$\begin{array}{rclr|clrcl|rcl} X & &\text{longest} & & & Y-X & & \text{longest} & & & 1-Y & & \text{longest}\\\hline X&>&Y-X & & & Y-X&>&X & & & 1-Y &>& X\\ X&>&1-Y & & & Y-X&>&1-Y & & & 1 - Y &>& Y - X\\ \end{array}$$ This divides the upper half of the unit square (above the line $$y=x$$) into three parts. I found them on paper by drawing the lines and highlighting where the conditions in the above table were true in three colors, but I don't have a scanner. There is a good picture here (but it is of the smallest case, rather than the largest, which is similar but not identical).

After this, I think we divide each region into the cases of which is second longest, then calculate the value times the integral over each region?

Is there a better way to do it?

• Longest minus shortes? The expectation of 1-(Largest+Shortest) is the expectation of the middle piece. – zoli Jul 25 '19 at 7:13
• I know that if you break the pole randomly into three pieces the expected length of each piece is 1/3, I'm not too sure where this question differs from that. – johnson Jul 25 '19 at 11:19
• @Zoli ah yes that's what meant to say – WQ Arielle Cosette Jul 25 '19 at 17:46
• @johnson Conditioned on being the second longest piece our expectation can change. E.g. clearly the expected length of the shortest piece isn't 1/3, as it can be at most 1/3. So you need to be more careful. – Misha Schmalian Jul 25 '19 at 18:18
• Brute force integrating over all of those parts results in the answer being 5/18. This matches @zoli 's answer. – JimB Jul 26 '19 at 4:55
{"ft_lang_label":"__label__en","ft_lang_prob":0.907641,"math_prob":0.9778384,"size":1371,"snap":"2020-24-2020-29","text_gpt3_token_len":369,"char_repetition_ratio":0.13679591,"word_repetition_ratio":0.0121951215,"special_character_ratio":0.2866521,"punctuation_ratio":0.08992806,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9892982,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-06-06T06:14:06Z\",\"WARC-Record-ID\":\"<urn:uuid:73890dea-ed21-40bb-921d-2256768aa70f>\",\"Content-Length\":\"143465\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4b9fc915-e92c-4466-a5d2-9bcb87d3b241>\",\"WARC-Concurrent-To\":\"<urn:uuid:11354d42-27e2-4401-8e9b-9c41270a24e2>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3303327/expected-length-of-middle-piece-in-a-randomly-broken-pole\",\"WARC-Payload-Digest\":\"sha1:HF7NPX6G47I6UO2RYSLGM3DUUIJZMAL4\",\"WARC-Block-Digest\":\"sha1:VRHPPKQ5HPVBIISLDVHO5F3KRXAGOVEY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-24/CC-MAIN-2020-24_segments_1590348509972.80_warc_CC-MAIN-20200606031557-20200606061557-00337.warc.gz\"}"}