|
|
|
 |
|

February 4th, 2005, 08:38 PM
|
Corporal
|
|
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
Quote:
atul said:
Quote:
Ivan Pedroso said:
Hmmmmmm, why shouldn't it approach 3/8 ?!?
Let us assume that the distribution behind the scenes is uniform. Then the observed frequencies will approach 1/8.
|
Two random numbers, x1 and x2, both with uniform distribution from zero to one. Each have an expected value of 0.5. But if you're asking what's the expected value of the _greater_ of two, that's 2/3!
|
You a right that if I roll a number of dies (in this case eight-sided) and then only write down the largest value every time, then the average of this "highest-value-thrown" will indeed be higher than the usual 4.5 that is the average value of a standard eight-sided die. But that is (if understand it correctly) not the situation at hand.
As I see it, we are dealing with:
Some dude rolls a bunch of eight-sided dies, and then write down how many ones he got, how many twos he got and so on. He then adds the numbers of the three most common results, and divides this number with the total number of dies rolled.
An example:
100 eight-sided dies are rolled, and the following is written down:
#1 : 15
#2 : 12
#3 : 19
#4 : 10
#5 : 9
#6 : 12
#7 : 10
#8 : 13
The three highest are added (i.e. #3,#1, and #8) and we get:
19+15+13 = 47
And get (the Duck_Number): 47/100 = 0.47
The observed frequencies of the different values of the above example are:
P(x=1) : 15/100 = 0.15
P(x=2) : 12/100 = 0.12
P(x=3) : 19/100 = 0.19
P(x=4) : 10/100 = 0.10
P(x=5) : 9/100 = 0.09
P(x=6) : 12/100 = 0.12
P(x=7) : 10/100 = 0.10
P(x=8) : 13/100 = 0.13
Which are not all that close to the 1/8 = 0.125 value that where used to generate this sample.
If you increase the number of rolled dies to a much larger number than 100, then these frequencies will be closer to 1/8. (Well the probability of getting a sample using say 1.000.000.000.000.000 dies that results in frequencies that deviate greatly from 1/8 will be extremely unlikely - that is why I say that they "will approach" 1/8)
In fact you could choose any two small positive numbers, epsilon >0 and delta >0, (could be 0.00000001 and 0.000000001) and it will then be possible to find a laaaarge number N that insures that:
If N dies are rolled then the probability of getting an observed frequency that deviates from 1/8 with more than the small number epsilon, is smaller than delta.
That is:
Probability( |"observed frequency" - 1/8| > epsilon ) < delta
And then adding up the three largest observed frequencies will then result in a value that is in the interval
[3/8 - 3*epsilon ; 3/8 + 3*epsilon]
with as close to one hundred percent certainty as you want (just choose epsilon and delta to be very small)
So yes - I do in fact claim that given N = some extremely large number, then the Duck_Number will (most most most likely) be (ever ever ever so close to) 3/8.
Sorry for all this dry boring stuff 
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
|

February 4th, 2005, 08:56 PM
|
 |
Major General
|
|
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Re: Random Magic Paths - is it truly random?
No.
Think about it: it's actually impossible for the total allocation of the three most-picked paths to be anything less than 3/8. If it were, at least one of those three paths would necessarily be underrepresented (below 1/8) and at least one of the five "rarer" paths must be overrepresented (above 1/8), which is a contradiction because then they wouldn't be the three most-picked paths.
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
|

February 4th, 2005, 10:26 PM
|
Captain
|
|
Join Date: Oct 2003
Location: Finland
Posts: 883
Thanks: 14
Thanked 11 Times in 9 Posts
|
|
Re: Random Magic Paths - is it truly random?
Quote:
Ivan Pedroso said:
So yes - I do in fact claim that given N = some extremely large number, then the Duck_Number will (most most most likely) be (ever ever ever so close to) 3/8.
|
Okay, you are the undisputed king of the hill when it comes to these things, I grant you that. Unless someone like Alexti wishes to disagree, I'll leave that dispute to you. ;p
Anyway, I was mostly worried by the way some people seemed to think that 20 or so instances would be a amount enough for representative statistics. With 100 or so randoms the distribution is hardly yet uniform, I'd call a test for a lot larger sample before anyone makes any hasty decisions...
...although that disrepancy between elemental and sorcery picks seems interesting, not all of the results are statistically significant but there's a trend forming.
|

February 4th, 2005, 10:36 PM
|
 |
First Lieutenant
|
|
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
31-17
30-28
51-45
48-48
28-23
99-93
97-97
110-86
98-100
154-138
Total of all statistics posted on this thread:
Elemental: 746
Sorcery: 675
__________________
Every time you download music, God kills a kitten.
|

February 4th, 2005, 11:10 PM
|
 |
First Lieutenant
|
|
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
Using the BINOMDIST function that is only a 3% chance... make of that what you will.
__________________
Every time you download music, God kills a kitten.
|

February 5th, 2005, 12:55 AM
|
First Lieutenant
|
|
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
Quote:
Ivan Pedroso said:
In fact you could choose any two small positive numbers, epsilon >0 and delta >0, (could be 0.00000001 and 0.000000001) and it will then be possible to find a laaaarge number N that insures that:
If N dies are rolled then the probability of getting an observed frequency that deviates from 1/8 with more than the small number epsilon, is smaller than delta.
That is:
Probability( |"observed frequency" - 1/8| > epsilon ) < delta
|
Do you know how to proof it? I don't see any obvious one. Let us consider frequency of death picks.
Code:
Probability to roll exactly k out of n P(k,n) = C(k,n)*p0^k*(1-p0)^(n-k). (p0 = 1/8)
For simplicity, let's consider overrunning your range up. Probability of that P(m+,n) = sum[k=m..n]{P(k,n)},
where m is smallest that satisfy m/n > p0 + epsilon.
Ignoring rounding effects we can write m=a*n, where a = p0 + epsilon.
Then P(m+,n) = sum[k=m..n]{P(k,n)}
= p0^(a*n) * sum[k=a*n..n]{C(k,n)*p0^(k-a*n)*(1-p0)^(n-k)}.
And that's where I'm getting stuck. p0^(a*n) quickly goes to 0 when n grows,
but the sum part has number of elements proportional to n,
with the dominant n! on the top, so it will grow very quickly.
Does this P(m+,n) converge to anything? And if it does, to what value?
I have tried to run a test program to see what is happening.
I didn't have few billion years to wait until the probability to get within the epsilon = 0.00000001 will become distinguishable from 0, so I took 0.002 as epsilon. Unfortunately, at around n=3000 my program is running out of precision of double. At that moment P(m+,n) is around 40%. Until then it was slowly going down, but the rate of descend was decrementing. So, the experiment didn't suggest any conclusion
Quote:
Ivan Pedroso said:
And then adding up the three largest observed frequencies will then result in a value that is in the interval
[3/8 - 3*epsilon ; 3/8 + 3*epsilon]
|
That looks wrong. You could do this if your frequencies were independent random processes. However, in our case they are dependent from each other, because the total of all frequencies is always 1. And of course, sum of three largest frequencies is always >= 3/8, but that isn't a problem.
I'm still unsure if your theorem is right or not, but your proof needs fixing.
|

February 5th, 2005, 12:58 AM
|
First Lieutenant
|
|
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
To everybody who submits statistics from the real games. Please make sure that you were not conducting any particular strategy with those random mages (meaning that you sure that some of them couldn't have been killed in the battles or by assasins, remote spells etc). Also if you were buying those mages until you got some particular pick, your statistics is also invalid (because it's guaranteed that it doesn't contain more than once instance of that pick)
|

February 5th, 2005, 07:12 AM
|
 |
General
|
|
Join Date: Aug 2003
Location: Sweden
Posts: 4,463
Thanks: 25
Thanked 92 Times in 43 Posts
|
|
Re: Random Magic Paths - is it truly random?
Hmm, strangest thread I've seen in a while. I have a feeling it tells us something. Perhaps not about the topic of the thread. Interesting reading anyway 
|

February 5th, 2005, 09:29 AM
|
 |
Private
|
|
Join Date: Jan 2005
Location: Indiana, USA
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
Yeah. It tells us that we're all a bunch of nerds. :-)
Not that that's a bad thing. I'm a nerd, my wife's a nerd, and hopefully my son will grow up to be nerd.
|

February 6th, 2005, 11:58 PM
|
Corporal
|
|
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Random Magic Paths - is it truly random?
Quote:
alexti said:
Quote:
Ivan Pedroso said:
[snip]
That is:
Probability( |"observed frequency" - 1/8| > epsilon ) < delta
|
Do you know how to proof it? I don't see any obvious one.
|
"the Law of Large Numbers" (or is it called something else, can't remember it) ensures that:
"The more you repeat the random process the more the empirically measured frequencies approach the values of the ''true'' underlying probabilities"
- repeatedly roll some eight-sided dies and your observed frequencies will get closer and closer to 1/8 as you go along.
Quote:
alexti said:
Quote:
Ivan Pedroso said:
And then adding up the three largest observed frequencies will then result in a value that is in the interval
[3/8 - 3*epsilon ; 3/8 + 3*epsilon]
|
That looks wrong. You could do this if your frequencies were independent random processes. However, in our case they are dependent from each other, because the total of all frequencies is always 1. And of course, sum of three largest frequencies is always >= 3/8, but that isn't a problem.
I'm still unsure if your theorem is right or not, but your proof needs fixing.
|
Sure... I should have used the interval: [3/8 ; 3/8+3*epsilon]
Adding up any three empirical frequencies will (very likely) result in a value that is included in the interval [3/8-3*e ; 3/8+3*e]. Adding the three largest will make the value end up in the smaller interval above.
(hehehe I could be a pedantic arse and state that the smaller interval is contained in the larger and still claim my statement to be true - but I simply just forgot about the obvious lower limit of 3/8  - made me look a bit foolish.)
I made a crude program to empirically calculate the Duck_Number: (I like MatLab  )
Code:
clear %%% Clears stuff.
rand('state',sum(100*clock)); %%% Random seed gets mixed up a bit.
m=[0 0 0 0 0 0 0 0]; %%% A vektor is created:
%%% The first entry could be FIRE
%%% the second AIR, and so on.
N=100000 %%% Number of mages to be generated.
for I=1:N
roll=randint(1,1,8)+1; %%% Random integer between 1 and 8.
m(roll)=m(roll)+1; %%% The appropriate entry (FIRE, AIR...
end %%% gets bumped up by one.
f=m/N %%% The generated frequencies are computed.
sf=sort(f); %%% Frequencies are sorted (ascending order).
duck=sf(8)+sf(7)+sf(6) %%% The three highest values are added.
Doing a handfull of runs (N=100000) resulted in:
Duck_Number ~ 0.377
as a reference: 3/8 = 0.375
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|