*Author

Offline waterzx

  • Sr. Member
  • ****
  • Posts: 730
  • Reputation Power: 11
  • waterzx is taking their first peeks out of the Antlion's burrow.waterzx is taking their first peeks out of the Antlion's burrow.
  • New to Elements
  • Awards: Slice of Elements 3rd Birthday Cake
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg472846#msg472846
« Reply #24 on: March 21, 2012, 02:09:30 am »
The funny thing is that sometimes in my code I use:

If (Math.random()>.5){
   do something
}
 
Sometimes I use:
If (Math.random()<.5){
   do something
}

In both cases I get complaints about the RNG being biased, which means that not only it is biased, it can read your mind  :o
It decreases the returned number when you would prefer a big number and increases it when you want a small number!

I am going to insta-send this to Stephen Hawking because last time I checked there was no software capable of reading the human mind: I smell a Nobel prize coming my way  8)

http://www.elementsthegame.com/dusk.html (http://www.elementsthegame.com/dusk.html)

P.S. : If you are thinking that I should consider the case of the random number being ==.50000000000000000000000000000000 well, lol: I'll let you figure out why it does not matter.
I did expect such a quick reply !

Can you really read people's mind , Zanz ?

Anyway, now it seems Murphy's law is behind the whole thing >:(

Offline sunyata

  • Jr. Member
  • **
  • Posts: 61
  • Reputation Power: 1
  • sunyata is a Spark waiting for a buff.
  • Emptiness is all
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg472851#msg472851
« Reply #25 on: March 21, 2012, 02:27:12 am »
Found that I missed a "3".  Edited my first post.
Also tested the 2002 - coin toss experiment using a statistic software (R). I did the 2002 coin toss experiment 100.000 times. In none of these experiments I got more than ~56 % head.
Nice to see there's another R user on EtG. One of the best pieces of open-source software in existence.
The correct test to use here is a binomial test.  We can use the simple code

binom.test(724,2002,(1/2),alternative="two.sided")

in R to calculate the probability that a 50% prob shield would give 724 misses out of 2002 trials.  It comes out as probability = 2.2x10^-16.  In other words, if OP counted successes/failures correctly it is unequivocal that the probability is not 50%.
The only thing of which I am certain is that I am certain of nothing

Offline Kardo

  • Jr. Member
  • **
  • Posts: 51
  • Reputation Power: 2
  • Kardo is a Spark waiting for a buff.
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg472893#msg472893
« Reply #26 on: March 21, 2012, 05:18:36 am »
Just throwing it out there. Is it possible OP used Adrenaline to increase the speed of testing and somehow Adren reacts badly with Dusk/Fog shield?

Offline ralouf

  • Legendary Member
  • ******
  • Posts: 3113
  • Reputation Power: 35
  • ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.ralouf is a Gargoyle, dangerous and everlasting.
  • Elements lover
  • Awards: War #5 - Sportsmanship AwardWeekly Tournament WinnerSlice of Elements 3rd Birthday CakeChampionship League 1/2012 WinnerWar #4 Winner - Team DeathWeekly Tournament WinnerSlice of Elements 2nd Birthday Cake
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg472901#msg472901
« Reply #27 on: March 21, 2012, 06:16:51 am »
Did like ET and got 51.4522821576763% success in my attack. That's just in you mind that dusk is bugged :p (OK in mine too :p)
TEAM
:deathbig
War Se7en

Offline teffy

  • Hero Member
  • *****
  • Posts: 1689
  • Country: de
  • Reputation Power: 20
  • teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.
  • May the oracle be with you
  • Awards: Slice of Elements 15th Birthday CakeSlice of Elements 14th Birthday CakeSlice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday CakeWeekly Tournament WinnerSlice of Elements 2nd Birthday Cake
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg472924#msg472924
« Reply #28 on: March 21, 2012, 11:28:58 am »
Good that the experiment in the OP is not repeatable...


P.S. : If you are thinking that I should consider the case of the random number being ==.50000000000000000000000000000000 well, lol: I'll let you figure out why it does not matter.
However, 0.5 is an existing machine number, and excluding this case could bring us very rare bugs, which we could see once in a lifetime (or more seldom). My guess is 1 : 2^30 (~1 billion) or 1: 2^62  (4 *10^18) per random number. Math.random doesn´t choose each machine number with the same probability, but the dimension should be correct. Can 0.5 be chosen by math.random() ?.
I`m teffy, here - and Ringat on Kongregate

Offline Wizy

  • Full Member
  • ***
  • Posts: 284
  • Country: es
  • Reputation Power: 6
  • Wizy is a Spark waiting for a buff.
  • (ノಠ益ಠ)ノ彡┻━┻
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg473201#msg473201
« Reply #29 on: March 22, 2012, 04:23:37 pm »
Math.random()>.5 should be in theory more accurate, since the random function will never return exactly 1 but it may return exactly 0 (albeit almost impossible) thus 0.5 would be less than half.
Anyway, the range of error is so small, it will not make any difference.
(Temporarily?) retired from the game.

Offline sunyata

  • Jr. Member
  • **
  • Posts: 61
  • Reputation Power: 1
  • sunyata is a Spark waiting for a buff.
  • Emptiness is all
Re: what is 50% in real life https://elementscommunity.org/forum/index.php?topic=37609.msg473236#msg473236
« Reply #30 on: March 22, 2012, 08:34:20 pm »
Math.random()>.5 should be in theory more accurate, since the random function will never return exactly 1 but it may return exactly 0 (albeit almost impossible) thus 0.5 would be less than half.
Anyway, the range of error is so small, it will not make any difference.
Too right it won't make any measurable difference.  Actionscript uses 64bit number type, so the prob of getting exactly 0.5 is less than 1 in 30,000,000,000,000,000,000.  You'd have a better chance of winning the UK, European, and USA lotteries all on the 29th February.

The code zanz used is fine.  The problem is either with the RNG, or (in light of the issue not being replicated by others) the OP's measurements.
The only thing of which I am certain is that I am certain of nothing

 

anything
blarg: