Question

3. Use R Studio: Include R Code A commuter records 20 commute times to gage her...

3. Use R Studio: Include R Code A commuter records 20 commute times to gage her median commute time. The data has a sample median of 24 and is summarized in this stem-and-leaf diagram: stem(commutes)

2 | 111233444444

2 | 55569

3 | 113

If the data is appropriate for t.test, use that to compute a 90% confidence interval for the median. Otherwise use wilcox.test (perhaps after a transform) to compute a confidence interval for the median.

Homework Answers

Answer #1

> x=c(21,21,21,22,23,23,24,24,24,24,24,24,25,25,25,26,29,31,31,33)
> #Checking for normality of the data
> qqnorm(x)
> qqline(x)
>
> #Since the data is not normal, we cannot perform the t test
>
> #Introducing some randomness in the data
> y=jitter(x)
>
> #Performing the Wilcoxon test
> wilcox.test(y)

Wilcoxon signed rank test

data: y
V = 210, p-value = 1.907e-06
alternative hypothesis: true location is not equal to 0

Know the answer?
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
Similar Questions
Using R Studio: Include R Code: The following data is from IQ tests for pairs of...
Using R Studio: Include R Code: The following data is from IQ tests for pairs of twins that were separated at birth. One twin was raised by the biological parents, the other by adoptive parents. Foster:     80, 88, 75, 113, 95, 82, 97, 94, 132, 108 Biological:            90, 91, 79, 97, 97, 82, 87, 94, 131, 115 Find a 90% confidence interval for the differences of mean. What do you assume about the data? In particular, are the two samples independent?
Using R Studio: (Include the R code) The following data is from IQ tests for pairs...
Using R Studio: (Include the R code) The following data is from IQ tests for pairs of twins that were separated at birth. One twin was raised by the biological parents, the other by adoptive parents. Foster:     80, 88, 75, 113, 95, 82, 97, 94, 132, 108 Biological:            90, 91, 79, 97, 97, 82, 87, 94, 131, 115 Find a 90% confidence interval for the differences of mean. What do you assume about the data? In particular, are the two samples independent?
Use the programming language R to code the following project.. * Make sure you turn in...
Use the programming language R to code the following project.. * Make sure you turn in your code and answers from each question. (not the raw data). 1. Generate 1000 random samples of size 40 from the normal distribution with mean µ = 3 and standard deviation σ = 2. Compute 95% the confidence interval of 1000 samples and find the rate of confidence interval contains the true mean. What did you learn from this simulation study? 2. For each...