INSTITUTE OF BUSINESS ADMINISTRATION
STATISTICAL INFERENCE
TERM PROJECT
INSTRUCTOR: DR. JAVED IQBAL
Muhammad Abdul Rafay -21563- (5140)
Muhammad Aneeq Uz Zaman Khan -22082- (5140)
Malik Muhammad Azam Ali Khan -21991- (5140)
Equal Contribution.
Signed by All.
ACKNOWLEDGEMENT
We would like to express our special thanks of gratitude to our
instructor Sir Javed Iqbal who gave us the golden opportunity to do this
project and helped us in completing it. This allowed us to use the
concepts learned during this course throughout the semester.
Contents
1. INTRODUCTION ...................................................................................................................... 2
2. COMPARISION OF DIFFERENT CAR BRANDS............................................................... 3
2.1 DESCRIPTIVE STATISTICS – Car Prices ......................................................................... 3
2.2 HISTOGRAMS – Car Prices ................................................................................................ 4
2.3 BOX AND WHISKER PLOT – Car Prices .......................................................................... 7
3. HYPOTHESIS TESTING ....................................................................................................... 8
3.1 ALTO VS MIRA ................................................................................................................... 8
3.2 ALTO VS MOVE ................................................................................................................. 8
3.3 ALTO VS MOCO ................................................................................................................. 9
3.4 ALTO VS DAYS ................................................................................................................ 10
4. ANOVA ................................................................................................................................. 11
5. MULTIPLE REGRESSION .................................................................................................. 12
6. CONCLUSION ..................................................................................................................... 16
7. REFERENCES ...................................................................................................................... 17
1|Page
1. INTRODUCTION
In the recent years, Pakistan’s automobile market has seen exponential growth. Newer models of
locally manufactured cars as well as reconditioned cars imported from abroad have entered the
market. Due to the introduction of so many cars, buyers now have a greater number of choices
they can choose from. The most important factor for consumers while buying a car is its price.
More importantly, due to the recent hike in car prices as well as an overall increase in the cost of
living because of inflation, people have become more price conscious. Therefore, in this term
project we compare the prices of five budget friendly car models, namely Suzuki Alto VXR,
Daihatsu Mira, Daihatsu Move, Nissan Moco and Nissan Days. Two of the car models (Alto and
Moco) are locally produced whereas the other three are imported from abroad.
To provide a fair comparison we have chosen car models with the same amount of engine
displacement, that is all five car models have a 660cc engine. We have chosen the statistics of 15
cars from each car model, bringing the total number of cars analyzed to 75. The data of all the cars
have been collected from the website [Link]. We have implemented the measures
and concepts that we have learned in our course and have provided analysis based on them.
Firstly, we have compared and analyzed their descriptive statistics based on car prices and
represented the data graphically using histograms and box and whisker plot. Secondly, we have
conducted hypothesis testing based on T-tests of four different groups, namely Alto vs Mira, Alto
vs Move, Alto vs Moco and Alto vs Days. Lastly, we have used multiple regression to study the
effect of three variables (age of the car, mileage of the car and local/imported status of the car) on
the price of the car before ending with a conclusion.
2|Page
2. COMPARISION OF DIFFERENT CAR BRANDS
2.1 DESCRIPTIVE STATISTICS – Car Prices
Alto VXR Mira Move Moco Days
Mean 15.7767 16.5567 16.7733 13.36 18.83
Median 15.7 17.5 15.15 13.8 18.5
Mode 15.7 - 20.8 12 17
Standard 0.64445 4.21362 3.94013 1.54425 2.75958
Deviation
Sample 0.41531 17.7546 15.5246 2.38471 7.61529
Variance
Skewness 0.27224 -0.55224 0.13334 -1.29943 0.00808
Standard Error 0.1664 1.08795 1.01734 0.39872 0.71252
Sum 236.65 248.35 251.6 200.4 282.45
Range 2.4 13.1 11 5.7 9.7
Minimum 14.6 8.65 11.5 9.3 13.75
Maximum 17 21.75 22.5 15 23.45
Count 15 15 15 15 15
Table 1: Descriptive Statistics
To compare the prices of the cars mentioned above in the table, descriptive statistical measures
such as mean, median, mode, standard deviation, sample variance, skewness, range etc. have been
used which have been derived using MS Excel.
The mean is a metric which shows us the average price of a single particular car over a given
condition at a particular period in time. The mean is an important measure because it illustrates an
average price of the car which would be available for sale in the free market for potential users.
Thus, this metric helps in the evaluation of a car. Over the 5 car types, Nissan Days has the highest
mean price of PKR 1.883 million as compared with Nissan Moco which has the lowest mean price
of PKR 1.336 million. The rest 3 car types, Daihatsu Mira, Suzuki Alto VXR and Daihatsu Move
have a mean price close to each other of PKR 1.65567 million, PKR 1.57767 million and PKR
1.67733 million respectively.
Median is another tool of descriptive statistics in analyzing the prices of the cars mentioned above.
Median is basically a middle number which draws a line between the data, dividing them equally
into 2 parts. That is half of the data is above the median value and other half is below it. In our
case, Median is the price at which half of the 15 cars taken of single particular car-type are of
greater price than the medium price, and the other half of the cars are of prices below the median
price. Once again, the highest median price of PKR 1.85 million is of Nissan Dayz and the lowest
median price of PKR 1.38 million is of Nissan Moco.
Moving Forward, Mode is a metric which shows the most repeated value in a date set. In our case,
it shows the most repeated price of a single car-type e.g., Mira, move etc. The mode shows the
common price of a particular car available in the market for sale. Nissan Days has a mode of PKR
1.7 million, Nissan Moco of PKR 1.2 million, Daihatsu Move of PKR 2.08 million and Suzuki
Alto of PKR 1.57 million. For Daihatsu Mira no particular mode could be derived.
3|Page
Furthermore, Skewness is another metric which tell us about the shape of the data as in a histogram
or any other graphical representation shape. Skewness tells us about the direction of the data from
left to right i.e., shows a symmetry. In the cars above, Nissan Days, Daihatsu Move and Suzuki
Alto VXR are nearly symmetric, however, Nissan Moco and Daihatsu Mira are extremely
negatively skewed.
Lastly, another important tool is the standard deviation. This basically shows by how much the
data deviates from the mean on average. How much spread the data is with conjunction to the
mean. A higher standard deviation means that data is more spread out and a low standard deviation
means the data is less spread and close to the mean. In our case, a low standard deviation implies
that the prices of a single car-type are closer to its mean price signifying that price of this particular
car-types have a little/less deviation with respect to changes in other variables such as milage and
age etc. than what any other car-types would have. Alto VXR has the lowest standard deviation
out of all the other 4 car-types. This is a good point for Alto VXR towards the seller as changes in
milage and age would not let the price to deviate greatly from the average price.
2.2 HISTOGRAMS – Car Prices
Figure 1: Alto VXR Histogram
4|Page
Figure 2 : Mira Histogram
Figure 3 : Move Histogram
5|Page
Figure 4 : Moco Histogram
Figure 5 : Days Histogram
Histograms basically show us the number of times(frequency) a particular x-value has occurred/is
present in the data. In our case as discussed throughout this report, histograms show the number
of car-types of each particular car falling in a particular price threshold. The y-axis shows us the
frequency, out of a total of 15 similar cars of each particular car-type. The x-axis shows us the
price of the cars, based on an interval of PKR 0.2 million for all cars except Suzuki Alto, to provide
a consistent and fair comparison. 2 out of 5 histograms of Nissan Moco and Daihatsu Mira depict
a negatively skewed distribution (Left Skewed) however, Nissan Days, Suzuki Alto VXR and
Daihatsu Move depict a potentially symmetric distribution of skewness.
6|Page
2.3 BOX AND WHISKER PLOT – Car Prices
Figure 6 : Box and Whisker Plot
The box and whisker plot are a graphical representation of groups of data into their quartiles. There
are 5 main components of a box and whisker plot. Maximum Value, Minimum value, Upper
Quartile (Q3), lower quartile (Q1) and the median (Q2). Further, it also shows the mean, outliers,
skewness, and the interquartile range (Q3) -(Q1). The minimum and maximum value of each car
is different. However, Daihatsu Mira has the lowest price of PKR 0.865 million and Nissan Days
has the highest price of PKR 2.345 million of all the car-types. A few outliers can be observed out
of all the car-types which depicts that are there are a handful of cars which price are extremely
high or low partially because of considerate differences in milage and age. The X mark in the box
represents that on average. Nissan Days has the highest price as compared with rest of the cars,
implying that Days is an in-demand priced car assuming price reflects markets willingness to buy.
The middle line represents the median value, which shows us that 25% of the cars of a particular
car-type have prices between the Q1 and the middle line and another 25% have between the middle
line and Q3. There is a slight mix of skewness in the 5 box plots, as Mira and Moco represents a
negatively skewed distribution whereas Alto, Move and Days represents a near symmetric
distribution. Lastly, a point to be noted is that Daihatsu Move has the largest inter quartile range
which shows us that prices in this middle half have a lot of variability than other cars with respect
to changes in factors such as milage, age etc. Note: Skewness between -0.5 and 0.5 is stated as
near symmetric distribution.
7|Page
3. HYPOTHESIS TESTING
To find out whether the mean price of Suzuki Alto is the same as the mean price of the other four
cars, we have conducted 4 tests in which the mean price of Suzuki Alto is compared with the mean
price of each of the other car one by one.
3.1 ALTO VS MIRA
Objective: To test whether the mean prices of Suzuki Alto and Daihatsu Mira are the same or not.
Hypothesis Testing:
µ1 = Mean price of Suzuki Alto
µ2 = Mean price of Daihatsu Mira
Ho: μ1 = μ2 (the mean price of Suzuki Alto is equal to the mean price of Daihatsu Mira)
H1: μ1 ≠ μ2 (the mean price of Suzuki Alto is not equal to mean price of Daihatsu Mira)
Note: We have conducted a pooled T-Test with unequal variances at 95% significance level. The
results obtained are illustrated as follows:
t-Test: Two-Sample Assuming Unequal Variances
Alto Mira
Mean 15.77667 16.55667
Variance 0.41531 17.7546
Observations 15 15
Hypothesized Mean Difference 0
Df 15
t Stat -0.7087
P(T<=t) one-tail 0.244689
t Critical one-tail 1.75305
P(T<=t) two-tail 0.489378
t Critical two-tail 2.13145
Table 2 : Alto Vs Mira t-Test
The t value derived is -0.7807 which is greater than the critical value of -2.13145 simplifying that
the t value falls in the acceptance range, so we do not reject H0. Moreover, the P value of 0.489378
is greater than the alpha of 0.05 which further supports that P value is in acceptance and H0 should
not be rejected. At 5% significance level we have sufficient evidence provided by the data to
conclude that mean prices of Suzuki Alto and Daihatsu Mira are equal to each other.
3.2 ALTO VS MOVE
Objective: To test whether the mean prices of Suzuki Alto and Daihatsu Move are the same or not.
Hypothesis Testing:
µ1 = Mean price of Suzuki Alto
µ2 = Mean price of Daihatsu Move
8|Page
Ho: μ1 = μ2 (the mean price of Suzuki Alto is equal to the mean price of Daihatsu Move)
H1: μ1 ≠ μ2 (the mean price of Suzuki Alto is not equal to mean price of Daihatsu Move)
Note: We have conducted a pooled T-Test with unequal variances at 95% significance level. The
results obtained are illustrated as follows:
t-Test: Two-Sample Assuming Unequal Variances
Alto Move
Mean 15.77667 16.77333
Variance 0.41531 15.5246
Observations 15 15
Hypothesized Mean Difference 0
Df 15
t Stat -0.96684
P(T<=t) one-tail 0.174479
t Critical one-tail 1.75305
P(T<=t) two-tail 0.348957
t Critical two-tail 2.13145
Table 3 : Alto Vs Move t-Test
The t value derived is -0.96684 which is greater than the critical value of -2.13145 simplifying that
the t value falls in the acceptance range, so we do not reject H0. Moreover, the P value of 0.348957
is greater than the alpha of 0.05 which further supports that P value is in acceptance and H0 should
not be rejected. At 5% significance level we have sufficient evidence provided by the data to
conclude that mean prices of Suzuki Alto and Daihatsu Move are equal to each other.
3.3 ALTO VS MOCO
Objective: To test whether the mean prices of Suzuki Alto and Nissan Moco are the same or not.
Hypothesis Testing:
µ1 = Mean price of Suzuki Alto
µ2 = Mean price of Nissan Moco
Ho: μ1 = μ2 (the mean price of Suzuki Alto is equal to the mean price of Nissan Moco)
H1: μ1 ≠ μ2 (the mean price of Suzuki Alto is not equal to mean price of Nissan Moco)
Note: We have conducted a pooled T-Test with unequal variances at 95% significance level. The
results obtained are illustrated as follows:
t-Test: Two-Sample Assuming Unequal Variances
Alto Moco
Mean 15.77667 13.36
Variance 0.41531 2.384714
Observations 15 15
Hypothesized Mean Difference 0
9|Page
df 19
t Stat 5.593473
P(T<=t) one-tail 1.07E-05
t Critical one-tail 1.729133
P(T<=t) two-tail 2.15E-05
t Critical two-tail 2.093024
Table 4 : Alto Vs Moco t-Test
The t value derived is 5.593473 which is greater than the critical value of 2.093024 simplifying
that the t value falls in the rejection range so we will reject Ho. Moreover, the P value of 2.15E-
05 is smaller than the alpha of 0.05 which further supports that P value is in rejection and H0
should be rejected. At 5% significance level we have sufficient evidence provided by the data to
conclude that mean prices of Suzuki Alto and Nissan Moco are not equal to each other.
3.4 ALTO VS DAYS
Objective: To test whether the mean prices of Suzuki Alto and Nissan Days are the same or not.
Hypothesis Testing:
µ1 = Mean price of Suzuki Alto
µ2 = Mean price of Nissan Days
Ho: μ1 = μ2 (the mean price of Suzuki Alto is equal to the mean price of Nissan Days)
H1: μ1 ≠ μ2 (the mean price of Suzuki Alto is not equal to mean price of Nissan Days)
Note: We have conducted a pooled T-Test with unequal variances at 95% significance level. The
results obtained are illustrated as follows:
t-Test: Two-Sample Assuming Unequal Variances
Alto Days
Mean 15.77667 18.83
Variance 0.41531 7.615286
Observations 15 15
Hypothesized Mean Difference 0
df 16
t Stat -4.17298
P(T<=t) one-tail 0.000359
t Critical one-tail 1.745884
P(T<=t) two-tail 0.000718
t Critical two-tail 2.119905
Table 5 : Alto Vs Days t-Test
The t value derived is -4.17298 which is smaller than the critical value of -2.119905 simplifying
that the t value falls in the rejection range so we will reject Ho. Moreover, the P value of 0.000718
is smaller than the alpha of 0.05 which further supports that P value is in rejection and H0 should
be rejected. At 5% significance level we have sufficient evidence provided by the data to conclude
that mean prices of Suzuki Alto and Nissan Days are not equal to each other.
10 | P a g e
4. ANOVA
The Analysis of Variance (ANOVA) Test is used to determine whether there are any statistically
significant differences between the means of two or more independent (unrelated) groups.
We are using the ANOVA Test to determine whether the variances of the top 5 car brands in the
660cc engine category are equal or not.
Anova: Single Factor
SUMMARY
Groups Count Sum Average Variance
Alto 15 236.65 15.77667 0.41531
Mira 15 248.35 16.55667 17.7546
Move 15 251.6 16.77333 15.5246
Moco 15 200.4 13.36 2.384714
Days 15 282.45 18.83 7.615286
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 234.0005 4 58.50012 6.69422 0.000127 2.502656
Within Groups 611.723 70 8.7389
Total 845.7235 74
Hypothesis Testing:
µ1: The average car price of Alto VXR.
µ2: The average car price of Mira.
µ3: The average car price of Move.
µ4: The average car price of Moco.
µ5: The average car price of Days.
H0: µ1= µ2= µ3= µ4= µ5 (The average car price of all car brands is the same).
H1: The average car price of at least two car brands is different.
Analysis:
The F calculated value for the given data is 6.69, whereas the F critical value is 2.50. The region
which comprises of values less than this F critical value is the acceptance region and the region
which comprises of values greater than this F critical value is the rejection region. Since the F
calculated value is greater than the F critical value that is 6.69 > 2.50, it falls in the rejection region.
Therefore, we reject the null hypothesis and conclude that at 5% significance level the average car
price of at least two car brands is different (at least two means are different).
11 | P a g e
5. MULTIPLE REGRESSION
In multiple regression there is one dependent variable y and more than one independent variable
x. The dependent variable in this is the car price whereas the independent variables are the age of
the car, mileage of the car and the local/imported status of the car. Hence, there are two quantitative
variables and on qualitative variable.
We define a dummy variable to the local/imported status of the car:
Imported = 0 and Local = 1
SUMMARY OUTPUT
Regression Statistics
Multiple R 0.846827
R Square 0.717116
Adjusted R
Square 0.705164
Standard
Error 1.835646
Observations 75
ANOVA
Significance
df SS MS F F
Regression 3 606.4822 202.1607 59.99555 1.97E-19
Residual 71 239.2413 3.369595
Total 74 845.7235
Standard Upper Lower Upper
Coefficients Error t Stat P-value Lower 95% 95% 95.0% 95.0%
Intercept 21.45708 0.453989 47.26342 2.13E-55 20.55185 22.36231 20.55185 22.36231
Age -0.72376 0.079215 -9.1366 1.31E-13 -0.88171 -0.56581 -0.88171 -0.56581
Mileage -0.00386 0.00678 -0.56988 0.57056 -0.01738 0.009655 -0.01738 0.009655
Local -3.46041 0.440362 -7.8581 3.06E-11 -4.33847 -2.58235 -4.33847 -2.58235
Estimated Equation:
Price = 21.457 – 0.7237 Age – 0.0038 Mileage – 3.4604 Local
Price (Rs. 100,000), Age (Years), Mileage (Thousands), Local (1), Imported (0)
Interpretation of Parameter Estimates:
1) Intercept: For a car which is brand new (0 age), has driven zero miles and has been imported,
the estimated price is Rs 2,145,700.
12 | P a g e
2) Coefficient of Age: Keeping mileage of the car and local/imported status fixed, if age of car
increases by one year, the price of car decreases by Rs 72,376 on average.
3) Coefficient of Mileage: Keeping age of the car and local/imported status fixed, if mileage
increases by one thousand, its price decreases by Rs 380.
4) Coefficient of Local: If the car is locally produced, its price is Rs 346,040 lower than a car
which is imported, keeping the age and mileage of the car fixed.
5) Coefficient of Determination R-Square: 71.7% variation in prices of car is explained by age of
the car, mileage of the car and whether a car is locally produced or is imported.
Hypothesis Testing:
1) Age of the car
H0: β1= 0 (Age of the car is not a useful predictor of car price).
H1: β1≠ 0 (Age of the car is a useful predictor of car price).
Using t-stat:
Excel t-stat = -9.136
Df = 75 – (3+1) = 71, α = 0.05/2 = 0.025
t (0.025,71) = -1.99
-9.136 < -1.99, rejection region.
Reject the null hypothesis implying that age of the car is a useful predictor of car price.
Using p-value:
1.3E-13 < 0.05, p-value is less than alpha.
Reject the null hypothesis implying that age of the car is a useful predictor of car price.
2) Mileage of the car
H0: β2= 0 (Mileage of the car is not a useful predictor of car price).
H1: β2≠ 0 (Mileage of the car is a useful predictor of car price).
Using t-stat:
Excel t-stat = -0.569
Df = 75 – (3+1) = 71, α = 0.05/2 = 0.025
t (0.025,12) = -1.99
-0.569 > -1.99, acceptance region.
13 | P a g e
Accept the null hypothesis, implying that mileage of the car is a not useful predictor of car price.
Using p-value:
0.57 > 0.05, p-value is more than alpha.
Accept the null hypothesis, implying that mileage of the car is not a useful predictor of car price.
3) Local/Imported Status of the car
H0: β3= 0 (Local/Imported Status of the car is not a useful predictor of car price).
H1: β3≠ 0 (Local/Imported Status of the car is a useful predictor of car price).
Using t-stat:
Excel t-stat = -7.858
Df = 75 – (3+1) = 71, α = 0.05/2 = 0.025
t (0.025,71) = -1.99
-7.858 < -1.99, rejection region.
Reject the null hypothesis implying that local/imported status of the car is a useful predictor of car
price.
Using p-value:
3.06E-11 < 0.05, p-value is less than alpha.
Reject the null hypothesis implying that local/imported status of the car is a useful predictor of car
price.
Prediction:
The first car of each model is used for making a prediction.
1) First Alto
Estimated Price = 21.457 – 0.7237(2) – 0.0038(15) – 3.4604(1) = Rs 16.49 Lacs
Actual Price = Rs 15.7 Lacs
Hence, the model overestimated the price.
2) First Mira
Estimated Price = 21.457 – 0.7237(3) – 0.0038(45) – 3.4604(0) = Rs 19.11 Lacs
Actual Price = Rs 18.55 Lacs
Hence, the model overestimated the price.
14 | P a g e
3) First Move
Estimated Price = 21.457 – 0.7237(5) – 0.0038(83) – 3.4604(0) = Rs 17.52 Lacs
Actual Price = Rs 17.8 Lacs
Hence, the model underestimated the price.
4) First Moco
Estimated Price = 21.457 – 0.7237(5) – 0.0038(68) – 3.4604(1) = Rs 14.12 Lacs
Actual Price = Rs 14.25 Lacs
Hence, the model underestimated the price.
5) First Days
Estimated Price = 21.457 – 0.7237(6) – 0.0038(71) – 3.4604(0) = Rs 16.84 Lacs
Actual Price = Rs 17.5 Lacs
Hence, the model underestimated the price.
Prediction Table:
Actual Price Predicted Price Difference
Alto 15.7 16.49 -0.79
Mira 18.55 19.11 -0.56
Move 17.8 17.52 0.28
Moco 14.25 14.12 0.13
Days 17.5 16.84 0.66
Table 6 : Residual Output
15 | P a g e
6. CONCLUSION
In conclusion we can see that the most budget friendly car model is Nissan Moco with the lowest
mean price followed by Suzuki Alto. Both of these cars are locally produced which explains why
they are cheaper than the others. Through hypothesis testing using the t tests we saw that the mean
price of Alto is equal to the mean prices of Mira and Move even though the latter two are imported
from abroad. On the other hand, the mean price of Alto is not equal to the mean prices of Moco
and Days due to the mean price of Moco being much lower and the mean price of Days being
much higher. We found the same conclusion through the Anova test which showed that the mean
prices of all car models are not the same and equal.
Lastly, we used multiple regression through which we interpreted the equation, found out which
factors have a significant impact on the car price and then made a few predictions. The age of the
car as well as its local/imported status are useful predictors of car price as they have a significant
impact on it. However, the same cannot be said for the mileage of the car. The model shows that
the mileage is not a useful predictor as it does not have a significant impact on the car prices. This
might be due to sellers misstating the mileage of their cars on [Link] in order to sell
them at a higher price. The regression model altogether is a good model as these three variables
explain 71.7% variation in the car prices. The rest of the variation might be due to other variables
not tested such as color of the car, condition of the car etc.
16 | P a g e
7. REFERENCES
Suzuki Alto:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Daihatsu Mira:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Daihatsu Move:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
17 | P a g e
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Nissan Moco:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Nissan Days:
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
18 | P a g e