Instructions

Create an R Markdown notebook that illustrates the following features of the Markdown format.

For a detailed discussion of R Markdown formatting see the R Markdown Manual. For a quick overview, see the R Markdown Cheatsheet.

When completed, submit your R Markdown notebook (the file with the extension .Rmd) and the knitted HTML output (with file extension .html) via Sakai. Make sure your files include your name and NetID.

Features of R Markdown to include:

  1. Includes a title and author (your name and NetID)

  2. Has first, second, and third level headers

  3. Includes a un-ordered list with at least two levels

  4. Includes an ordered (numbered) list with at least two levels

  5. Includes emphasized (italic), bold, and verbatim (monospaced) text.

  6. Includes a hyperlink to a website.

  7. Includes a footnote1.

  8. Includes nicely formatted equations for the following statistics:

    • Mean: \[ \bar{x} = \frac{1}{n}\sum_{i=1}^{n}x_i \]

    • Variance: \[ s_x^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2 \]

    • Standard deviation: \[ s_x = \sqrt{s_x^2} \]

    • Covariance: \[ s_{x,y} = \frac{1}{n-1}\sum_{i=1}^{n}(x_i-\bar{x})(y_i-\bar{y}) \]

    • Correlation: \[ r_{x,y} = \frac{s_{x,y}}{s_x s_y} \]

  9. Includes a code block showing how to calculate the mean, variance, and standard deviation of the vector, \(\mathbf{x}=\{58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72\}\), using the R functions mean(), var(), and sd().

  10. Includes a code block showing how to calculate the covariance and correlation of the variable \(\mathbf{x}\) (defined previously) and the variable \(\mathbf{y}=\{115, 117, 120, 123, 126, 129, 132, 135, 139, 142, 146, 150, 154, 159, 164 \}\), using the R functions cov() and cor().


  1. Like this one!↩︎