Thursday, March 26, 2015

Brownian Motion in Scratch

   Robert Brown (1827), an English botanist, observed that pollen grains sprinkled on the surface of water, when viewed under a microscope, moved in a random fashion. This was the first visual indication of the molecular structure of matter.
   Each pollen grain was being unequally bombarded by the water molecules in motion. This causes the pollen grains to 'random walk' on the surface of the water.

  The violet-colored circle is centered on the origin and the black dot on the circumference is the walker at the end of the 1000-step walk. The blue-colored circle is the distance from the origin the walk is expected to end on. This expected distance is computed from d = L√n where L is the average step length and n is the number of steps per walk. In this project, L = 3. The closer the circles, the closer the agreement between theory and experiment.
   The project can be viewed and downloaded by clicking on the link below the graphic.

https://scratch.mit.edu/projects/52984710/
   This project is the 2-dimensional version of my 1-dimensional project, Feynman's Random Walk, that can be viewed at https://scratch.mit.edu/projects/11282377/. 
   The Scratch blog post can be seen by clicking on this link.
   A free PDF document that describes Brownian Motion in more detail and explains the coding can be had by sending an email request to grandadscience@gmail.com.




Monday, March 9, 2015

Random Walk with Barriers


   A student is performing a random walk on the integer number line. Starting at any integer position > -20 and < 20, the student flips a coin. If it's heads, the student takes one step to the right, if tails, one step to the left, and flips again and again until one of the barriers is hit.
   Given any integer starting point between the two barriers, what is the probability of hitting the yellow barrier? Click on the video to see a sample run of the Scratch project where the walker starts at +15. The answer is P(yellow) = 7/8.

   The Scratch project can be viewed and downloaded by clicking on the following link.
http://scratch.mit.edu/projects/11300964/    
   I know of two simple proofs for the theoretical probability of the walker arriving at either barrier given the integer starting position of the walker. One uses an 'area' analysis and the other a tree diagram. You can obtain a free copy (PDF format) of either or both proofs by sending an e-mail request to grandadscience@gmail.com.
   A related Scratch project is my project Feynman's Random Walk
(at http://scratch.mit.edu/projects/11282377/)
 I coded Dr. Feynman's amazing result that if a random walker starts at zero and performs an n-step random walk, with equal probabilities for moving one step to the right or left, and with no barriers left or right, then the ‘average displacement’ from 0 of the walker is √(n).