In: Statistics and Probability
Show all work.
Computers in some vehicles calculate various quantities related to performance. One of these is fuel efficiency, or gas mileage, usually expresses as miles per gallon (mpg). For one vehicle equipped in this way, the miles per gallon were recorded each time the gas tank filled, and the computer was then reset. Here are the mpg values for a random sample of 20 of these records: 41.5 50.7 36.6 37.3 34.2 45.0 48.0 43.2 47.7 42.2 43.2 44.6 48.4 46.4 46.8 39.9 37.3 43.5 44.3 43.3 Find a 95% confidence interval for μ, the mean miles per gallon for this vehicle.
Solution-:
First we find sample mean () and sample standard deviation () by using R-software:
>
x=c(41.5,50.7,36.6,37.3,34.2,45.0,48.0,43.2,47.7,42.2,43.2,44.6,48.4,46.4,46.8,39.9,37.3,43.5,44.3,43.3);x
[1] 41.5 50.7 36.6 37.3 34.2 45.0 48.0 43.2 47.7 42.2 43.2 44.6
48.4 46.4 46.8
[16] 39.9 37.3 43.5 44.3 43.3
> n=length(x);n
[1] 20
> m=mean(x);m #sample mean
[1] 43.205
> v=var(x);v
[1] 19.22366
> s=sqrt(v);s #sample standard deviation
[1] 4.384479
> round(s,2)
[1] 4.38
R- Code:
x=c(41.5,50.7,36.6,37.3,34.2,45.0,48.0,43.2,47.7,42.2,43.2,44.6,48.4,46.4,46.8,39.9,37.3,43.5,44.3,43.3);x
n=length(x);n
m=mean(x);m #sample mean
v=var(x);v
s=sqrt(v);s #sample standard deviation
round(s,2)
Form above output we get and
We find 95 % C.I. are as follows;
(From t-table)
The required 95 % C.I. for is