On Choosing Random Numbers...

Discussion in 'Science / Nature' started by mosaix, Feb 12, 2017.

  1. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    Okay, think of a random number between 1 and 1000. Do that twice a day for the next 45 days.

    Wait a year then do it again. How many of those numbers will be repeated between the two events? Or to put it another way how good are you at choosing random numbers?

    I've got a book of 1000 chess problems. At the beginning of 2016 I decided to solve two of these a day (one in the morning and one in the evening), each problem chosen by me choosing a random number between 1 and 1000. I did this until the middle of February and then it petered out. I started again at the beginning of 2017.

    The problems have no obvious solution but more 'best outcome'. I recorded my solutions in an excel spreadsheet and then looked up the solution. Where my solution wasn't 'best outcome' these were marked in red so that I could visit them again in the future, having forgotten the provided solution.

    So twice a day for forty five days meant that last year I chose 90 random numbers. And now I'm approaching having chosen another 90 this year. When I go to the spreadsheet I can see previous choices.

    How many of this years 'random' choices collided with last years 'random' choices?

    17 :eek:

    On
    6
    additional occasions I chose numbers that I had already chosen this year - I remembered the problem as soon as I turned to the page!

    So choosing random number is much more difficult that I thought - for me anyway.
     
    Last edited: Feb 12, 2017
  2. BAYLOR

    BAYLOR There Are Always new Things to Learn.

    Joined:
    Jun 29, 2014
    Messages:
    11,261
    Nevermind ,
     
    Last edited: Feb 12, 2017
  3. Victoria Silverwolf

    Victoria Silverwolf Vegetarian Werewolf

    Joined:
    Dec 9, 2012
    Messages:
    3,851
    Location:
    Chattanooga, Tennessee, USA
    This is like the birthday problem.

    If you choose 90 numbers at random out of 1000, each number has 89 chances to match another.

    (90)(89) = 8010 chances to match.

    This isn't formal math, but it lets you see that it's not very surprising that you will have some matching numbers.

    If you want to avoid repeating, use this random sequence generator to arrange the numbers from 1 to 1000 in a random order.

    RANDOM.ORG - Sequence Generator
     
    Stable and mosaix like this.
  4. RX-79G

    RX-79G Well-Known Member

    Joined:
    Sep 18, 2016
    Messages:
    746
    I'm willing to bet that you wouldn't "randomly" choose 1 or 1000.
     
    Ursa major and mosaix like this.
  5. Victoria Silverwolf

    Victoria Silverwolf Vegetarian Werewolf

    Joined:
    Dec 9, 2012
    Messages:
    3,851
    Location:
    Chattanooga, Tennessee, USA
    How to calculate the exact probability that two numbers will be the same when N numbers are chosen from K choices:

    Probability of choosing the same number

    Since this involves calculating factorials for large numbers in your example, the math is more than any on-line calculator I can find can handle.

    It would be:

    One minus [1000!/(1000 to the 90th power)(910!)]
     
    mosaix likes this.
  6. Victoria Silverwolf

    Victoria Silverwolf Vegetarian Werewolf

    Joined:
    Dec 9, 2012
    Messages:
    3,851
    Location:
    Chattanooga, Tennessee, USA
    Let me try to approximate this:

    1000! = Approx. 4 times ten to the 2567th power

    1000 to the 90th power = 1 times ten to the 270th power

    910! = Approx. 2.5 times ten to the 2299th power

    Multiply the last two to get 2.5 times ten to the 2569th power

    Divide this into the first number to get 1.6 times ten to the minus 2 power = 0.016

    Subtract this from 1 to get 0.984

    Therefore, if you randomly pick 90 numbers from 1 to 1000, there is a 98.4% chance that at least two will match.
     
    Stable and mosaix like this.
  7. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    I think it's more than probability Victoria. There must be some other kind of mechanism at work. 747 for instance is an obvious choice, although it wasn't one that I chose. 464 was however - it was the model number of a machine I worked on about 50 years ago. There must be other 'themes' at work that I haven't recognised and this is probably true for everyone.
     
  8. Victoria Silverwolf

    Victoria Silverwolf Vegetarian Werewolf

    Joined:
    Dec 9, 2012
    Messages:
    3,851
    Location:
    Chattanooga, Tennessee, USA
    So, these are not really "random" numbers? You're just picking one out of your head? Yeah, that would involve psychological factors.

    There are a few surveys on-line which indicate that, when asked to pick a number from 1 to 10, 7 was picked more often than chance. When asked to pick a number from 1 to 20, 17 was picked more often than chance. The effect of "lucky" 7, I suppose.
     
  9. Ursa major

    Ursa major Bearly Believable Staff Member

    Joined:
    Aug 7, 2007
    Messages:
    18,763
    Location:
    England
    This (well, 4-6-4) is a locomotive wheel arrangement (a "Hudson" or a "Baltic"), and there are lots** of them, not all of them listed on this Wiki page.

    Having not tried the experiment, I don't know if I would tend to choose these numbers or actually avoid them, as not being at all random to me. (It would be interesting to know how a random number generator, whose generation process is not encumbered by extraneous knowledge, might perform in comparison.)


    ** - Luckily, many of them step outside the 1-1000 limits (2-10-4, a Texas type, for instance).
     
    mosaix likes this.
  10. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    Sorry, I should have made myself clearer, Victoria.
     
  11. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    It happened again this morning. 627!

    Heaven knows why I should pick 627 twice when there are hundreds of others to go for.
     
  12. Stable

    Stable Watching you from upside down

    Joined:
    Oct 7, 2016
    Messages:
    79
    Interestingly there's a branch of maths (or statistics) that deals with this - they determined that there is a pattern to even random numbers. This is relevant because it shows when people, for example, cook their accounting books. The "random" numbers that they pick don't reflect the natural distribution of numbers.

    In other words, humans are terrible at picking numbers randomly. You need technical assistance like a random number site.
     
    Venusian Broon and mosaix like this.
  13. Venusian Broon

    Venusian Broon Defending the SF genre with terminal intensity

    Joined:
    Dec 7, 2011
    Messages:
    3,061
    Location:
    Edinburgh
    Or make your own daft random number generator!

    How about choosing a seed - say in this case number 4 - then take a big long list of the digits of Pi and then when you've solved the problem go along 4 in Pi's decimal expansion and then take the next three digits you find (which assuming you count the 3.) would be 159. After solving that go 159 digits to the left, after the 9, and find the next three digit number...

    So not only are you solving chess puzzles, you will be exploring and traversing the mysteries of the number Pi. From my understanding it should be truly random.

    (Note, looking at the first thousand numbers, you would probably have to choose the chess problem with the three numbers you find plus one as there are sequences of zero's I.e. 000 - although you could interpret that as 1000?)

    ((mmm...makes me wonder if this would be easy to program ???.....Stop, procrastination begone!))

    (((EDIT: Now this raises the question for me, how long do you need to go to make all the numbers 1-1000 appear at least once???)))
     
    mosaix likes this.
  14. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    BTW if anyone is interested the book is 1001 Winning Chess Sacrifices and Combinations by Fred Reinfeld. Can't recommmend it highly enough.

    In fact any chess book by Reinfeld gets my recommendation.

    This morning's duplication was 511! Why?!
     
  15. Venusian Broon

    Venusian Broon Defending the SF genre with terminal intensity

    Joined:
    Dec 7, 2011
    Messages:
    3,061
    Location:
    Edinburgh
    I was a bit addicted to chess as a child...but I just couldn't get into the whole chess problem thing. I think I understand it better now as an old one...but I've not played chess in years :oops:. Possibly all this 'a chess program on a mobile phone that can beat most humans' has tarnished it a bit for me :(

    Cor, I now remember when newspapers used to print daily chess problems (The Sudoku of the 'up to 70s?')
     
    mosaix likes this.
  16. mosaix

    mosaix Shropshire, U.K.

    Joined:
    Feb 13, 2006
    Messages:
    5,987
    Location:
    Shropshire, U.K.
    I think The Observer still does one on Sundays, VB.

    I remember a Christmas special many years ago that I found impossible. The solution nearly drove me mad. The problem 'Black to move' referred to the player's name - Black - who was playing white and all the black pieces had passed all the white pieces on the board so they were playing in the opposite direction to which the solver assumed. Believe it or not someone solved it - swine!
     
Loading...

Share This Page