Instructions Consider a set of Random numbers from the standard normal distribution in a vector-like X. X
Question:
Instructions
Consider a set of Random numbers from the standard normal distribution in a vector-like X.
X <- rnorm(50)
This code will produce a single sample of size of 50 random numbers from the standard normal distribution. For this assignment, need to be generating four histograms using R based on information provided in the following exercise. For each step, you will need to submit both the sample code and an output diagram. Provide screenshots of the sample codes and outputs for each step.
Step 1
Plot a histogram of 1000 random numbers from the standard normal distribution. (Keep breaks=50 and the Z Score=1.669)
Step 2
Now take 1000 samples of size 20 from the standard normal distribution at the same time. Use a matrix, where each row of X is a sample of size 20 from the standard normal distribution with 1000 rows.
Sample output for Step 1 and Step 2.Step 3
Repeat Step 1 with random numbers from an exponential distribution. (Take lambda=0.6)
Step 4
Repeat the steps in Step 2 with random numbers from an exponential distribution. (Take lambda=0.6)