Assignment 2
Assignment 2
Assignment 2
University:
Course:
Date:
2
Introduction
This study used car data to calculate a confidence interval for an average of the number
of cars traveled. It also investigated the claims that cars in the country had traveled on average
more than 100000 kilometers. The data established whether most cars use petrol fuel. Finally, the
reports show whether there is a significant difference in Price between manual and automatic
cars.
Hypothesis
Claim 1: Average distance traveled by cars in the United States is over 100000 kilometers
Null hypothesis: Average distance traveled by cars in the United States is at most 100000
kilometers
Ho: μ ≤ 100000
Alternative hypothesis: Average distance traveled by cars in the United States is not 100000
kilometers.
H 1: μ>100000
This hypothesis is tested using a single population mean test. From the observations, it can be
seen that the majority of cars have traveled over 100000 km. I have chosen this test since most of
the cars in the dataset have an odometer reading of over 100000 km.
Ho: P ≤ 0.5
Alternative hypothesis: More than half of the cars use petrol fuel
H 1: P>0.5
Claim 3: On average automatic cars are more expensive than manual cars.
Null hypothesis: On average automatic cars are not more expensive than manual cars.
Ho: μ 1 ≤ μ 2
3
Alternative hypothesis: On average automatic cars are more expensive than manual cars.
Ho: μ 1> μ 2
Variables
The fuel type variable describes the type of fuel used by the car. Seven hundred and ninety-two
cars used petrol fuel, diesel (n=83), hybrid (n=10), and electric (n=3).
The mode of transmission was categorized as either automatic or manual. Out of 894 cars used
in the study, 699 were automatic, while 195 were manual(see table 2 below).
The odometer variable measured the number of kilometers the car had traveled. The average
distance traveled by the cars sampled was 129367.68 (SD=77846.42). The median distance
traveled was 115898 km. The mode was 82000 kilometers. The car with the lowest mileage had
26 kilometers of distance traveled, while the one that covered the longest distance had 953824
kilometers (see table 3 below).
2.4 Price
The price variable describes the Price vendor. The car had an average cost of $ 9984.16
(SD=4956.059). The Median Price of the vehicle was $ 9989, and the mode was $9000. The
most expensive car was estimated to be $ 54000, while the least expensive vehicle valued at
$1390 (see table 4 below).
Price
Mean 9984.162
Standard Error 165.7554
Median 9989
Mode 9000
Standard Deviation 4956.059
Sample Variance 24562523
Kurtosis 20.06696
Skewness 2.879297
Range 52610
Minimum 1390
Maximum 54000
Results
Standard deviation=4956.059
Degrees of freedom=894-1=893
Since population standard deviation is unknown and sample size is greater than 30, we use t-test
as our test statistic.
5
Confidence interval
[ C 1 ,C 2 ] =x́ ± t α
2
, df ( √sn )
t α =t 0.025,893 =1.963
, df
2
Null hypothesis: Average distance traveled by cars in the United States is at most 100000
kilometers
Ho: μ ≤ 100000
Alternative hypothesis: Average distance traveled by cars in the United States is more than
100000 kilometers.
H 1: μ>100000
129367.6801−100000
t−statistic=
4956.059
√ 894
29367.6801
t−statistic=
4956.059
√ 894
t−statistic=177.175
Step 4: P-value
P-value <0.0001
6
Reject null hypothesis since p-value <0.0001 is more minor than significant level. And conclude
that the average distance traveled by cars in the United States is more than 100000 kilometers.
Ho: P ≤ 0.5
Alternative hypothesis: More than half of the cars use petrol fuel
H 1: P>0.5
792
^p=
894
792
−0 .5
894
Z= ¿=36 . 29
792
√ 894
∗¿102 /894 ¿/894
Step 4: P-value
p-value <0.0001
Reject the null hypothesis since the p-value is less than 0.05 and conclude that More than half of
the cars use petrol fuel.
Null hypothesis: On average automatic cars are not more expensive than manual cars.
7
Ho: μ 1 ≤ μ 2
Alternative hypothesis: On average automatic cars are more expensive than manual cars.
Ho: μ 1> μ 2
Step 4: p-value
P-value=0.137
Step 5: Do not reject the null hypothesis since p-value =0.137 is more significant than 0.05.
Hence we conclude that, on average automatic cars are not more expensive than manual cars.
Conclusion
In conclusion, the study found that at a 95% confidence interval, the true population
mean of the kilometers covered by cars lies between 1290442.30 and 129693.06 kilometers. The
study found that more than half of the vehicles used petrol fuel. Again, the average distance
traveled by cars in the United States is more than 100000 kilometers. Finally, there was no