tag:blogger.com,1999:blog-4115025577315673827.post2841635187646333234..comments2020-05-25T13:34:36.365+05:30Comments on CSE Blog - quant, math, computer science puzzles: Smallest Number in Decreasing SequencePratik Poddarhttp://www.blogger.com/profile/11577606981573330954noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-4115025577315673827.post-14525696796280832022011-05-26T16:07:48.317+05:302011-05-26T16:07:48.317+05:30@Siva: Source: http://www.quantnet.com/forum/threa...@Siva: Source: http://www.quantnet.com/forum/threads/another-variant-of-a-classic.6172/<br /><br />@chera: Thanks for the solution<br /><br />@Gautam: <br />Some mistakes in your solution<br /><br />Now,the probability that x was chosen at the nth step implies:<br />1) All previous numbers > x (corresponds to (1-x)^(n-1))<br />2) They are arranged in descending order (corresponds to 1/(n-1!))<br />3) The element after x is > x, so, probability (1-x)<br /><br />Hence the probability density is given by summation((1-x)^n/(n-1!)) which is (1-x)*exp(1-x).<br />Now simply integrate x*(1-x)*exp(1-x) from 0 to 1 to get the desired value of expectation<br /><br />Applying Integration by parts twice, we get 3-e. Solved. :)<br /><br />@yash.. What do you mean by region "dx"? Can you make your solution mathematically precise please? Thanks.Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-37966283993701741402011-05-20T03:48:57.710+05:302011-05-20T03:48:57.710+05:30Suppose x is the smallest number. The probability ...Suppose x is the smallest number. The probability of this happening is given by the following idea:<br />Sum (over all n) of [Probability that x was chosen at the nth step]<br />Now,the probability that x was chosen at the nth step implies:<br />1) All previous numbers > n (corresponds to (1-x)^n)<br />2) They are arranged in descending order (corresponds to 1/(n!))<br /><br />Hence the probability density is given by summation((1-x)^n/(n!)) which is exp(1-x)-1.<br />Now simply integrate x*(exp(1-x)-1) from 0 to 1 to get the desired value of expectation<br />The value I calculated was e-2.5 = 0.21828Gautamhttps://www.blogger.com/profile/07248556360293734740noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-64497208696335976062011-05-12T20:43:18.461+05:302011-05-12T20:43:18.461+05:30Let us consider that the smallest number lies in t...Let us consider that the smallest number lies in the region dx. This number would be smallest only if it is in the second last position of the sequence and all the other numbers are greater than x.<br />Let f(x) be the probability of the smallest number belonging in the region dx.<br />Then f(x) = dx*(1-x) + dx*(1-x)^2/1! + dx*(1-x)^3/2!+....<br />This is so because probability of selecting a number in dx area is dx and then all other numbers should lie in the region (x,1). Also the last number can be any number among the n numbers that we have selected. But for the remaining n-1 numbers there is only 1 decreasing sequence possible so we need to divide by (n-1)!.<br />This gives us f(x) = dx*xe^x<br />So expected value is integration dx*x^2*e^x from 0 to 1.<br />This gives us final answer as 3-e.yashhttps://www.blogger.com/profile/09303331364304094162noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-43591951071078727002011-05-04T10:34:58.261+05:302011-05-04T10:34:58.261+05:302.334!!2.334!!NightlySunhttps://www.blogger.com/profile/04613556729394471187noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-76470060353360568782011-04-14T21:45:05.170+05:302011-04-14T21:45:05.170+05:30BTW Can you mention the source.BTW Can you mention the source.Sivahttps://www.blogger.com/profile/12469392360597269559noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-65529420961226544352011-04-14T13:30:44.859+05:302011-04-14T13:30:44.859+05:30Sorry. Misunderstood the question initially. so th...Sorry. Misunderstood the question initially. so there is no constraint but rather a stopping condition.<br /><br />But nice question and quite an impressive solution by chera.Sivahttps://www.blogger.com/profile/12469392360597269559noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-54982230375422439252011-04-12T19:09:48.564+05:302011-04-12T19:09:48.564+05:30got answer 3-e where e is exponential constant.
d...got answer 3-e where e is exponential constant.<br /><br />define f(x) as the conditional expected value given that the last value seen is x. <br /><br />we want to find f(1).<br /><br />given that last value seen is x, <br />there are two cases:<br /><br />case 1: next value >= x, in this case the sequence stops and the value you pick is x. <br /><br />case 2: next value < x. In this case , the sequence continues. And the conditional expected value is <br />= integral from z=0 to z=x, f(z)dz/x.<br /><br />probability of case 1 is 1-x,<br />probability of case 2 is x.<br /><br />so, f(x)= (1-x).x + x. (integral from z=0 to z=x, f(z)dz/x).<br /><br />differentiating w.r.t. x,<br />df(x)/dx=1-2x+f(x)<br />also f(0)=0<br />we solve to get f(x)= 2x+1-e^x.<br />so f(1)=3-e.cherahttps://www.blogger.com/profile/15883972329291461469noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-83769670364307470692011-04-12T00:27:57.863+05:302011-04-12T00:27:57.863+05:30What does it mean by between 0 and 1 if there is a...What does it mean by between 0 and 1 if there is a constraint that the subsequent picks are to be less than that of the previous one?<br /><br />If you choose x in the first pick then the second one is U(0,x) right? If this is the case I am assuming the expected value of last random number chosen is needed.<br /><br />In this case isn't it just the product of iid uniformly distributed random variables which by independence has an expectation of 1/2^n?Sivahttps://www.blogger.com/profile/12469392360597269559noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-122646061683161962011-04-11T16:09:33.302+05:302011-04-11T16:09:33.302+05:30is it 1/3 ?is it 1/3 ?andyhttps://www.blogger.com/profile/14628709170867487123noreply@blogger.com