View the step-by-step solution to:

Question

Question:question 5.PNG


I am trying to use the

Kolmogorov-Smirnov test in R to find the answer. However, I know that the given p-value is incorrect. Can you please show me where my error is in my code?Thank you


# we want to test the hypothesis that X is expodential 

X <- c(86,133,75,22,11,144,78,122,8,146,33,41,99) 


ks.test(X/50,pexp) #like exp but for distribution 


#Plot

X_sort <- sort(X) 

Y <- seq( (1/length(X)),1,(1/length(X))) 

q <- seq(-2,2,0.01) 

plot(q,pexp(q),type = "l", col = "red") 

points(X_sort,Y) 

question 5.PNG

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes