Question

Question 2. Note that the following problem is similar to scenario E in the previous question....

Question 2. Note that the following problem is similar to scenario E in the previous question. However, it is not exactly the same. Computers in some vehicles calculate various quantities related to performance. One of these is the fuel efficiency. For one vehicle equipped in this way, the number of ‘liters per 100 kilometers’ driven were recorded each time the gas tank was filled, and the computer was then reset. Below are the ‘liters per 100 kilometers’ driven for a random sample of 20 of these records. 5.7, 4.6, 6.4, 6.3, 6.9, 5.2, 4.9, 5.4, 4.9, 5.6, 5.4, 5.3, 4.9, 5.1, 5.0, 6.0, 6.3, 5.4, 5.3, 5.4. Calculate a 95% confidence interval for the average liters per 100 kilometres for this vehicle. Use RStudio or R on Jupyter in order to solve this problem. Provide all your work with your solutions. Is the CI you obtained valid? In order to answer this question, • List all assumptions required. • For each assumption, indicate whether it holds and why it does or does not. • When appropriate, provide graphical displays in order to assess a particular assumption. • Explain how based on such graphs, you decided whether the corresponding assumption seems to hold or not.

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

R code:

X=c(5.7, 4.6, 6.4, 6.3, 6.9, 5.2, 4.9, 5.4, 4.9, 5.6, 5.4, 5.3, 4.9, 5.1, 5.0, 6.0, 6.3, 5.4, 5.3, 5.4)
t.test(X,conf.level = 0.95)

Output:

One Sample t-test

data: X
t = 40.935, df = 19, p-value < 2.2e-16
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
5.218781 5.781219
sample estimates:
mean of x
5.5

Assumption:

The data are come from normal distribution.

To check this assumption, we draw QQ plot (or quantile-quantile plot) which shows the correlation between a given sample and the normal distribution. A 45-degree reference line is also plotted. QQ plots are used to visually check the normality of the data.

R code:

X=c(5.7, 4.6, 6.4, 6.3, 6.9, 5.2, 4.9, 5.4, 4.9, 5.6, 5.4, 5.3, 4.9, 5.1, 5.0, 6.0, 6.3, 5.4, 5.3, 5.4)
qqnorm(X,lwd=2,col=1)
qqline(X,lwd=2,col=2)

Normal Q-Q Plot 每 4) 0 2 1 0 2 Theoretical Quantiles

Most of the points are closed to the reference line so normality assumption is valid. This can also be checked via some statistical tests.

R code:

X=c(5.7, 4.6, 6.4, 6.3, 6.9, 5.2, 4.9, 5.4, 4.9, 5.6, 5.4, 5.3, 4.9, 5.1, 5.0, 6.0, 6.3, 5.4, 5.3, 5.4)
ks.test(X, "pnorm", mean=mean(X), sd=sd(X))

Output:

One-sample Kolmogorov-Smirnov test

data: X
D = 0.21609, p-value = 0.3078
alternative hypothesis: two-sided

Warning message:
In ks.test(X, "pnorm", mean = mean(X), sd = sd(X)) :
ties should not be present for the Kolmogorov-Smirnov test

Since p nalue>0.05 so normality assumption is valid.

Add a comment
Know the answer?
Add Answer to:
Question 2. Note that the following problem is similar to scenario E in the previous question....
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
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
ADVERTISEMENT