Question: In this question, you will explore a new distribution called the uniform distribution and use R to conduct a simulation that demonstrates how the CLT

In this question, you will explore a new distribution called the uniform distribution and use R to conduct a simulation that demonstrates how the CLT works. A uniform random variable is a continuous random variable which PDF looks like a rectangle. It has two parameters: 1) a which specifies the minimum value of the random variable, and 2) b which specifics the maximum value of the random variable. We usually denote a uniform random variable X as X Uniformpa, bq. In R, the runif() function can be used to generate data from the uniform distribution. In runif(), the default values for parameters a and b are 0 and 1. Read the help page for runif() and perform the following:

(a) Generate 1000 data points from Uniformp0, 1q. Attach your code.

(b) Use hist() function to draw a histogram of the 1000 data points you generated in part (a). Describe the shape of the histogram in words. Attach the code and the histogram.

(c) Now we will use demonstrate how the CLT works. Generate 30 data points from Uniformp0, 1q. Attach the code.

(d) Draw a histogram of the 30 data points. Describe the shape of the histogram in words. Attach the code and the histogram.

(e) Compute the sample mean of the 30 data points. What is the value of the sample mean? Attach code.

(f) Use the replicate() function to repeat parts (c) and (e) 1000 times. Now you should have 1000 sample means. Attach your code. (Note: we did not talk about the replicate() function. You need to read the help page for this function in order to figure out how to use it.)

(g) Draw a histogram of the 1000 sample means. Attach the code and the histogram.

(h) Does the histogram in part (g) look normal? Why?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!