Wednesday, May 4, 2011

Gaussian Distribution


This ones for you, Brando.


At the ARI Conference in DC I visited Camilo where we discussed  a science fair project he did where he derived a Gaussian distribution by dropping marbles down a grid network of evenly spaced nails among other things (I am terrible at estimating girls weights.  113.5 lbs, really?).

The symmetry of the problem is apparent, and then the model can be simplified by only worrying about the positive x values.

Symmetric Model



In the above model if you assume that the probability p of the marble going left or right it becomes possible to derive the probability that the marble will be a specific location.



A couple of things to notice:

  • A check for the symmetry condition can be completed by simply summing the probabilities over a j - they should equal 1/2.  (They do if you remember to divide the probability of i=0 nodes by 2, since they are halfway on the boundary)
  • The coefficients look familiar - Can you guess it?
  • It is simple to write a recursive expression for the probability of a given node: $$P(i,j)=[P(i-\frac{1}{3},j-1)+P(i+\frac{1}{2},j-1)]p$$  This can be expanded into a general function, as below:
  • function p = P(i,j)
    % Setting the intial probability
    p_init = 0.5;
    
    if( i < 0)
        i = abs(i);
    end
    
    % Base Case, ball is on the zero level (First Peg)
    if(j == 0 )
        if (i == 1/2)
            p = p_init;
        else
            p = 0;
        end
        %  Recursion bit
    else
        p = (P(i-1/2, j-1) + P(i+1/2,j-1))*p_init;
    end
    end
    
  • Hello dynamic programming!

How Realistic is the 50/50 probability assumption?
If we make the following assumptions;
  • that the collision is elastic (which is okay, since marbles and pegs are hard)
  • no mass is transfered from the marble to the peg and vice versa
  • the peg does not experience a change in momentum (always at rest)
than the conservation of momentum simplifies from $$m_{1,i}\mathbf{v}_{1,i} + m_{2,i}\mathbf{v}_{2,i} = m_{1,f}\mathbf{v}_{1,f} + m_{2,f}\mathbf{v}_{2,f}$$ to $$\mathbf{v}_{1,i} = \mathbf{v}_{1,f}$$.  From here we can see the components must balance out.  Ignoring the y component since we are only concerned with horizontal motion we see that if the ball is initially on the left of the peg than it should stay on the left, and if it is on the right, than it should stay on the right.  It the collision is head one (neither starting on the left or right), than it is a 50/50 probability.

More work to come later; right now I have a presentation to create!

    1 comment: