Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab code 1. The Irwin-Hall distribution In this problem, you are guided to perform simulations of the Irwin-Hall distribution. The Irwin-Hall distribution is also known

image text in transcribed

Matlab code

1. The Irwin-Hall distribution In this problem, you are guided to perform simulations of the Irwin-Hall distribution. The Irwin-Hall distribution is also known as the uniform sum distribution. By its name, the Irwin-Hall distribution is the distribution generated by sum of identical uniform distributions. In addition, the Irwin-Hall distribution is a good example to demonstrate the central limit theorem, which will be covered in Chapter 8. Suppose that U,, U2, U3 ---U, are independent random variables, each with a continuous uniform distribution on the interval [0, 1] (i.e., the standard uniform distribution). Then, X.= EM U; follows the Irwin-Hall distribution of ordern, where n is a positive integer. The mean and variance of X, are and respectively. Obviously, for n=1, X, follows an uniform distribution. For n=2, X. follows a triangular distribution. When n is large, X. can be used to approximate a normal distribution with mean and variance of and 1.(a) To perform a numerical simulation, please write a Matlab function that generates samples from a Irwin-Hall distribution. Please start with the standard uniform distribution and generate 10^6 random sample points (i.e., Output is a vector with 10^6 elements.). Then, repeat the process for n times and sum up those n vectors. The summation results in a vector of 10^6 elements, which is a sample of a Irwin-Hall distribution of order n with sample size of 10^6. Your function should have an input parameter n and output of a vector with 1046 elements. [Hint: The rand function is convenient to generate samples for the standard uniform distribution.) 1.(b) Now, please use the Matlab function in 1(a) to simulate X, when n=1, 2, and 20. Please plot relative frequency histogram of each output vector, which representing samples of X, when n=1, 2,20 (in three separate plots). Then, for each plot, plot a normal distribution with mean and standard deviation of the corresponding X. Overlay relative frequency histogram from a sample of X with a normal distribution. Please comment on the errors when using a Irwin- Hall distribution to approximate a normal distribution with different values of n. [Hint: Pease use histogram(Sample_of_Xn, 100,"Normalization', 'pdf) so that 1 histograms are normalized to values of probability density function for ease of comparison with a normal distribution.]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

JDBC Database Programming With J2ee

Authors: Art Taylor

1st Edition

0130453234, 978-0130453235

More Books

Students also viewed these Databases questions

Question

What are negative messages? (Objective 1)

Answered: 1 week ago