Fish in Pond Problem
Estimate the number of fish in a pond
One way of estimating the number of fish in a pond is to catch some fish and mark them. Then put them back in the pond and give them a chance to swim around and mingle back in with the other fish.
Catch a new batch of fish. The number of marked fish in the sample will let us estimate the number of fish in the pond.
The ratio of marked fish in the sample should be the same as the number of marked fish in the pond to the total number of fish in the pond. The estimated number of fish in the pond is the number of fish that were marked originally times the number of fish in the sample divided by the number of marked fish in the sample.
Example: We capture and mark 100 fish, then put them back in the pond.
After a while, we capture 100 sample fish. 12 of the fish in the sample are marked. 100/12 is 8.333 (the ratio). If we multiple the ratio by 100 (the number of fish in the sample) we get about 833. We can estimate that there are about 833 fish in the pond.
Test your algorithm by walking through all of the steps on paper. Write down some sample numbers and do all of the calculations.
Now look at the algorithm.