using r foundation of probability homework

using r foundation of probability homework