Self-Check Questions (ungraded)

Random sampling from distributions

Aidong Adam Ding
Made using Slidify in R. (Click mouse then right arrow key for next slide.)

Generate random samples from a distribution

Write the R command that sample 500 values randomly form the Chi-square distribution with 7 degrees of freedom, and store in variable y.

Submit and Compare Clear

Generate random samples from a distribution

Write the R command that sample 30 values randomly form the t-distribution with 1 degrees of freedom.

Submit and Compare Clear

Generate random samples from a distribution

Write a the R script that does the following three tasks:

(1) Randomly sample 60 values form the normal distribution with mean=1 and variance=5, and store to x.

(2) Draws the histogram of these 60 values.

(3) Add the normal density curve, of mean=1 and variance=5, to the histogram.

Submit and Compare Clear