Descriptive Statistics

When looking at the numerical variables rnd_adj_fe (MPG), rated_horsepower (HP), and equivalent_test_weight_lbs (Weight) means across vehicle types and transmission types differed based on several factors. One of the main factors that could lead to varied results is sample size per groups. For example looking at Automated Manual - Selectable for Car it gave a mean MPG as 32.64 with a sample of 39. When comparing it to Trucks for the same transmission type MPG was slightly higher at 37.95 MPG with a sample size of 13. Previous analysis showed us that Trucks tend to be less fuel efficient than Cars but perhaps Automated Manual - Selectable could lead to trucks being more fuel efficient.

When looking at Semi-Automatic vehicles and comparing Cars to Trucks with a large sample size we can see in this instance Cars get better MPG on average. Cars had 31.65 MPG on average while Trucks had 27.16 MPG with sample sizes of 61 and 93 respectively. These large sample sizes would tell us the samples for transmission and vehicle type would represent a normal distribution allowing for a more likely estimate towards the population mean.

Another comparison between Trucks and Cars could be seen for Automatic transmission type with sample sizes of 69 and 32 respectively. There was a fairly large difference in weight between the two vehicles with Cars having a weight of 4335.94lbs and Trucks average weight being 5184.78lbs. A surprise in this comparison is even though sample sizes were above 30 HP was greater for Automatic Cars 330.5 compared to Trucks 317.74. This could be due to outliers in Automatic Cars in the data set that have a significantly higher HP than Automatic Trucks do.

## vehicle_type: Both
## tested_transmission_type: Automated Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n               2.0000                     2.0000    2.00000
## mean          406.0000                  4750.0000   30.35000
## stdev         261.6295                   707.1068   17.04127
## min           221.0000                  4250.0000   18.30000
## max           591.0000                  5250.0000   42.40000
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Automated Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              12.0000                    12.0000    12.0000
## mean          629.4167                  4145.8333    24.2500
## stdev         220.7291                   340.5933    10.3319
## min           221.0000                  3750.0000    14.4000
## max           823.0000                  5000.0000    52.1000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Automated Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n                    1                          1        1.0
## mean               500                       5500       14.7
## stdev               NA                         NA         NA
## min                500                       5500       14.7
## max                500                       5500       14.7
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Automated Manual- Selectable (e.g. Automated Manual with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              8.00000                     8.0000    8.00000
## mean         232.87500                  4140.6250   33.58750
## stdev         31.94834                   397.7476    9.58249
## min          189.00000                  3500.0000   23.30000
## max          261.00000                  4500.0000   51.30000
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Automated Manual- Selectable (e.g. Automated Manual with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              39.0000                    39.0000   39.00000
## mean          366.5385                  4384.6154   32.64359
## stdev         242.9766                   822.3765   10.73668
## min           104.0000                  3250.0000   15.10000
## max          1500.0000                  6000.0000   68.20000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Automated Manual- Selectable (e.g. Automated Manual with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              13.0000                    13.0000  13.000000
## mean          244.8462                  4471.1538  37.953846
## stdev          83.2855                   346.6876   7.256907
## min           177.0000                  3875.0000  27.300000
## max           434.0000                  5000.0000  48.500000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              26.0000                    26.0000   26.00000
## mean          345.3846                  4490.3846   32.16923
## stdev         135.9597                   530.2394   10.71742
## min           202.0000                  3750.0000   16.60000
## max           707.0000                  5500.0000   50.40000
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              78.0000                    78.0000   78.00000
## mean          370.4744                  4772.4359   68.58718
## stdev         142.6993                   709.0394   50.05035
## min            37.0000                  3500.0000   17.10000
## max           693.0000                  6000.0000  185.30000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              87.0000                    87.0000   87.00000
## mean          318.4943                  5247.1264   49.75862
## stdev         118.6153                   840.2521   43.65365
## min            98.0000                  3625.0000   14.90000
## max           657.0000                  6500.0000  169.00000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Continuously Variable
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n                    1                          1        1.0
## mean               176                       4000       49.1
## stdev               NA                         NA         NA
## min                176                       4000       49.1
## max                176                       4000       49.1
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Continuously Variable
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n             27.00000                    27.0000   27.00000
## mean         167.25926                  3629.6296   52.20000
## stdev         52.32119                   586.7953   25.93938
## min           78.00000                  2500.0000   24.30000
## max          295.00000                  5500.0000  149.80000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Continuously Variable
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n             12.00000                    12.0000  12.000000
## mean         173.83333                  4562.5000  41.733333
## stdev         19.58586                   371.1928   9.207441
## min          137.00000                  4000.0000  31.000000
## max          189.00000                  5000.0000  55.100000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n                    1                          1        1.0
## mean               228                       3625       27.6
## stdev               NA                         NA         NA
## min                228                       3625       27.6
## max                228                       3625       27.6
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              19.0000                     19.000   19.00000
## mean          241.7368                   3407.895   37.65789
## stdev         134.2282                    372.310   11.79333
## min           134.0000                   3000.000   15.30000
## max           668.0000                   4500.000   56.30000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Manual
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n             2.000000                     2.0000    2.00000
## mean        281.500000                  4875.0000   24.05000
## stdev         4.949747                   176.7767    5.16188
## min         278.000000                  4750.0000   20.40000
## max         285.000000                  5000.0000   27.70000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Other
## NULL
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Other
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              19.0000                    19.0000   19.00000
## mean          436.5263                  5006.5789  106.18421
## stdev         237.2976                   437.9436   48.92172
## min           147.0000                  3875.0000   25.60000
## max           925.0000                  5500.0000  149.90000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Other
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              9.00000                     9.0000   9.000000
## mean         392.22222                  5944.4444 110.677778
## stdev         62.77893                   747.6816   9.678556
## min          295.00000                  5250.0000  98.700000
## max          496.00000                  7000.0000 127.700000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Selectable Continuously Variable (e.g. CVT with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              8.00000                     8.0000   8.000000
## mean         197.75000                  3843.7500  37.025000
## stdev         39.79142                   256.6091   7.755689
## min          152.00000                  3500.0000  27.200000
## max          260.00000                  4250.0000  48.400000
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Selectable Continuously Variable (e.g. CVT with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n             14.00000                    14.0000  14.000000
## mean         214.64286                  3776.7857  37.778571
## stdev         64.28615                   537.4856   9.419144
## min          120.00000                  3000.0000  25.600000
## max          300.00000                  4500.0000  57.800000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Selectable Continuously Variable (e.g. CVT with paddles)
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n             25.00000                    25.0000   25.00000
## mean         202.60000                  3990.0000   39.47200
## stdev         44.38187                   366.0743   10.07375
## min          147.00000                  3250.0000   23.70000
## max          268.00000                  5000.0000   56.40000
## ------------------------------------------------------------ 
## vehicle_type: Both
## tested_transmission_type: Semi-Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              78.0000                    78.0000  78.000000
## mean          337.6538                  4599.3590  32.785897
## stdev         130.9803                   530.8498   8.855517
## min           164.0000                  3750.0000  13.400000
## max           617.0000                  6000.0000  49.400000
## ------------------------------------------------------------ 
## vehicle_type: Car
## tested_transmission_type: Semi-Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n               61.000                    61.0000  61.000000
## mean           407.623                  4336.0656  31.649180
## stdev          197.557                   662.0443   9.744958
## min            134.000                  3250.0000  10.600000
## max           1500.000                  6500.0000  59.800000
## ------------------------------------------------------------ 
## vehicle_type: Truck
## tested_transmission_type: Semi-Automatic
##       rated_horsepower equivalent_test_weight_lbs rnd_adj_fe
## n              93.0000                    93.0000  93.000000
## mean          353.1290                  5190.8602  27.156989
## stdev         102.9612                   668.9928   6.903471
## min           188.0000                  4000.0000  12.500000
## max           700.0000                  7000.0000  42.700000

Confidence Intervals for Mean Adjusted Fuel Economy

I calculated the confidence interval at 90%, 95%, and 99% confidence levels for the mean fuel economy of Automatic Vehicle in the data set. The results for each confidence interval are displayed below. It can be seen as the confidence level gets higher the range of where the population mean ending up in the range gets larger. The 90% confidence interval was 50<=mu<=60 comparing this to the 99% confidence interval it can be seen it gets wider moving to 47<=mu<=64. To form this confidence interval we used a t-test as the population standard deviation was unknown the sample size was greater than 30 representing a normal distribution. As the degree of freedom get larger with sample size the t-distribution more closely represents a normal distribution. In turn as the confidence interval gets larger so does the t-value creating a wider range. Of these options I would select a 95% confidence interval allowing for a combination of accuracy and confidence in our mean following within the interval.

## [1] "The 90% confidence interval for the mean adjusted fuel economy (RND_ADJ_FE) of automatic vehicles is: 50 <= mu <= 60 ."
## [1] "The 95% confidence interval for the mean adjusted fuel economy (RND_ADJ_FE) of automatic vehicles is: 49 <= mu <= 62 ."
## [1] "The 99% confidence interval for the mean adjusted fuel economy (RND_ADJ_FE) of automatic vehicles is: 47 <= mu <= 64 ."

Various Confidence Intervals

## [1] "The 95% confidence interval of mean adjusted fuel economy of manual vehicles is: 31 <= mu <= 41 ."
## [1] "The 90% confidence interval for the mean horsepower of cars is: 337 <= mu <= 377 ."
## [1] "The 95% confidence interval for the mean horsepower of cars is: 333 <= mu <= 381 ."
## [1] "The 99% confidence interval for the mean horsepower of cars is: 325 <= mu <= 389 ."
## [1] "The 90% confidence interval for the mean horsepower of trucks is: 300 <= mu <= 324 ."
## [1] "The 95% confidence interval for the mean horsepower of trucks is: 297 <= mu <= 326 ."
## [1] "The 99% confidence interval for the mean horsepower of trucks is: 293 <= mu <= 331 ."

Work Cited

Kabacoff, R. I. (2015). R in Action (2nd ed.). Manning Publications.

Bluman, A. G. (2018). Elementary statistics: A step by step approach (10th ed.). McGraw Hill.