In this exercise, you will generate your own data to investigate whether the mean or the median is the most appropriate measure to use. The MATLAB function randn(m,n)produces anm-by-n matrix of pseudo-random numbers with zero mean and standard deviation The numbers are sampled from a normal, or Gaussian, distribution. We will discuss the normal distribution in detail in Section 4.4.1, but for now the important information is that the distribution is symmetric with no outliers. Carry out the following investigation:
Now repeat the above, but after cubing (i.e. raising to the power of 3)the output from randn. Because we are only using a small sample size (30), this will have the effect of introducing a few outliers. Now see if the mean or median is a better measure to use?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here