4 ms·
The cicada simulation on that page is very misleading. You're only seeing prime numbers because you arbitrarily synchronized the cycles of the cicada and the pr
by jules 14y ago
The cicada simulation on that page is very misleading. You're only seeing prime numbers because you arbitrarily synchronized the cycles of the cicada and the predators at t=0. If you had chosen another starting point at t=0 then you would see that years with many prime factors do better because then the predators consistently miss the cicada cycle. From somebody who criticizes psychology for wrong methodology I'd not have expected a simulation that's nothing more than confirmation bias ;-)
- lutusp 14y ago> The cicada simulation on that page is very misleading. Not at all. > You're only seeing prime numbers because you arbitrarily synchronized the cycles of the cicada and the predators at t=0. Not true. Because of how the math works out, the starting time is irrelevant. Any arbitrary starting times for both the cicadas and predators yields the same outcome over time, because the filtering effect of prime reproductive cycles depends on synchronizing (or not synchronizing) random reproductive periods, not starting points. Just so you won't think this is all rhetoric, and to do your homework for you, here's a short Python program that accepts any starting value and produces the same result regardless of the chosen starting point: https://www.dropbox.com/s/7m8hq9yzcu5nztx/prime_reproduction_test.py https://www.dropbox.com/s/7m8hq9yzcu5nztx/prime_reproduction... Here is a typical output (the output changes in small ways with the chosen starting number, but always favors primes over composites): 2 = 6901 ********************* 3 = 6395 ******************* 4 = 9036 **************************** 5 = 5836 ****************** 6 = 11030 ********************************** 7 = 5468 ***************** 8 = 10410 ******************************** 9 = 7643 *********************** 10 = 9923 ******************************* 11 = 4987 *************** 12 = 14110 ******************************************** 13 = 4810 *************** 14 = 9199 **************************** 15 = 8988 **************************** 16 = 11051 ********************************** 17 = 4528 ************** 18 = 12797 *************************************** 19 = 4414 ************* 20 = 12469 ************************************** 21 = 8273 ************************* 22 = 8251 ************************* 23 = 4219 ************* > If you had chosen another starting point at t=0 ... See above. You're mistaken. If you had tested your idea using actual mathematics, you would have realized your mistake before posting. But this would require a respect for validating one's ideas before posting them. The effect being described counts only synchronization events between two reproductive cycles A and B over a long period of time. In this case, a given prime number A is compared to any number of values for B, and the number of synchronizations is totaled. As it happens, and regardless of the starting times, when a prime number in A is compared to a large range of values in B, and not surprisingly, the number of synchronizations is smallest if A is prime. Another way of saying this is that a prime number has fewer factors than a composite number, hardly a controversial claim, and one that doesn't depend on the starting values for the counters. > From somebody who criticizes psychology for wrong methodology ... Ah, yes, the real reason for your post. I have never criticized psychology for "wrong methodology" anywhere. I criticize the field for not being scientific, as does the sitting director of the NIMH and many, many others. Today's example: Title: "Final Report: Stapel Affair Points to Bigger Problems in Social Psychology" Source: http://news.sciencemag.org/scienceinsider/2012/11/final-report-stapel-affair-point.html http://news.sciencemag.org/scienceinsider/2012/11/final-repo... Quote: "In their exhaustive final report about the fraud affair that rocked social psychology last year, three investigative panels today collectively find fault with the field itself. They paint an image of a "sloppy" research culture in which some scientists don't understand the essentials of statistics, journal-selected article reviewers encourage researchers to leave unwelcome data out of their papers, and even the most prestigious journals print results that are obviously too good to be true. The commissions—one for each of the universities where Stapel has worked—concluded that "from the bottom to the top there was a general neglect of fundamental scientific standards and methodological requirements." That climate made it possible for Stapel's fraud to go undetected for many years, the report says." Somehow people like you think psychology's problems would go away if its critics would simply shut up. But this confuses the messenger with the message.
- jules 14y agoSorry, but you're wrong. Even though it's fairly intuitively obvious, you can never trust intuition so I had tested it before I posted that. Change the line // are cicadas and predators both present at once? if ((y % py == 0) && (y % cy == 0)) { to // are cicadas and predators both present at once? if ((y % py == 0) && ((y+1) % cy == 0)) { or any other number than +1 to change the initial offset between the cicada and predator cycles, and you'll see that what I said is true. > Ah, yes, the real reason for your post. Not really, I in fact agree with (most of) what you say about psychology. This example just goes to show that one has to be careful with non-rigorous arguments (something that psychology is full of).
- lutusp 14y ago> if ((y % py == 0) && ((y+1) % cy == 0)) Wait, hold on. The problem is not with the theory, it's with your code. You're requiring a match between two values n and n+1 at once. That undermines the basic idea. To make your code work and imitate nature, you would need to take separate sums for n and n+1, not together as in your example, just as though there were two organisms, each trying to match up with the cicada's reproductive cycle. BTW my Python program sums values with an arbitrary change of starting point, but separately. Your code above has an obvious bug. > you'll see that what I said is true. Read my edited post with the Python program -- the starting point is irrelevant. > Not really, I in fact agree with (most of) what you say about psychology. Well, I certainly got that wrong. I assumed without evidence that you were one of those who bridles at the thought of someone criticizing psychology.
- jules 14y agoYour Python program is incomprehensible to me, probably due to the lack of meaningful variable names and double modulo: for a in range(2,22): total = 0 for b in range(2,25): for c in range(1,1000): cc = c + start_value if(a % ((cc % b)+1) == 0): total += 1 In any case, my point was about the specific simulation on the web page you linked to. See above for my suggestion about how to change the starting offset in the original simulation, which clearly shows that the effect is reversed for different offsets. Response to this edit: > Wait, hold on. The problem is not with the theory, it's with your code. You're requiring a match between two values n and n+1 at once. That undermines the basic idea. To make your code work and imitate nature, you would need to take separate sums for n and n+1, not together as in your example, just as though there were two organisms, each trying to match up with the cicada's reproductive cycle. BTW my Python program sums values with an arbitrary change of starting point, but separately. Your code above has an obvious bug. I am just setting the starting offset (not the starting year as I think you are doing in the Python program) between the cicada and the predators to something other than zero. Lets assume as an example that the cicada cycle is 4 years and the predator cycle is 3 years. At simulation year 0, there can be a variety of situations: at this year the cicada are mating, the next year the cicada are mating, in 2 years the cicada are mating, or in 3 years the cicada are mating. The same goes for the predators: at simulation year 0, the predators are coming, or the next year the predators are coming, or in 2 years the predators are coming. A proper simulation would consider all these possibilities. Your simulation arbitrarily assumes that at simulation year 0 both the cicada are mating and the predators are coming, i.e. the offset between the cicada mating year and the predator arrival year is 0 at the start of the simulation. By increasing the cicada cycle year by a fixed number, I am changing this arbitrary assumption to a different number of years to show that this assumption has a large effect on the outcome of the simulation. So while the change is minimal and perhaps not the most readable way to introduce this offset, the change I made does not introduce a bug. > Well, I certainly got that wrong. I assumed without evidence that you were one of those who bridles at the thought of someone criticizing psychology. No, I even think the problem is more widespread than psychology alone (though in psychology it is particularly severe), having seen first hand and heard second hand how science is conducted in other areas (especially those close to psychology).