CE93 - Engineering Data Analysis Joan Walker, Spring 2011 Lab 6 02/23/2011 1.Generate uniformly distributed random number on the interval (0,1) with rand() a.Generate a vector of 10000 random numbers. b.Plot the CDF c.Find i.The mean of the numbers generated in a). ii.The mean of the square of the numbers generated in a). iii.The variance of the numbers generated in a) using the MATLAB variance function. Show that this equals the result of (ii) minus the square of the result of (i). 2.Recall the pipe leak location problem discussed in class, in which the probability density function increases linearly from the left end of the pipe to the right end of the pipe and is twice as high on the right end as the left end. Recall that the PDF and CDF are: a.Solve the CDF formula for . In other words, suppose ±²³ ´ µ ¶, what must xbe? Write the formula for xas a function of p, i.e. x(p). b.You can now use the random numbers from 1a) to generate random values of the leak
This is the end of the preview.
access the rest of the document.
Probability theory, Cumulative distribution function, CDF, Engineering Data Analysis, MATLAB variance function