Quantcast

«

»

Aug 28 2010

Some code showing how the Mars Effect actually works

Found some interesting code in an old edit (excised for being “original research”) in the Wikipedia article for the “Mars Effect” discovered in one of astrology’s centerpiece studies. I note that Robert Currey has not moved from the astrology thread that won’t die, nor has he deigned fit to respond to my charges that he is repeatedly steering the conversation away from his arguments’ weak points. The fact that, when he came out swinging, he didn’t mention the Gauquelin study that produced the purported Mars Effect is interesting. It suggested to me that he felt it was weak. I can see why now.

The Perl code in question:

#This perl script calculates the number of associations with a significance level equal to or greater than the Mars Effect on a random sample in a number of studies (iterations)
#==variable parameters==
my $numiter = 10000; #number of iterations to perform: more is precise but slow
my $sample = 535; #size of sample
my @planets = ("Venus", "Mars", "Sun", "Moon", "Neptune", "Saturn", "Jupiter", "Pluto", "Uranus", "Mercury"); #list of "planets"
my $keysector = 119; #this much or more need to be born in "key sectors"
my $numberofsectors = 12; #number of sectors
my $output = "output.txt"; #output file
#=======================
my $encounter = 0;
open OUTPUT, ">$output";
for(my $iterations = 0; $iterations < $numiter; $iterations++) {
  my %planets; 
  my $sector;
  for(my $k = 0; $k {$sector}++;
    }
  }
  foreach my $p(@planets) {
    for(my $sector1 = 1; $sector1 <= 12; $sector1++) {
      for(my $sector2 = 1; $sector2 {$sector1} + $planets{$p}->{$sector2};
          if($sample >= $keysector) {
            $encounter++;
          }
        }
      }
    }
  }
}
print OUTPUT "$encounter encounters in $numiter iterationsn";
close OUTPUT;

The code generates, once per iteration, a totally random selection of 535 natal charts with each of the common heavenly bodies (the planets, sun and moon), and places them each in one of the twelve “key sectors”. The natal charts are then summed, to see how many of them have a specific planet in a specific sector, in order to try to identify a “Planet Effect” similar to, and as statistically significant as, the one shown in the Mars Effect study. In fact, the number required to call it as statistically significant is identical to that of the Mars Effect study.

By default, it runs 10,000 such simulations. The more you run, the more accurate the number you’ll get. Every time I’ve run it, I’ve had over 60% of the “studies” come back as significant. Frankly, that means this “effect” is a statistical happenstance that’s very likely to happen given any random sample of data. The fact that the natal charts were completely generated at random should work against such a possibility, as if astrology has anything to it, this random generation should not work nearly as often. This means there’s a very good chance of finding such an effect with ANY randomly selected group of people. And the other fact salient to this discussion, the fact that Gauquelin threw out basketball players, suggests to me that he saw the basketball data as not showing the effect, so he went ahead and threw it out to make a stronger case than he had.

Fascinating stuff.

1 ping

  1. 1
    Are all astrologers fated by the stars to be douches? | Lousy Canuck

    [...] And when you do get something approaching statistical significance, you’ll find out that the bar for significance was artificially lowered such that you could pull an “effect” out of randomly generated numbers more often than [...]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>