title: Creating a histogram from iterations of a binomial distribution in R
body: <p>Here are the instructions:
  Create 10,000 iterations (N = 10,000) of
  rbinom(50,1, 0.5) with n = 50 and your guess of p0 = 0.50 (hint: you will need to
  construct a for loop). Plot a histogram of the results of the sample. Then plot your
  pstar on the histogram. If  pstar is not in the extreme region of the histogram, you would
  assume your guess is correct and vice versa. Finally calculate the probability that
  p0 &lt; pstar (this is a p value).</p>
  
  <p>I know how to create the for loop and the rbinom function, but am unsure on how transfer this information to plotting on a histogram, in addition to plotting a custom point (my guess value).</p>