title: Statistics : binomial distribution and simple graph in R
body: <p>I'm trying to make a simple graph for binomial distribution in R.</p>
  
  <p>So the question is "There are 20 patients, and what is the probability of operating on 4 patients successfully, (given that the probability = 0.8)."</p>
  
  <p>What I did is</p>
  
  <pre><code>x &lt;- rbinom(4, size= 20, prob = 0.8)
  y &lt;- pbinom(x, size = 20, prob = 0.8)
  plot(y, type="l")
  </code></pre>
  
  <p>But I'm not sure if this is the right way of graphing it..</p>