What is the memory span of a goldfish honestly if you really know and how do scientists know?

Some people say that a goldfish has a memory span of 5 seconds. This is NOT TRUE! Goldfish are incredibly intelligent and have a memory span of three months and longer. Goldfish have been known to respond to light, sound and color, they can even recognise different people.

When a scientist wants to test the memory of a goldfish they usually pair some form of light, color, or sound signal with food and using positive reinforcement to create a desired bahavior (goldfish can do tricks like slalom and play fetch). When the behavior is learned the scientist quits making the fish do the trick. Then, after a certain amount of time (say two weeks or a few months) the scientist will use the stimulus and see if the fish remembers to do the trick in order to get the food. That is how the memory is tested.