View Single Post
  #58  
Old February 7th, 2005, 03:15 PM

Ivan Pedroso Ivan Pedroso is offline
Corporal
 
Join Date: Feb 2004
Location: Denmark
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Ivan Pedroso is on a distinguished road
Default Re: Random Magic Paths - is it truly random?

The Duck_Number is not an easy tool to utilize in order to check if the distribution of random picks is in fact uniform. It is much easier to just count the different number of FIRE, AIR, WATER,… picks and then do a reduced_Chi^2 test to see if we can uphold the notion, that the random picks are uniformly distributed.
(Chi^2 is the square of the Greek letter Chi – looks like an X and is pronounced: “Kai”)

How to do it:
(1) Take your data-sample and group the measurements in some “bins” (intervals).
(2) Decide on a distribution (or model) that you would like to check your measurements against.
(3) Use your distribution to calculate the expected number of “hits” in each of the bins.
(4) Calculated the reduced_chi^2 value.

Formula:
Reduced_chi^2 = (1/d) * SUM[ (O(i) – E(i))^2 / E(i) ]
d = the number of degrees of freedom
O(i) = observed number of hits in the i’th bin.
E(i) = expected number of hits in the i’th bin.

Depending on the reduced_chi^2 you can now determine the following:
“How likely is it that my chosen distribution could be responsible for the observed data-sample.”
If the reduced_chi^2 is close to one, then agreement is satisfactory. If it is larger, then the observed results do not fit the assumed distribution. “Larger” depends on the value of d, but it usually means larger than 2 or 3.

I’ll do an example to illustrate the method:
I use the sample that Alneyan showed some posts above.

Fire:22, Air:22, Water:25, Earth:28, Astral:22, Death:31, Nture:17, Blood:27

Going through the steps above:
(1) well… an obvious choice of bins would be bin1=FIRE, bin2=AIR bin3=WATER and so on. (You could test the ratio of elemental vs. sorcery by choosing just two bins. There could be other interesting bin’ings.)
(2) I choose a model with equal probability (1/8) of getting the different paths.
(3) The total number of mages generated were 194. So the expected value in each bin is 194/8 = 24.25
(4) We first need to explain the “d” in the formula. Here d = 7. That is because of the following constraint: O(1)+O(2)+…+O(8) = 194. There are eight different bins. If you fill up the first 7, then the rest will just go into the last one.

Reduced_Chi^2 = (1/7)*[ (22 - 24.25)^2 / 24.25 + (22 – 24.25)^2 / 24.25 + (25 – 24.25)^2 / 24.25 + … + (27 – 24.25)^2 / 24.25 ] = 0.798

Apparently there is a nice level of agreement between Alneyan’s data and the hypothesis (probability of 1/8 of getting any of the paths).

But beware of jumping to conclusions!!! This result just mean that we can’t reject the hypothesis. We can’t claim that the probabilities are in fact (1/8) for the different paths, just that the data-sample doesn’t give us any reasons to discard it.

An example of a distribution that would be rejected by this data-sample is this:

FIRE = AIR = WATER= EARTH = 0.25 * 60/100 = 0.1625
ATRAL = DEATH = NATURE = BLOOD = 0.25 * 40/100 = 0.0875
(Corresponding to a 65%-35% distribution between elementals an sorcery)

O( i = 1,2,3,4 ) = 194*0.1625 = 31.525
O( i = 5,6,7,8 ) = 194*0.0875 = 16.975

Reduced_Chi^2 = (1/7)*[ (22 – 31.525)^2 / 31.525 + (22 – 31.525)^2 / 31.525 + (25 – 31.525)^2 / 31.525 + … + (27 – 16.975)^2 / 16.975 ] = 3.7852

With d=7 a result of 3.7852 indicates that it is highly unlikely that this new distribution is responsible for Alneyan’s data.
__________________
If I have seen further, it is by standing on the shoulders of Niefel Jarls
- Sir Ice-ac Newton
Reply With Quote