title: A question about the realization and randomness
body: <p>I am doing an assignment for my data class and new to R programming. If a fair 6-sided die is rolled, Let X be the number showing on the top of the die. (The first question is involved the R programming)</p>
  
  <ol>
  <li><p>Generate 5 realizations from the distribution of X. Show the sample you generated and the sample mean, sample variance, and sample deviation</p></li>
  <li><p>What is the expectation and the variance of the sample mean in first question?</p></li>
  </ol>
  
  <p>I have written the code for the first assignment which I am confident that I am right:</p>
  
  <pre><code>S_R &lt;- sample (1:6, 5, replace=TRUE)
  
  print(S_R)
  
  mean(S_R)
  
  Var(S_R)
  </code></pre>
  
  <p>but <strong>I have one problem in the second question</strong> is that  Every time when I concluded and knit to PDF, it is going to run as random so that the value will change no matter what. This is kinda hard for me to compute the expectation and variance of sample mean.</p>