How many tries to get a closer number to a target when $X$ others numbers are present? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I have a target number in a $2^64$ space.



How many random tries do I have to do to be the closest to this target number if there is $X$ other random number?







share|cite|improve this question













closed as off-topic by amWhy, Jyrki Lahtonen, Xander Henderson, Leucippus, Adrian Keister Jul 29 at 0:48


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, Xander Henderson, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.












  • Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
    – joriki
    Jul 28 at 18:04










  • Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
    – benoit jego
    Jul 28 at 18:23















up vote
-1
down vote

favorite












I have a target number in a $2^64$ space.



How many random tries do I have to do to be the closest to this target number if there is $X$ other random number?







share|cite|improve this question













closed as off-topic by amWhy, Jyrki Lahtonen, Xander Henderson, Leucippus, Adrian Keister Jul 29 at 0:48


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, Xander Henderson, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.












  • Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
    – joriki
    Jul 28 at 18:04










  • Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
    – benoit jego
    Jul 28 at 18:23













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have a target number in a $2^64$ space.



How many random tries do I have to do to be the closest to this target number if there is $X$ other random number?







share|cite|improve this question













I have a target number in a $2^64$ space.



How many random tries do I have to do to be the closest to this target number if there is $X$ other random number?









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 28 at 18:21
























asked Jul 28 at 17:34









benoit jego

31




31




closed as off-topic by amWhy, Jyrki Lahtonen, Xander Henderson, Leucippus, Adrian Keister Jul 29 at 0:48


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, Xander Henderson, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by amWhy, Jyrki Lahtonen, Xander Henderson, Leucippus, Adrian Keister Jul 29 at 0:48


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – amWhy, Xander Henderson, Adrian Keister
If this question can be reworded to fit the rules in the help center, please edit the question.











  • Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
    – joriki
    Jul 28 at 18:04










  • Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
    – benoit jego
    Jul 28 at 18:23

















  • Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
    – joriki
    Jul 28 at 18:04










  • Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
    – benoit jego
    Jul 28 at 18:23
















Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
– joriki
Jul 28 at 18:04




Well, it's random, so you never know :-). Do you want to reach a particular probability to be the closest? Also, how is the target number chosen? Is it also random? And are all these random numbers drawn uniformly from all integers in a contiguous range of $2^64$ integers?
– joriki
Jul 28 at 18:04












Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
– benoit jego
Jul 28 at 18:23





Yeah everything is random, drawn uniformly. I would like to know the formula to know how many tries on average it would take to be the closest
– benoit jego
Jul 28 at 18:23











1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Let $N$ be the number of tries it takes for you to be closest. You want the expected value of $N$. After $n$ tries, your probability of being the closest is $n/(X+n)$. Thus the expected value of $N$ is



begineqnarray*
mathsf E[N]
&=&sum_n=1^inftymathsf P(Nge n)\
&=&sum_n=1^inftyfrac XX+n\
&=&infty;.
endeqnarray*



Thus, perhaps somewhat counterintuitively, the expected number of tries turns out to be infinite.



I glossed over the very low probability of ties; in order to deal with that, you'd have to specify what happens in case of ties – both ties between guesses and coincidences between a guess and the target. If “closest” is taken to mean “closer than any other number”, then the expected number of tries is infinite simply because there's a non-zero ($2^-64$) probability that one of the other numbers coincides with the target and you can never be closer.






share|cite|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    Let $N$ be the number of tries it takes for you to be closest. You want the expected value of $N$. After $n$ tries, your probability of being the closest is $n/(X+n)$. Thus the expected value of $N$ is



    begineqnarray*
    mathsf E[N]
    &=&sum_n=1^inftymathsf P(Nge n)\
    &=&sum_n=1^inftyfrac XX+n\
    &=&infty;.
    endeqnarray*



    Thus, perhaps somewhat counterintuitively, the expected number of tries turns out to be infinite.



    I glossed over the very low probability of ties; in order to deal with that, you'd have to specify what happens in case of ties – both ties between guesses and coincidences between a guess and the target. If “closest” is taken to mean “closer than any other number”, then the expected number of tries is infinite simply because there's a non-zero ($2^-64$) probability that one of the other numbers coincides with the target and you can never be closer.






    share|cite|improve this answer

























      up vote
      0
      down vote



      accepted










      Let $N$ be the number of tries it takes for you to be closest. You want the expected value of $N$. After $n$ tries, your probability of being the closest is $n/(X+n)$. Thus the expected value of $N$ is



      begineqnarray*
      mathsf E[N]
      &=&sum_n=1^inftymathsf P(Nge n)\
      &=&sum_n=1^inftyfrac XX+n\
      &=&infty;.
      endeqnarray*



      Thus, perhaps somewhat counterintuitively, the expected number of tries turns out to be infinite.



      I glossed over the very low probability of ties; in order to deal with that, you'd have to specify what happens in case of ties – both ties between guesses and coincidences between a guess and the target. If “closest” is taken to mean “closer than any other number”, then the expected number of tries is infinite simply because there's a non-zero ($2^-64$) probability that one of the other numbers coincides with the target and you can never be closer.






      share|cite|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Let $N$ be the number of tries it takes for you to be closest. You want the expected value of $N$. After $n$ tries, your probability of being the closest is $n/(X+n)$. Thus the expected value of $N$ is



        begineqnarray*
        mathsf E[N]
        &=&sum_n=1^inftymathsf P(Nge n)\
        &=&sum_n=1^inftyfrac XX+n\
        &=&infty;.
        endeqnarray*



        Thus, perhaps somewhat counterintuitively, the expected number of tries turns out to be infinite.



        I glossed over the very low probability of ties; in order to deal with that, you'd have to specify what happens in case of ties – both ties between guesses and coincidences between a guess and the target. If “closest” is taken to mean “closer than any other number”, then the expected number of tries is infinite simply because there's a non-zero ($2^-64$) probability that one of the other numbers coincides with the target and you can never be closer.






        share|cite|improve this answer













        Let $N$ be the number of tries it takes for you to be closest. You want the expected value of $N$. After $n$ tries, your probability of being the closest is $n/(X+n)$. Thus the expected value of $N$ is



        begineqnarray*
        mathsf E[N]
        &=&sum_n=1^inftymathsf P(Nge n)\
        &=&sum_n=1^inftyfrac XX+n\
        &=&infty;.
        endeqnarray*



        Thus, perhaps somewhat counterintuitively, the expected number of tries turns out to be infinite.



        I glossed over the very low probability of ties; in order to deal with that, you'd have to specify what happens in case of ties – both ties between guesses and coincidences between a guess and the target. If “closest” is taken to mean “closer than any other number”, then the expected number of tries is infinite simply because there's a non-zero ($2^-64$) probability that one of the other numbers coincides with the target and you can never be closer.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Jul 28 at 18:34









        joriki

        164k10179328




        164k10179328












            Comments

            Popular posts from this blog

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?

            What is the equation of a 3D cone with generalised tilt?