Question

Part I: qqplots. This part deals with qaplots of al inds. Lets do some easy experiments, first. Lets take a sample from a normal distribution with mu-2, sigma -3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size # Sample from N(mu-2, sigma-3) # Looks normal. But that depends on breaks. x morm(n,2.3) hist(x) qqnorm(x) # This doesnt depend on binsize, and it looks linear. abline(2,3, col-2) What you just got is a qaplot based on a sample, i.e. its essentially a random variabe. To get a sense of how much a q run the whole block of code several times but EXcluding the set.seedO line. Remember that all of these qgplots are from a distribution/population that is truly normal, i., hat the population qqplot would look linear. So, now you get a sense of how m variability to allow for when you look at qaplots in the future Also, recall that the intercept and slope of the qaplot are estimates of the mu and sigma of that normal distribution. To intercept and the slope, its convenient to draw a line on the qqplot. But you want to make sure to focus mostly on the linear portion of the qqplot and mostly ignore the end points. For the set.seed(3) sample, I decided that a line with (intercept, slope) (2,3) is good enough, and so my estimate ofmu and sigma would be 2 and 3, respectively. This being a simulation, we already know that mu-2, eye-ball the sigma 3, and so everything is consistent. Now, lets see what qqplots look like if the population is not normal at all. To that end, a) Write code to take a sample of size 1000 from Exp(lambda1), and make a histogram and a qqplot of the sample. IMPORTANT: use set.seed(3). You will see that the qqplot is not straight at all. In fact, we could have anticipated that it would not be straight by just thinking about three special quantiles: the Oth, the 0.5th and the Ist. b) What are those special quantiles for the standard normal distribution? c) What are those special quantiles for the exponential distribution? Hint: the median of Exp(lambda) is In(2)/lambda.

Please use R

0 0
Add a comment Improve this question Transcribed image text
Answer #1

set.seed(3)
n=1000
x=rexp(n,1)
hist(x)
qqnorm(x)
abline(1,1,col=2)

From histogram we can observe that distribution is positively skewedxeWwwBUBbCHMCr8lIks9UPMZsqt1wMoXcOKA9hDu

From below qq-plot we can see line is not straight , hence it is not normal distribution

1pspY9fNNvzAAAAAElFTkSuQmCC

Add a comment
Know the answer?
Add Answer to:
Please use R Part I: qqplots. This part deals with qaplots of al inds. Let's do...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Solve d,e and f please using R code Part I: qqplots This part deals with qqplots...

    Solve d,e and f please using R code Part I: qqplots This part deals with qqplots of all kinds. Let's do some easy expe riments, first. Let's take a sample from a normal distribution with mu-2, sigma 3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size x norm(n,2,3) # Sample from N(mu-2, sigma-3) hist(x) # Looks normal. But that depends on breaks. qqnorm(x) # This doesn't depend on binsize, and...

  • what code in R should I use if I want to achieve 10 different outputs with the same n. n= a number that doesnt satisfies the CLT my distributions are pois(0.8) and t(2) the one I used is below but...

    what code in R should I use if I want to achieve 10 different outputs with the same n. n= a number that doesnt satisfies the CLT my distributions are pois(0.8) and t(2) the one I used is below but I don’t think it’s right if anyone can help me please resolve this code so I can do the same thing with 10 different values of n. and of that n I need to know the mean, the min, max,...

  • Exercise 2. Use R script please Advanced Math use R studio I would like to see...

    Exercise 2. Use R script please Advanced Math use R studio I would like to see a very well documented pdf file with your comments on the steps, and the complete information on your generated sample. Thank you! NOTE for R users: Please export your generated sample as a .csv file (or Rdata file if you prefer). You can find some useful info here. Exercise 2 (20pt). Generate a random sample of size 25 from a normal distribution with mean...

  • I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of...

    I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of your answer. Thank you W 8.1.15 = 71 and o = 27. Suppose a simple random sample of size n-81 is obtained from a population with (a) Describe the sampling distribution of x. (b) What is P (x > 75.2)? (c) What is P (xs 63.5) ? (d) What is P (67.55 < x < 77.15) ? Click here to view the standard normal...

  • I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of...

    I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of your answer. Thank you The reading speed of second grade students in a large city is approximately normal, with a mean of 92 words per minute (wpm) and a standard deviation of 10 wpm. Complete parts (a) through Click here to view the standard normal distribution table (page 1 Click here to view the standard normal distribution table lage 2). Interpret this probability. Select...

  • I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of...

    I need help. PLEASE DONT USE THE STANDARD NORMAL DISTRIBUTION TABLE. use normalcdf as part of your answer. Thank you X 8.1.21 Question Help The reading speed of second grade students in a large city is approximately normal, with a mean of 92 words per minute (wpm) and a standard deviation of 10 wpm. Complete parts (a) through 1) Click here to view the standard normal distribution table (page 11 Click here to view the standard normal distribution table (page...

  • from part 5-12 plz dont do 1-4 BUNUS Assignment! A Sample Data AnalySIS III Licer Please...

    from part 5-12 plz dont do 1-4 BUNUS Assignment! A Sample Data AnalySIS III Licer Please answer all of the following questions. Make sure you show all your work, providing snapshots from Excel as well as listing all formulas and relevant explanation, as needed. We are interested in exploring the relationship between the income of professors (measured in thousands of dollars) and the number of years they have been employed by the university. We collect the following data from eight...

  • Use the following regression output from R studio and answer the following questions. 1. Comment on...

    Use the following regression output from R studio and answer the following questions. 1. Comment on the relation between the two test marks. A. There appears to be no  linear relation between the two test marks B. There appears to be strong negative linear relation between the two test marks. C. There appears to be weak positive linear relation between the two test marks. D. There appears to be strong positive  linear relation between the two test marks. 2. If the linear...

  • I only need help with part B. I need help with the sketch and all of B, not just the first part (like others have answer...

    I only need help with part B. I need help with the sketch and all of B, not just the first part (like others have answered previously.) THIS IS THE PART I REALLY NEED HELP WITH 1. [70 total points/ (the Exchange Paradox) You're playing the following game against an opponent, with a referee also taking part. The referee has two envelopes (numbered 1 and 2 for the sake of this problem, but when the game is played the envelopes...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT