Instructor: Dr.Do Duc Tan
Group Members
1. Nguyen My Nhi - 10322018 (Leader)
2. Nguyen Ngoc Thien Ngan - 10621053
3. Vo Ngoc Tam Nhu - 10621057
4. Le Canh Loc - 10622022
Given we are the finance department of an international bike sales
company, with a business mainly focused on the North America and Oceania
market and a little on Europe, the C-suite requires a holistic analysis
about current trends in the bike sales market in the period from 2011 to
2016 to gain more understanding about it. Furthermore, it is also
demanded to give out appropriate suggestions and suitable strategies for
the firm.
Different statistical figures indicate a wide range
of demands and needs corresponding to each country, which depend on
multiple factors such as customers’ gender, age, etc. Therefore, testing
and analyzing those figures can provide a deeper insight about other
stats such as revenue, profit, price, etc and how they
function.
In short, the main purpose of this report is to
inspect the dataset of the bike sales market in 6 years (from 2011 to
2016) as well as giving out recommendations for better marketing
strategy for future development.
This analyzing dataset is taken from Kaggle. It has a total of over 110 thousand customers, who purchased bike products in this shop, including Bikes, Accessories and Clothing. The original dataset is used to ensure the accuracy of the analyzing result such as profit and the shopping trends of the customers over six years in six countries.
In this dataset, it contains of … variables:
Significance level plays a key role in hypothesis testing. Besides being the cornerstone for the acceptance or rejection of the null hypothesis, significance level controls the critical value and power of the test, thus having a consequential impact on the inferential outcome, as well as represents the degree of risk that the researcher is willing to take for Type I error. Despite having a substantial influence on hypothesis testing, there is hardly any in-depth information on how to choose a sufficient significance level in statistics textbooks.
According to Kim (2015), a low significance level should be adopted for large sample sizes, while a higher significance level should be used for smaller sample sizes. In the scope of this report, although the dataset contains over 100.000 objects, further manipulation to create data that is suitable for analysis results in datasets with only around 10 observations. As a result, a significant level of 0.1 is adopted to increase the sensitivity of the hypothesis test.
Before sketching visual graphs in this part and other further analysis, we need to add a csv dataset of a bike sales and some library packages in order to draw graphs smoothly.
Sale<-read.csv("D:\\VGU\\1ST YEAR\\WS2023\\OSTA\\Project\\Main\\Sales_22.csv")
Season<-read.csv("D:\\VGU\\1ST YEAR\\WS2023\\OSTA\\Project\\Main\\Season.csv")
library(ggplot2)
library(ggthemes)
library(extrafont)
library(dplyr)
library(plotly)
library(extrafontdb)
library(knitr)
library(gt)
library(gtExtras)
library(reshape2)Now let’s get start to drawing graph visually analysing.
Figure 1
Figure 2
Looking at Figure 1 and Figure 2, it can be seen that
there is a likelihood that the number of customers affects the profit in
six countries. The United States always outperformed the other
countries, while the total profit earned by Germany and France was the
lowest.
## Warning: The titlefont attribute is deprecated. Use title = list(font = ...)
## instead.
Figure 3
In contrast to the Clothing and Bikes, Accessories were the most common
purchase for bikers of all ages according to Figure 3, which
accounted for more than 60%.
In this report, we will immediately deeply analyze into each graph after
the initially visual analysis to provide readers with a more detailed
understanding. This approach allows readers to closely follow and keep
track of the insights we aim to convey.
Figure 4
At first glance, it is clear that Fall was not an ideal season for customers to enjoy bike-related activities. However, in Australia, a considerable amount of customers purchased the products in Fall and Summer, which earned the most profit to the Australia’s bike shops (nearly 2M and 3M accordingly).
In contrast, in the USA, the biggest proportion belonged in Winter,
followed by Spring (which the profit was approximately 5M and 3M
respectively). For the remaining countries, the total profit in four
seasons was really similar, with Falls and Winter was the lowest and
highest figure respectively.
In the countries considered in this study, the weather is cold all year round, except for summer, when it becomes much more comfortable to go outside. As a result, summer is the ideal time of the year to enjoy outdoor activities, including biking. Furthermore, summer is followed by the back-to-school season, which might raise a temporary need for bicycles.
Based on the mentioned seasonal events, a supposition is raised, whether the bike sale in summer is statistically higher than that in the remaining seasons of a year. Based on the statistical results, we can consider adjusting business and marketing strategies, including promotion and marketing campaigns, as well as increasing procurement, to maximize the profit for the business.
The four seasons in the United Kingdom (UK), France, Germany, the United States, Canada, and Australia may have slight variations due to the different geographical locations of each country. Here is a general overview:
## Warning: Since gt v0.9.0, the `colors` argument has been deprecated.
## • Please use the `fn` argument instead.
## This warning is displayed once every 8 hours.
| Country | Spring | Summer | Fall | Winter |
|---|---|---|---|---|
| USA | March - May | June - August | September - November | December - February |
| Canada | March - May | June - August | September - November | December - February |
| France | March - May | June - August | September - November | December - February |
| Germany | March - May | June - August | September - November | December - February |
| UK | March - May | June - August | September - November | December - February |
| Australia | September - November | December - February | March - May | June - August |
Note that this information is a general overview and may vary
depending on the specific location within each country.
Figure 5
The figure above demonstrates the total profit in each quarter of a year in six countries considered in the dataset, throughout the recorded years. Except for Australia, where summer falls in the fourth quarter of the year, the second quarter is where summer occurs in all other countries. As shown in figure 9, the profit made in summer in Australia is noticeably higher than that made in other seasons.
Such index is also of the two highest indices in the five other countries. Therefore, it is worthwhile conducting a detailed statistical analysis to discover whether it is statistically evident that the profit made in summer is higher than that of the other seasons of the year.
Let \(\mu_i\) be the expected profit of the season \(\ i\) (with i being either summer, winter, autumn, or spring). A one-way ANOVA (Analysis of Variance) test with the following hypotheses is used to analyze whether there is a statistical evidence to conclude that the bike selling profit of summer is higher than that of other seasons:
\(\scriptsize \ \text{H}_O\): \(\scriptsize \ \mu_{\text{summer}}\) = \(\scriptsize \ \mu_{\text{fall}}\)= \(\scriptsize \ \mu_{\text{winter}}\) = \(\scriptsize \ \mu_{\text{spring}}\) versus
\(\scriptsize \ \text{H}_A\): \(\scriptsize \ \mu_i\) \(\scriptsize \ \neq\) \(\scriptsize \ \mu_j\) for some \(\scriptsize \ \ i\), \(\scriptsize \ \ j\) \(\scriptsize \ \in\) {summer, fall, winter,
spring}
Where \(\scriptsize \ \mu_i\) is the
expected profit of selling bikes in the season \(\scriptsize \ \ i\) of a year.
A rejection of the null hypothesis will be followed by a Tukey
multiple comparisons procedure between the expected profit made in
summer and that made in other seasons to confirm that the expected
profit made in summer is statistically higher.
For the USA
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
usa_anova <- subset(PF, Country =="United States")
usa_anova_result<- aov(Total_Profit ~ Season, data = usa_anova)To see the result, we need to run a ‘summary(usa_anova_result)’.
| ANOVA Result of the United States | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 7.68e+11 | 2.56e+11 | 2.186 | 0.125 |
| Residuals | 18 | 2.11e+12 | 1.17e+11 | NA | NA |
For Australia
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
aus_anova <- subset(PF, Country =="Australia")
aus_anova_result<- aov(Total_Profit ~ Season, data = aus_anova)| ANOVA Result of Australia | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 4.71e+11 | 1.57e+11 | 10.01 | 0.000308 |
| Residuals | 20 | 3.14e+11 | 1.57e+10 | NA | NA |
For Canada
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
can_anova <- subset(PF, Country =="Canada")
can_anova_result<- aov(Total_Profit ~ Season, data = can_anova)| ANOVA Result of Canada | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 9.56e+10 | 3.19e+10 | 2.277 | 0.114 |
| Residuals | 18 | 2.52e+11 | 1.40e+10 | NA | NA |
For France
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
fr_anova <- subset(PF, Country =="France")
fr_anova_result<- aov(Total_Profit ~ Season, data = fr_anova)| ANOVA Result of France | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 5.11e+10 | 1.71e+10 | 2.643 | 0.0806 |
| Residuals | 18 | 1.16e+11 | 6.45e+09 | NA | NA |
For Germany
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
ger_anova <- subset(PF, Country =="Germany")
ger_anova_result<- aov(Total_Profit ~ Season, data = ger_anova)| ANOVA Result of Germany | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 6.70e+10 | 2.23e+10 | 1.865 | 0.172 |
| Residuals | 18 | 2.16e+11 | 1.20e+10 | NA | NA |
For the United Kingdom
PF <- Sale %>% group_by(Country, Year, Season) %>% summarise(Total_Profit = sum(Profit))
uk_anova <- subset(PF, Country =="United Kingdom")
uk_anova_result<- aov(Total_Profit ~ Season, data = uk_anova)| ANOVA Result of United Kingdom | |||||
| X | Df | Sum.Sq | Mean.Sq | F.value | PR( >F) |
|---|---|---|---|---|---|
| Season | 3 | 1.49e+11 | 4.95e+10 | 2.172 | 0.127 |
| Residuals | 18 | 4.10e+11 | 2.28e+10 | NA | NA |
With the choice of significance level of 0.1 made in section …, the p-values of the hypothesis test reject the null hypothesis in Australia and France, while accept the null hypothesis in the four other countries. For the four countries where the p-values accept the null hypothesis, there is not sufficient evidence to conclude that there is a significant difference between the profit made by other seasons and summer. Therefore, the Tukey honestly significant difference (HSD) test is skipped.
The rejection of the supposition by the hypothesis test provides a valuable insight to our business: despite the noticeable difference between the profit made in summer compared to those made in other seasons, statistical analysis does not support the assumption. This in-depth information helps us further consider whether to invest more into stocking and marketing in summer, thereby, helps prevent the risk of inefficient investment.
However, for Australia and France, where the p-value rejects the null hypothesis, it is evident that there is at least one pair of seasonal profit that shows significant differences. As a result, the hypothesis test is followed by a Tukey HSD test to determine where the differences occur, furthermore, whether the mean profit made in summer is actually higher than that made in other seasons.
The Tukey HSD test conducted on the dataset of Australia with the confidence level of 0.9 returns the following result:
Australia <- subset(Sale, Country == "Australia")
df_Australia <- Australia %>% group_by(Season, Year) %>% summarise(totalProfit = sum(Profit))
model_aus <- aov(df_Australia$totalProfit ~ df_Australia$Season, data = df_Australia)
tukey_results_aus <- TukeyHSD(model_aus, conf.level = .9)| Tukey multiple comparisons of means | ||||
| 90% family-wise confidence level | ||||
| X | diff | lwr | upr | p.adj |
|---|---|---|---|---|
| Spring-Fall | -215926.50 | -392869.8172 | -38983.18 | 0.0338503 |
| Summer-Fall | 176420.67 | -522.6505 | 353363.98 | 0.1013788 |
| Winter-Fall | -53801.17 | -230744.4838 | 123142.15 | 0.8780143 |
| Summer-Spring | 392347.17 | 215403.8495 | 569290.48 | 0.0001417 |
| Winter-Spring | 162125.33 | -14817.9838 | 339068.65 | 0.1459057 |
| Winter-Summer | -230221.83 | -407165.1505 | -53278.52 | 0.0222070 |
## Tukey multiple comparisons of means
## 90% family-wise confidence level
##
## Fit: aov(formula = df_Australia$totalProfit ~ df_Australia$Season, data = df_Australia)
##
## $`df_Australia$Season`
## diff lwr upr p adj
## Spring-Fall -215926.50 -392869.8172 -38983.18 0.0338503
## Summer-Fall 176420.67 -522.6505 353363.98 0.1013788
## Winter-Fall -53801.17 -230744.4838 123142.15 0.8780143
## Summer-Spring 392347.17 215403.8495 569290.48 0.0001417
## Winter-Spring 162125.33 -14817.9838 339068.65 0.1459057
## Winter-Summer -230221.83 -407165.1505 -53278.52 0.0222070
It can be observed that for all 3 pairs of comparisons between the mean profit made in summer and that made in other seasons, when comparing the mean profit made in summer with those made in winter and in spring, the confidence intervals exclude the value 0 and simultaneously imply that the mean profit made in summer is statistically proven to be higher than that made in those seasons. However, there is not a significant difference between the mean profit made in summer and that made in fall. As a result, it can be confidently concluded that summer is among the two most profitable seasons of Australia. This finding provides crucial information for retailers to adjust their stocking and marketing strategies (i.e. purchase more bikes in summer or start promotion and marketing campaigns) to make the most out of the market.
Meanwhile, the Tukey HSD test conducted on the dataset of France with the confidence level of 0.9 returns the following result:
France <- subset(Sale, Country == "France")
df_FR <- France %>% group_by(Season, Year) %>% summarise(totalProfit = sum(Profit))
model_fr <- aov(df_FR$totalProfit ~ df_FR$Season, data = df_FR)
tukey_results_fr <- TukeyHSD(model_fr, conf.level = .9)| Tukey multiple comparisons of means | ||||
| 90% family-wise confidence level | ||||
| X | diff | lwr | upr | p.adj |
|---|---|---|---|---|
| Spring-Fall | 81133.92 | -46703.66 | 208971.49 | 0.4220487 |
| Summer-Fall | 57703.08 | -70134.49 | 185540.66 | 0.6863655 |
| Winter-Fall | 141674.58 | 13837.01 | 269512.16 | 0.0601105 |
| Summer-Spring | -23430.83 | -137772.24 | 90910.57 | 0.9567656 |
| Winter-Spring | 60540.67 | -53800.74 | 174882.07 | 0.5712314 |
| Winter-Summer | 83971.50 | -30369.90 | 198312.90 | 0.3005502 |
## Tukey multiple comparisons of means
## 90% family-wise confidence level
##
## Fit: aov(formula = df_FR$totalProfit ~ df_FR$Season, data = df_FR)
##
## $`df_FR$Season`
## diff lwr upr p adj
## Spring-Fall 81133.92 -46703.66 208971.49 0.4220487
## Summer-Fall 57703.08 -70134.49 185540.66 0.6863655
## Winter-Fall 141674.58 13837.01 269512.16 0.0601105
## Summer-Spring -23430.83 -137772.24 90910.57 0.9567656
## Winter-Spring 60540.67 -53800.74 174882.07 0.5712314
## Winter-Summer 83971.50 -30369.90 198312.90 0.3005502
It can be observed from the table above that the only significant
difference occurs between the mean profit made in winter and that made
in fall, while no significant difference can be observed when comparing
the mean profit made in summer and that made in other seasons.
Therefore, despite rejecting the null hypothesis, there is no
statistical evidence that summer is more profitable than other seasons
in France. Thus, further consideration is necessary if a retailer still
wants to run promotional campaigns or stock more in summer.
By separating the dataset into different countries, then re-organizing the separated subsets to data points in each season, the inputs for the ANOVA tests (further Tukey HSD tests) were constructed. With the p-values returned by the tests, there is sufficient statistical evidence to conclude that, summer is among the two most profitable season for the selling of bikes, biking accessories, and biking clothing; whereas in other countries, there is no significant difference between the mean profit made by the four seasons of a year. Although the initial supposition that summer being the most profitable season is not fully accepted, with this in-depth analysis, retailers in Australia can consider adjusting their business strategies to adapt to the trend and achieve better success.
| Observed Cell Frequency of Three Types of Bikes in Five States in Australia | |||
| States | Mountain Bikes | Road Bikes | Touring Bikes |
|---|---|---|---|
| New South Wales | 936 | 1714 | 333 |
| Queensland | 459 | 886 | 188 |
| South Australia | 154 | 322 | 52 |
| Tasmania | 60 | 118 | 18 |
| Victoria | 538 | 1033 | 212 |
Figure 6
As can be seen in Figure 6, it demonstrates that the adult age group (25
- 35 years old) performs better than other age group. Moreover, the
number of male and female customers are visually similar according to
the graph, so the demand of purchasing bike products of two genders
seems to be the same.
Figure 7
United States was the largest market, with the quantity and profit
figures being the highest (More than 500 thousand products were sold and
generated profit of up to 12.5 million US dollars. Besides that,
Australia followed the United States to be the 2nd largest market (more
than 250 thousand units sold and the profit earned more than 6M). For
the remaining countries, they fluctuated under 200 thousand for quantity
and under 5 million for profit.
As can be seen in Figure 7, Australia was the largest market only after the United States. Therefore, we will have some furthur consideration to this country, particularly is about bikes trend in 5 states in Australia.
Figure 8
About the general trend sales, road bikes were the most common type of bike with over 20,000 bikes were sold. Mountain bikes and touring bikes could only account for about 1/3 and 1/6 of the total sales, respectively.
Figure 9
As can be seen in Figure 9, Road Bikes were the most popular
type of bike in Australia, which the number of bikes sold in five states
was always the highest with compared to Mountain Bikes and Touring
Bikes. Particularly, New South Wales sold the most with about 2500
bikes. Furthermore, Bikes were bought the most in New South Wales, with
nearly a total of 5000 bikes sold out in this area. Victoria and
Queensland were followed with a total number of 3000. In other states,
the sales volume fluctuated under 2000 bikes in total.
Beside the impact of season, topographical properties of a country can be a significant influencer on bike consumption of a country. Different topography requires different biking skills, as well as bike properties. As a result, bike preferences may vary from place to place.
Conducting statistical analysis on the preference of bike according to geographical location provides a statistics-based conclusion of the correlation between a country’s topography and the choice of bike, therefore, helps us develop suitable business strategy, including a shift of purchasing to the preferred choice of bike, to make the most out of the market.
In the scope of the report, Australia was chosen to analyze the impact of the topography of this country on the consumers’ preference of bike. The data recorded in five out of six states of Australia throughout five years is processed through a two-way contingency table chi-squared test. The result of the hypothesis test provides statistics to determine whether the topography of Australia notably impacts on the consumers’ bike choice.
Our criteria for assume each type of bike for each topography:
| States Description of Five States in Australia | |||
| States | Size | Topography | Bike Type |
|---|---|---|---|
| New South Wales | 801,150 km<fd> | Numerous forests, plateaus and valleys, and arid western regions | Touring Bikes |
| Queensland | 1,729,742 km<fd> | Tropical rainforests, rivers, coral reefs, mountain ranges and sandy beaches | Touring Bikes |
| South Australia | 983.482 km<fd> | Arid and semi-arid rangelands, with several low mountain ranges | Touring Bikes |
| Tasmania | 68,401 km<fd> | Mostly mountainous region, with large national parks | Mountain Bikes |
| Victoria | 227.416 km<fd> | Diverse landscapes, and extensive coastlines | Touring Bikes |
| Observed Cell Frequency of Three Types of Bikes in Five States in Australia | |||
| States | Mountain Bikes | Road Bikes | Touring Bikes |
|---|---|---|---|
| New South Wales | 1337 | 2588 | 427 |
| Queensland | 694 | 1313 | 236 |
| South Australia | 207 | 453 | 68 |
| Tasmania | 82 | 184 | 19 |
| Victoria | 757 | 1520 | 271 |
The set of hypotheses for the two-way chi-squared test is stated as
follows:
\(\scriptsize \
\text{H}_O\): The sales of each type of bike does not vary
according to where that type of bike was sold
versus
\(\scriptsize \ \text{H}_A\): The sales
of each type of bike does vary according to where that bike was sold
##
## Pearson's Chi-squared test
##
## data: sub
## X-squared = 9.5816, df = 8, p-value = 0.2956
Using the 0.1 significance level determined in section…, the p-value of 0.2956 returned by the two-way contingency table chi-square test accepts the null hypothesis, which implies that the customers’ preference of bike types does not vary according to where the bike was sold, or more specifically, to the topography of the state of the country.
| States | Population | Topography | Bike Type |
|---|---|---|---|
| New South Wales | Live in the Greater Sydney area | This area is flat | Road Bikes |
| Queensland | Mainly lives in Brisbane city | A hilly area, but kind of flat | Road Bikes |
| South Australia | Mainly lives in Adelaide city | Hilly and flat area | Road Bikes |
| Tasmania | Mainly lives in Hobart city | A flat area | Road Bikes |
| Victoria | Mainly lives in Melbourne city | Containing hills, valleys and flat areas | Road Bikes |
According to the topography summary in section…, despite having a diverse topography across the states, further population analysis of Australia tends to colonize in flatter terrain of the states. More specifically, just under two thirds of the population of New South Wales lives in the city of Greater Sydney, while in Queensland, South Australia, Tasmania, and Victoria, the people mainly live in Brisbane, Adelaide, Hobart, and Melbourne respectively. Although some of them can be hilly, it is reported that these cities mostly consist of flat areas.
Therefore, it is reasonable that mountain bikes are not more
preferred even in states with mountainous terrain. However, without this
statistical analysis, the information from the population distribution
analysis can be misleading, since one can conclude that road bikes or
touring bikes are more preferred. This impression is proved to be
inevident with the acceptance of the null hypothesis. For that reason,
besides evaluating the supposition of the impact of topography on the
customers’ preference, this particular hypothesis test also helps
discard an initial impression that might lead to unprofitable
investment.
By using the Chi-squared test on a two-way contingency table, an inference of the dependence of the customers’ choices on the topography of a country was proven to be statistically inevident. Future research may consider analyzing the population distribution of each state to better understand the preference of the customers, therefore, better serve the customers’ taste.