McDonald’s is the world’s largest restaurant chain by revenue, serving over 69 million customers daily in over 100 countries across 37,855 outlets as of 2018. Although McDonald’s is best known for its hamburgers, cheeseburgers and french fries, they feature chicken products, breakfast items, soft drinks, milkshakes, wraps, and desserts. In response to changing consumer tastes and a negative backlash because of the unhealthiness of their food, the company has added to its menu salads, fish, smoothies, and fruit. The McDonald’s Corporation revenues come from the rent, royalties, and fees paid by the franchisees, as well as sales in company-operated restaurants1. In this work, dataset2 is taken from kaggle were analyzed.
First, the table column names were changed.
This data contains 260 items of McDonald’s menu. The menu is devided into 9 categories: Beef & Pork, Beverages, Breakfast, Chicken & Fish, Coffee & Tea, Desserts, Salads, Smoothies & Shakes, Snacks & Sides.Categories have different amount of dishes.
We are interested in finding out whether there is statistically significant difference in calories, total fat, cholesterol,sodium, sugars and protein in categories. For these purposes we use R.
The workflow is as follows:
Histograms show that calory distribution of all categories is not normal.Aloso, p-value in Shapiro–Wilk test is equal to 0. P-value is less than 0.05. P-value in Bartlett’s test is equal to 0.0000001. P-value is less than 0.05. This data has non-normal distribution and non-homogeneous dispersion.
As we see, there is statistically significance difference in calories between categories because p-value is equal to 0.
Run Dunn test. If value in a matrix has *, there statistically significant difference in calories## Kruskal-Wallis rank sum test
##
## data: x and group
## Kruskal-Wallis chi-squared = 120.7769, df = 8, p-value = 0
##
##
## Comparison of x by group
## (Bonferroni)
## Col Mean-|
## Row Mean | Beef & P Beverage Breakfas Chicken Coffee & Desserts
## ---------+------------------------------------------------------------------
## Beverage | 6.062749
## | 0.0000*
## |
## Breakfas | -0.021163 -7.940767
## | 1.0000 0.0000*
## |
## Chicken | -0.165379 -7.369221 -0.190096
## | 1.0000 0.0000* 1.0000
## |
## Coffee & | 3.913664 -3.966398 5.902471 5.230015
## | 0.0016* 0.0013* 0.0000* 0.0000*
## |
## Desserts | 3.079289 -1.279966 3.468165 3.448781 0.822559
## | 0.0373 1.0000 0.0094* 0.0101* 1.0000
## |
## Salads | 2.410474 -1.745976 2.682492 2.697831 0.182950 -0.440617
## | 0.2868 1.0000 0.1315 0.1256 1.0000 1.0000
## |
## Smoothie | 0.139466 -7.073015 0.209001 0.362897 -4.849102 -3.229899
## | 1.0000 0.0000* 1.0000 1.0000 0.0000* 0.0223*
## |
## Snacks & | 3.287437 -2.093354 3.945008 3.847901 0.535504 -0.349376
## | 0.0182* 0.6537 0.0014* 0.0021* 1.0000 1.0000
## Col Mean-|
## Row Mean | Salads Smoothie
## ---------+----------------------
## Smoothie | -2.489052
## | 0.2306
## |
## Snacks & | 0.164820 3.578778
## | 1.0000 0.0062*
##
## alpha = 0.05
## Reject Ho if p <= alpha/2
There statistically significant difference in calories in these categories:
“Beef & Pork - Beverages”
“Beverages - Breakfast”
“Beverages - Chicken & Fish”
“Beef & Pork - Coffee & Tea” “Beverages - Coffee & Tea”
“Breakfast - Coffee & Tea” “Chicken & Fish - Coffee & Tea”
“Breakfast - Desserts” “Chicken & Fish - Desserts”
“Coffee & Tea - Smoothies & Shakes”
“Desserts - Smoothies & Shakes”
“Beef & Pork - Snacks & Sides” “Breakfast - Snacks & Sides”
“Chicken & Fish - Snacks & Sides”
“Smoothies & Shakes - Snacks & Sides”
The Information is taken from [Wikipedia] (https://en.wikipedia.org/wiki/McDonald%27s)↩
[Dataset] (https://www.kaggle.com/mcdonalds/nutrition-facts) from Kaggle↩