A company with a large fleet of cars wants to study the gasoline usage. They check the gasoline usage for 50 company trips chosen at random, finding a mean of 27.02 mpg and sample standard deviation is 5.83 mpg. d. Please use R to construct a (two-sided) 88% CI for the mean of the general gasoline usage. Then for this answer, provide the lower bound of the CI and round to 2 decimal places. Please do not use the automagic R function. Only use functions that we've covered in class (or else you won't get credit).

Respuesta :

Answer:

The 95% confidence interval is given by (25.71536 ;28.32464)

And if we need to round we can use the following excel code:

round(lower,2)

[1] 25.72

round(upper,2)

[1] 28.32

And the interval would be (25.72; 28.32)  

Step-by-step explanation:

Notation and definitions  

n=50 represent the sample size  

[tex]\bar X= 27.2[/tex] represent the sample mean  

[tex]s=5.83[/tex] represent the sample standard deviation  

m represent the margin of error  

Confidence =88% or 0.88

A confidence interval is "a range of values that’s likely to include a population value with a certain degree of confidence. It is often expressed a % whereby a population means lies between an upper and lower interval".  

The margin of error is the range of values below and above the sample statistic in a confidence interval.  

Normal distribution, is a "probability distribution that is symmetric about the mean, showing that data near the mean are more frequent in occurrence than data far from the mean".  

Calculate the critical value tc  

In order to find the critical value is important to mention that we don't know about the population standard deviation, so on this case we need to use the t distribution. Since our interval is at 88% of confidence, our significance level would be given by [tex]\alpha=1-0.88=0.12[/tex] and [tex]\alpha/2 =0.06[/tex]. The degrees of freedom are given by:  

[tex]df=n-1=50-1=49[/tex]  

We can find the critical values in R using the following formulas:  

qt(0.06,49)

[1] -1.582366

qt(1-0.06,49)

[1] 1.582366

The critical value [tex]tc=\pm 1.582366[/tex]  

Calculate the margin of error (m)  

The margin of error for the sample mean is given by this formula:  

[tex]m=t_c \frac{s}{\sqrt{n}}[/tex]  

[tex]m=1.582366 \frac{5.83}{\sqrt{50}}=14.613[/tex]  

With R we can do this:

m=1.582366*(5.83/sqrt(50))

m

[1] 1.304639

Calculate the confidence interval  

The interval for the mean is given by this formula:  

[tex]\bar X \pm t_{c} \frac{s}{\sqrt{n}}[/tex]  

And calculating the limits we got:  

[tex]27.02 - 1.582366 \frac{5.83}{\sqrt{50}}=25.715[/tex]  

[tex]27.02 + 1.582366 \frac{5.83}{\sqrt{50}}=28.325[/tex]

Using R the code is:

lower=27.02-m;lower

[1] 25.71536

upper=27.02+m;upper

[1] 28.32464

The 95% confidence interval is given by (25.71536 ;28.32464)  

And if we need to round we can use the following excel code:

round(lower,2)

[1] 25.72

round(upper,2)

[1] 28.32

And the interval would be (25.72; 28.32)  

ACCESS MORE