% Data for Exercise 18.8, gasoline mileage 

% The vehicles are: Apollo, Omega, Nova, Monarch, Duster, Jenson, Skyhawk, Monza, Scirocco, Corolla SR-5, 
% Camaro, Datsun B210, Capri II, Pacer, Bobcat, Granada, Eldorado, Imperial, Nova LN, Valiant, 
% Starfire, Cordoba, Corolla E-5, Mark IV, Celica GT, Charger SE, Cougar, Elite, Matador, Corvette.

% mileage per gallon (miles/gallon)         
                   y = [18.9
                        17
                        20
                        18.25
                        20.07
                        11.2
                        22.12
                        21.47
                        34.7
                        30.4
                        16.5
                        36.5
                        21.5
                        19.7
                        20.3
                        17.8
                        14.39
                        14.89
                        17.8
                        16.41
                        23.54
                        21.47
                        31.9
                        13.27
                        23.9
                        19.73
                        13.9
                        13.27
                        13.77
                        16.5];
                  
% displacement (cubic inch)

                 x1 = [350
                       350
                       250
                       351
                       225
                       440
                       231
                       262
                        89.7
                        96.9
                       350
                        85.3
                       171
                       258
                       140
                       302
                       500
                       440
                       350
                       318
                       231
                       360
                        96.9
                       460
                       133.6
                       318
                       351
                       351
                       360
                       350];

% horse power (ft-lb)                   
                   
                 x2 = [165
                       170
                       105
                       143
                        95
                       215
                       110
                       110
                        70
                        75
                       155
                        80
                       109
                       110
                        83
                       129
                       190
                       215
                       155
                       145
                       110
                       180
                        75
                       223
                        96
                       140
                       148
                       148
                       195
                       165];

% overall length (inch)

               x3 = [200.3
                     199.6
                     196.7
                     199.9
                     194.1
                     184.5
                     179.3
                     179.3
                     155.7
                     165.2
                     195.4
                     160.6
                     170.4
                     171.5
                     168.8
                     199.9
                     224.1
                     231
                     196.7
                     197.6
                     179.3
                     214.2
                     165.2
                     228
                     171.5
                     215.3
                     215.5
                     216.1
                     209.3
                     185.2];

% weight (lb)                 
                 
              x4 = [3910
                    3860
                    3510
                    3890
                    3365
                    4215
                    3020
                    3180
                    1905
                    2320
                    3885
                    2009
                    2655
                    3375
                    2700
                    3890
                    5290
                    5185
                    3910
                    3660
                    3050
                    4250
                    2275
                    5430
                    2535
                    4370
                    4540
                    4715
                    4215
                    3660];

