# labaug26 - Lab 1 Using R Andrew J Womack 1 Estimating the...

This preview shows pages 1–2. Sign up to view the full content.

Lab 1: Using R Andrew J. Womack Aug 26, 2011 1 Estimating the Moments of a Mixture Distribution I have three measurement devices which you cannot distinguish. With equal probability, I will hand you a device and ask you to make a measurement. With device one, the measurements would follow a N (0 , 1) distribution. With device two, they would follow a T 4 distribution. With device 3 they would follow a Laplace distribution with scale 1. Devise a way to use random samples to produce a density plot of your possible measurements as well as estimating the standard deviation of the distribution. If you are feeling adventurous, you should also write a function that will generate random samples from the mixture distribution. 2 Function Writing and Sourcing Suppose that the random variable W is the sum of X and Y where X χ 2 3 and Y ∼ P (4). Write a function that will generate values of W . Make sure that the function has one input (number of desired samples) and outputs the appropriate number of samples.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern