Subject:  C++ (fwd) "Linet" study probabilities......
Date:     Wed, 10 Jun 1998 150545 -0500 (CDT)
From:     "Roy L. Beavers" <rbeavers@llion.org>
To:       emfguru@hotmail.com
--------------------------------------------------


---------- Forwarded message ----------
Date: Wed, 10 Jun 1998 14:28:48 -0500
From: Edward Maxey 
To: "Roy L. Beavers" 
Subject: C++ "Linet" study probabilities.........

Hello Roy Beavers,

Several months ago results from a BASIC study showing that the
probability of 60 Hz EMFs being causal to childhood leukemia (the Linet
study) was 200,000  to one.  Recently questions have come up about the
integrity of the random number function in MICROSOFT's BASIC.
Accordingly the program was written in C++ using the "rand" function.
This function "uses a multiplicative congruential random number generator"
with a period of  2^32.  It is available on UNIX and is defined in ANSI
C.

Here is a result when 10,000,000 baskets of 624 coins was overturned. 
It took 141 minutes to run on an 80 MHZ Pentium machine.
	Heads categories are numbered 248 through  376.
	The values following "=" give the hits per category.
     ***This run showed a 5,408 to one probability that EMFs are causal
        to childhood acute lymphoblastic leukemia.***
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - -
Probability is 5,408 to one.

Total Heads = 3,120,196,185
248 = 0  249 = 1  250 = 0  251 = 2  
252 = 4  253 = 3  254 = 13  255 = 8  
256 = 10  257 = 12  258 = 31  259 = 38  
260 = 58  261 = 87  262 = 117  263 = 143  
264 = 194  265 = 265  266 = 377  267 = 486  
268 = 647  269 = 862  270 = 1091  271 = 1441  
272 = 1876  273 = 2347  274 = 3084  275 = 3982  
276 = 5035  277 = 6426  278 = 7949  279 = 9637  
280 = 11920  281 = 14693  282 = 17967  283 = 21701  
284 = 25907  285 = 30601  286 = 36274  287 = 42714  
288 = 50426  289 = 58240  290 = 67746  291 = 77464  
292 = 88722  293 = 100185  294 = 112743  295 = 126644  
296 = 140536  297 = 155491  298 = 170592  299 = 185101  
300 = 200137  301 = 216604  302 = 231233  303 = 247164  
304 = 260253  305 = 272072  306 = 283909  307 = 294456  
308 = 303258  309 = 309793  310 = 315141  311 = 317997  
312 = 318977  313 = 318239  314 = 315719  315 = 309634  
316 = 303506  317 = 295276  318 = 284460  319 = 273346  
320 = 260468  321 = 246585  322 = 232185  323 = 216749  
324 = 201712  325 = 186761  326 = 170540  327 = 155626  
328 = 140872  329 = 127199  330 = 112916  331 = 100078  
332 = 89116  333 = 78043  334 = 68225  335 = 58649  
336 = 50915  337 = 43404  338 = 37179  339 = 31008  
340 = 26074  341 = 21691  342 = 17715  343 = 14704  
344 = 12230  345 = 9967  346 = 7579  347 = 6368  
348 = 5073  349 = 3952  350 = 3176  351 = 2426  
352 = 1839  353 = 1467  354 = 1138  355 = 847  
356 = 678  357 = 471  358 = 357  359 = 266  
360 = 188  361 = 136  362 = 119  363 = 61  
364 = 58  365 = 31  366 = 30  367 = 18  
368 = 13  369 = 10  370 = 6  371 = 5  
372 = 6  373 = 1  374 = 0  375 = 0  
376 = 1  
	 - - - - - - - - - - - - - - - - - - - - - - - - -  - - - - - - - - - -
- - - - - - -

Here is the program in case some of your readers who have C++ 
compilers wish to see for themselves.
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
/*program NCIRAND.C       Calculates the probability of 267 heads
			 when a basked of 624 coins is overturned.
				    by
			E. Stanton Maxey, M.D., F.A.C.S.
			      2811 Joyce Street
			   Fayetteville, AR 72703
			    Phone (501) 443 7699*/

#include
#include
#include
#include
#include
#include

FILE          *textfile;                 /*pointer to recording file*/
int          L,H,U,V,Z;
float                   G,F;
long                        I;                 /*counts up to
10,000,000*/
double                   T;                 /*counts up to
3,120,000,000*/
long        Head[130];                 /*array to hold 130 hit
categories*/


int main()
 {T = 0;
  U = 0;
  H = 0;
  L = 0;
  clrscr();
  randomize();
  for(V = 0; V < 129; V++)
  { Head[V] = 0;}        /*zero hit array*/
  G = 0;
  for(I=1; I < 10000001; I++)  /*Number of 634 coin baskets dumped*/
  {
  H = 0; F =0;
  for(V = 1; V < 625; V++)     /*get # of heads from 624 coins*/
  {if ((rand() % 10) < 5) H = H + 1;}  /*tally hits per basket*/
  T = T + H;                     /*tally total hits*/
  Z = H - 248;                   /*get Z factor*/
  Head[Z] = Head[Z] + 1;         /*log hit in Head[Z]*/
  if (H<268) L = L + 1;          /*tally hits below 268*/
  }
  G = 10000000/L;                /*determine probability*/
  printf("\nProbability is %3.0f",G);  /*print probability*/
  printf(" to one.\n");
  printf("\nTotal Heads = %3.0lf",T);
  printf("\n");
  Z = 247;
  if ((textfile = fopen("NCIRAND.TXT","w")) == NULL) /*open data file*/
  {printf("Error opening text file for writing\n");
  exit(0);}
  fprintf(textfile,"\nProbability is %3.0f",G);/*file print
probability*/
  fprintf(textfile," to one.\n");
  fprintf(textfile,"\nTotal Heads = %3.0lf",T);
  fprintf(textfile,"\n");
  for(V = 1; V < 130; V++)      /*Z -1 and V +1 for file print*/
  {printf("%3hd",V+Z);
  fprintf(textfile,"%3hd",V+Z);
  printf(" = ");
  fprintf(textfile," = ");
  printf("%ld",Head[V-1]);
  fprintf(textfile,"%ld",Head[V-1]);
  printf("  ");
  fprintf(textfile,"  ");
  if ((V%4) == 0) printf("\n");
  if ((V%4) == 0) fprintf(textfile,"\n"); /*four categories per line*/
  }
  fclose(textfile);                  /*close file*/
  return(0);
 }
	- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - 
All good wishes,
Ed



Archive provided courtesy of WaveGuide, http://www.wave-guide.org
Reprinted with permission of Roy Beavers, http://www.feb.se/EMF-L/EMF-L.html