Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
7 views

Assignment 2

The document analyzes car data to test several claims: that average distance traveled exceeds 100,000 km, that over half use petrol fuel, and that automatic cars cost more. It finds strong evidence to support the first two claims but fails to reject the null for the third.

Uploaded by

bonface mukuva
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Assignment 2

The document analyzes car data to test several claims: that average distance traveled exceeds 100,000 km, that over half use petrol fuel, and that automatic cars cost more. It finds strong evidence to support the first two claims but fails to reject the null for the third.

Uploaded by

bonface mukuva
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

1

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.

Claim 2: More than half of the cars use petrol fuel.

Null hypothesis: At most half of the cars use petrol fuel

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

2.1 Fuel type

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).

Table 1: Fuel type summary

  Count of Fuel Type


Diesel 89
Electric 3
Hybrid 10
Petrol 792
Grand Total 894
2.2 Transmission

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).

Table 2: Counts of the mode of transmission

Row Labels Count of Transmission


Automatic 699
Manual 195
Grand Total 894
2.3 Odometer

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).

Table 3: summary statistics for kilometers covered.

Odometer (Kilometres) - enter numbers only, no commas


Mean 129367.6801
Standard Error 2603.573831
Median 115898
Mode 82000
Standard Deviation 77846.42217
4

Sample Variance 6060065445


Kurtosis 13.9861613
Skewness 1.863851372
Range 953824
Minimum 26
Maximum 953850

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).

Table 4: summary statistics for the Price of cars

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

a. 95% Confidence interval for the average of car kilometers traveled

Average of the car kilometers traveled=129367.6801

Standard deviation=4956.059

Sample size=894 cars

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

[ C 1 ,C 2 ] =129367.6801± 1.963 4956.059 ( )


√ 894
[ C 1 ,C 2 ] =129367.6801 ± 325.38
At a 95% confidence interval, the true population mean of the kilometers covered by cars lies
between 1290442.30 and 129693.06 kilometers.

b. Testing a claim about a single population mean.

Step 1: stating hypothesis

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

Step 2: significance level used is 5%.

Step 3: test statistic

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

Step 5: Decision and conclusion

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.

c. Testing a claim about a single population proportion.

Step 1: Stating hypothesis

Null hypothesis: At most half of the cars use petrol fuel

Ho: P ≤ 0.5

Alternative hypothesis: More than half of the cars use petrol fuel

H 1: P>0.5

Step 2: significance level

The significance level used is 5%.

Step 3: Test statistic

792
^p=
894

792
−0 .5
894
Z= ¿=36 . 29
792
√ 894
∗¿102 /894 ¿/894

Step 4: P-value

p-value <0.0001

Step 5: decision and conclusion

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.

d. Comparing two populations means

Step 1: stating hypothesis

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 2: 5% Level of significance was used.

Step 3: test statistic

t-Test: Two-Sample Assuming Equal Variances


  Automatic Manual
Mean 10079.94 9640.835897
Variance 26834954 16361533.36
Observations 699 195
Pooled Variance 24557103
Hypothesized Mean Difference 0
Df 892
t Stat 1.094123
P(T<=t) one-tail 0.137098
t Critical one-tail 1.646564
P(T<=t) two-tail 0.274197
t Critical two-tail 1.962627  
T-Statistic= 1.094

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

difference in prices between manual and automatic cars.

You might also like