[R] Simulation with R

Ethan Johnsons ethan.johnsons at gmail.com
Sat Dec 9 07:39:37 CET 2006


An apparatus exists whereby a collection of balls is displaced to the
top of a stack by suction. A top level (Level 1) each ball is shifted
1 unit to the left or 1 unit to the right at random with equal
probability. The ball then drops down to level 2. At Level 2, each
ball is again shifted 1 unit to the left or 1 unit to the right at
random. The process continues for 15 levels and the balls are
collected at the bottom for a short time until being collected by
suction to the top.

Can we do a simulation of the process using R with 100 balls, and plot
the frequency distribution of the position of the balls at the bottom
with respect to the entry position?

thx in advance

ej




More information about the R-help mailing list