SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
emmy
Topic Author
Posts: 17
Joined: February 8th, 2005, 11:21 pm

another stick problem

May 13th, 2009, 10:55 pm

This question is from an interview, and I don't know the answer. There is a stick with the length of 1. Break it into two pieces randomly. Take the longer piece and break it into two pieces further. What is the probability that the longer piece (after the 2nd break) has a length greater than 3/5?
 
User avatar
alexrem
Posts: 12
Joined: April 3rd, 2009, 4:57 pm

another stick problem

May 14th, 2009, 12:46 am

Call a break good if after the 2 breaks the longer piece has length greater than 3/5.Let the length of the smaller stick after the first break be x. Firstly, x<=1/2 (as it is the shorter piece).For each value of x in range 0 to 1/2 let f(x) be probability that when the piece 1-x is broken in 2 parts, the longer part has length greater than 3/5.Then would be the desired probability.Now, if x>=2/5 then the longer piece after 2nd break is for sure not greater than 3/5 so f(x) = 0 for 2/5<=x<=1/2.If x<2/5, then let y be length of shorter piece after second break. Because second break was performed on stick of length 1-x, then y<=(1-x)/2. Now, we want x+y<2/5 for the break to be good. Therefore y<2/5 -x. Then for the fixed x, the probability that when the piece 1-x is broken in 2 parts, the longer part has length greater than 3/5 is:f(x) = (2/5-x)/((1-x)/2).So the required probability is:
 
User avatar
quantyst
Posts: 632
Joined: June 4th, 2008, 5:08 am

another stick problem

May 14th, 2009, 8:17 am

QuoteOriginally posted by: emmyThis question is from an interview, and I don't know the answer. There is a stick with the length of 1. Break it into two pieces randomly. Take the longer piece and break it into two pieces further. What is the probability that the longer piece (after the 2nd break) has a length greater than 3/5?Solution:Let X~u[0,1].Let Y=max(X, 1-X).Let Z~u[0,Y].Let W=max(Z, 1-Z).We need to find P=P{W>(3/5)}.We will condition P on X:P=P{W>(3/5)}=int(P{W>(3/5) | X=x}dx [0,1]).Now we will expand the above integration over the three subintervals (0,2/5), (2/5.3/5), (3/5,1):P=A+B+C, whereA= int(P{W>(3/5) | X=x}dx [0,2/5]) ,B=int(P{W>(3/5) | X=x}dx [2/5, 3/5]),C= int(P{W>(3/5) | X=x}dx [3/5,1]).For X in (2/5,3/5), Y is less than 3/5; hence both Z and (1-Z) are less than 3/5; so W=max(Z, 1-Z)<3/5; hence B=0.Now for C:For X in (3/5,1), Y=X>3/5; so {W>3/5} is equivalent to {Z>3/5 or Y-Z=X-Z>3/5}; or {Z>3/5 or Z<X-3/5}. So P{W>3/5}=P{Z>3/5 or Z<X-3/5}=P{Z>3/5}+P{ Z<X-3/5}={1-(3/5)/X}+{(X-3/5)/X}=2(1-(3/5)/X). ThusC= int(P{W>(3/5) | X=x}dx [3/5,1])= int(2(1-(3/5)/x)dx [3/5,1])=(2/5){2+3log(3/5)}.In a similar fashion we can compute A. It turns out that A=C.Thus P=(4/5) {2+3log(3/5)}, which is approximately equal to 0.3740185.
 
User avatar
emmy
Topic Author
Posts: 17
Joined: February 8th, 2005, 11:21 pm

another stick problem

May 14th, 2009, 2:52 pm

quantyst and alexrem,thanks for the answer.
 
User avatar
ynotredrum
Posts: 4
Joined: December 8th, 2008, 1:36 am

another stick problem

May 20th, 2009, 3:30 pm

Hi quantyst,How do you get the 2 in: int(2(1-(3/5)/x)dx [3/5,1])?Thanks!
 
User avatar
quantyst
Posts: 632
Joined: June 4th, 2008, 5:08 am

another stick problem

May 20th, 2009, 4:31 pm

QuoteOriginally posted by: ynotredrumHi quantyst,How do you get the 2 in: int(2(1-(3/5)/x)dx [3/5,1])?Thanks!Look at the previous line:QuoteFor X in (3/5,1), Y=X>3/5; so {W>3/5} is equivalent to {Z>3/5 or Y-Z=X-Z>3/5}; or {Z>3/5 or Z<X-3/5}. SoP{W>3/5}=P{Z>3/5 or Z<X-3/5}=P{Z>3/5}+P{ Z<X-3/5}={1-(3/5)/X}+{(X-3/5)/X}=2(1-(3/5)/X). ThusC= int(P{W>(3/5) | X=x}dx [3/5,1])= int(2(1-(3/5)/x)dx [3/5,1])=(2/5){2+3log(3/5)}.
 
User avatar
ynotredrum
Posts: 4
Joined: December 8th, 2008, 1:36 am

another stick problem

May 20th, 2009, 5:26 pm

Sorry - I mistakenly misread the previous line. Thanks
Last edited by ynotredrum on May 19th, 2009, 10:00 pm, edited 1 time in total.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On