*Author

Offline DemagogTopic starter

  • Legendary Member
  • ******
  • Posts: 2557
  • Reputation Power: 40
  • Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.
  • New to Elements
Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313291#msg313291
« on: April 17, 2011, 12:03:08 am »
I've stayed up far too long today, so I just had one of my crazy ideas. I'd like to see how long it takes for a random number generator, on average, to guess a correct number when it is used to play the "higher or lower" game, at different ranges of starting numbers. An example:

I choose the number 63, out of the numbers 1 through 100.
I set the RNG to pick a random number from 1 to 100.
It outputs 41.
I set it to pick a number from 42 to 100.
It outputs 88.
I set it to pick a number from 42 to 87.
It outputs 55.
I set it to pick a number between 56 and 87.
It outputs 85.
I set it to pick a number between 56 and 84.
It outputs 63.

It took the RNG five guesses to output the correct number.

I'd like to do this experiment a large number of times with several different ranges of numbers, in order to see if there is a correlation between the size of the range and the number of guesses the RNG takes. The hypothesis is that there is.

So, a list of ranges to test:

1-10
1-25
1-50
1-100
1-250
1-500
1-1000
1-2500
1-5000
1-10000

Each would be tested a large number of times (any idea how many?) and then the guesses would be averaged for each range.

This is purely for fun, so there is one "rule." Researching is forbidden until all results are in. Even if you know how the results should be before they are in, they are to be kept a secret. Think of it as not spoiling the ending of a movie for someone who hasn't seen it.

So, if you'd like to take place in this experiment, just pick one of the ranges and begin. Use http://www.random.org/ (http://www.random.org/). Post your results here.

Thanks, and have fun!

Offline Ryli

  • Legendary Member
  • ******
  • *
  • Posts: 2139
  • Reputation Power: 31
  • Ryli is a Ghost, obsessed with their Elemental pursuits.Ryli is a Ghost, obsessed with their Elemental pursuits.Ryli is a Ghost, obsessed with their Elemental pursuits.Ryli is a Ghost, obsessed with their Elemental pursuits.Ryli is a Ghost, obsessed with their Elemental pursuits.Ryli is a Ghost, obsessed with their Elemental pursuits.
  • Awards: Slice of Elements 10th Birthday CakeWeekly Tournament WinnerElements League 3/2017 2nd PlaceWeekly Tournament WinnerBattle League 1/2017 3rd PlaceSlice of Elements 8th Birthday CakeIndium DonorArt Competition: Elemements
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313297#msg313297
« Reply #1 on: April 17, 2011, 12:13:49 am »
I'll only take part if the RNG is up to some betting :) lol

I'll start tomorrow.

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313300#msg313300
« Reply #2 on: April 17, 2011, 12:20:34 am »
1-10 is short enough of a range to calculate rather than test.
The theoretical average number of guesses for range 1-10 with the chosen number 1 is 5.5 exactly.
By symmetry the same is true of chosen number 10.
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

Offline Camoninja

  • Sr. Member
  • ****
  • Posts: 518
  • Country: us
  • Reputation Power: 7
  • Camoninja is a Spark waiting for a buff.
  • failed quitter
  • Awards: Slice of Elements 3rd Birthday CakeSlice of Elements 2nd Birthday Cake
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313301#msg313301
« Reply #3 on: April 17, 2011, 12:25:13 am »
Looks like you are doing a binary search.
Math says that the RNG would at best guess it in 1 guess and at worst guess it in log base 2 of numbers to guess through turns.
There is a pattern to how likely each will be guessed, it's twice as likely to guess in two than one turn, three than two turns, etc. So you take the average of all the possibilities you just calculated and get a formula. I don't remember the formula right because I don't remember that day in my computer science class.

Offline OldTrees

  • Legendary Member
  • ******
  • Posts: 10297
  • Reputation Power: 114
  • OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.OldTrees is a mythical and divine giver of immortality, one of the Turquoise Nymphs.
  • I was available for questions.
  • Awards: Brawl #2 Winner - Team FireTeam Card Design Winner
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313302#msg313302
« Reply #4 on: April 17, 2011, 12:28:03 am »
It is different from a binary search.
A binary search of 63 would be: 50,75,62,69,65,63
"It is common sense to listen to the wisdom of the wise. The wise are marked by their readiness to listen to the wisdom of the fool."
"Nothing exists that cannot be countered." -OldTrees on indirect counters
Ask the Idea Guru: http://elementscommunity.org/forum/index.php/topic,32272.0.htm

QuantumT

  • Guest
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313304#msg313304
« Reply #5 on: April 17, 2011, 12:34:08 am »
Is it required that we do it by hand? It seems like this is the kind of thing that a few lines of code would be well suited for.

Offline Camoninja

  • Sr. Member
  • ****
  • Posts: 518
  • Country: us
  • Reputation Power: 7
  • Camoninja is a Spark waiting for a buff.
  • failed quitter
  • Awards: Slice of Elements 3rd Birthday CakeSlice of Elements 2nd Birthday Cake
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313308#msg313308
« Reply #6 on: April 17, 2011, 12:35:12 am »
It is different from a binary search.
A binary search of 63 would be: 50,75,62,69,65,63
Oh! You're right, it is.
Hm. I thought that the target number was always the same so I thought it would still be the same comcept. Now I realize it's both random so it isn't the same concept at all and it wouldn't be the same concept the way  saw it anyway.
Still, there should be a way to find the mathematical formula.

Offline agentflare

  • Sr. Member
  • ****
  • Posts: 642
  • Reputation Power: 10
  • agentflare is taking their first peeks out of the Antlion's burrow.agentflare is taking their first peeks out of the Antlion's burrow.
  • New to Elements
  • Awards: Card Ideas In Action WinnerWar #4 Winner - Team Death
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg313316#msg313316
« Reply #7 on: April 17, 2011, 12:54:08 am »
Is it required that we do it by hand? It seems like this is the kind of thing that a few lines of code would be well suited for.
Agreed. The code needed would be pretty simple.

Offline DemagogTopic starter

  • Legendary Member
  • ******
  • Posts: 2557
  • Reputation Power: 40
  • Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.
  • New to Elements
Re: Randomness and Probability https://elementscommunity.org/forum/index.php?topic=24589.msg314265#msg314265
« Reply #8 on: April 18, 2011, 12:57:47 am »
Just as long as you use random.org, I don't care how you do it. Everyone has to use the same thing or the results could be wrong.

 

blarg: