Este estudio analiza el consumo de calorías en los restaurantes más populares de Estados Unidos y su correlación con el promedio del índice de precios al consumidor durante el período 2020-2022.El objetivo del estudio es conocer el impacto en los hábitos alimenticios de las personas en momentos de escasez de recursos, como ocurrió durante la pandemia.Esta situación representa un problema fundamental para las personas de clases sociales bajas, debido al alto costo de una alimentación saludable. Históricamente, estos grupos han sufrido las tasas más altas de obesidad.
library(readr)
data <- read.csv("HW1_2.csv", header = TRUE)
linear <- lm(calories_2020 ~ CPI, data = data)
summary(linear)
##
## Call:
## lm(formula = calories_2020 ~ CPI, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -325.3 -215.3 -88.8 84.7 8991.2
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -306.6143 150.4792 -2.038 0.0417 *
## CPI 3.1386 0.7988 3.929 8.73e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 427.4 on 2827 degrees of freedom
## Multiple R-squared: 0.005432, Adjusted R-squared: 0.00508
## F-statistic: 15.44 on 1 and 2827 DF, p-value: 8.727e-05
Full_analysis <-lm(calories_2020~CPI +restaurant + food_category_2020,data =data)
Full_analysis
##
## Call:
## lm(formula = calories_2020 ~ CPI + restaurant + food_category_2020,
## data = data)
##
## Coefficients:
## (Intercept)
## 136.3021
## CPI
## 0.7843
## restaurantArby's
## -156.1318
## restaurantAuntie Anne's
## -22.7065
## restaurantBaskin Robbins
## 46.8694
## restaurantBig Boy/Frisch's Big Boy
## 276.9668
## restaurantBJ's Restaurant & Brewhouse
## 101.2111
## restaurantBob Evans
## -168.3029
## restaurantBojangles
## -34.4356
## restaurantBonefish Grill
## -135.8170
## restaurantBuffalo Wild Wings
## 5.7835
## restaurantBurger King
## -85.1395
## restaurantCalifornia Pizza Kitchen
## -106.6578
## restaurantCaptain D's
## -179.7642
## restaurantCarl's Jr.
## -173.6978
## restaurantCarls Jr
## 34.3351
## restaurantCarrabba's Italian Grill
## 239.6309
## restaurantCasey's General Store
## -89.4319
## restaurantChecker's Drive-In/ Rally's
## -38.8595
## restaurantChecker's Drive-In/Rallys
## 26.3344
## restaurantCheddar's Casual Caf\xe9 / Cheddar's Scratch Kitchen
## 65.6166
## restaurantCheddar's Casual Caf\xe9/Cheddar's Scratch Kitchen
## -106.5937
## restaurantChick Fil A
## -22.2430
## restaurantChili's
## -74.1652
## restaurantChipotle
## -66.6074
## restaurantChuck E. Cheese
## 287.0866
## restaurantChurch's Chicken
## -74.6370
## restaurantCi Ci's
## -208.3619
## restaurantCi Ci's Pizza
## -280.2795
## restaurantCracker Barrel
## -3.0786
## restaurantCulver's
## 42.3776
## restaurantDairy Queen
## 158.9419
## restaurantDave & Buster's
## -84.1656
## restaurantDel Taco
## -103.5140
## restaurantDenny's
## 10.5593
## restaurantDickey's Barbeque
## 435.0993
## restaurantDickey's Barbeque Pit
## -360.2456
## restaurantDomino's
## -173.4995
## restaurantDominos
## -149.2251
## restaurantDunkin' Donuts
## -33.0277
## restaurantEinstein Bros
## -98.2371
## restaurantEl Pollo Loco
## -132.3092
## restaurantFamous Dave's
## 591.8049
## restaurantFirehouse Subs
## -106.8156
## restaurantFive Guys
## -98.3062
## restaurantFreddy's Frozen Custard & Steakburgers
## -131.1656
## restaurantFriendly's
## -77.1030
## restaurantFrisch's Big Boy
## 72.0084
## restaurantGolden Corral
## -278.4754
## restaurantHardee's
## 48.4911
## restaurantHooter's
## -86.6916
## restaurantIHOP
## -87.1658
## restaurantIn-N-Out
## -100.1915
## restaurantJack in the Box
## 56.8472
## restaurantJamba Juice
## -18.6064
## restaurantJason's Deli
## -118.3861
## restaurantJersey Mike's Subs
## 278.6754
## restaurantJimmy John's
## -79.9879
## restaurantJoe's Crab Shack
## -60.1197
## restaurantKFC
## -288.9751
## restaurantKrispy Kreme
## -6.9968
## restaurantKrystal
## 16.5125
## restaurantLittle Caesar's
## 660.1129
## restaurantLittle Caesars
## -131.1656
## restaurantLogans Roadhouse
## 90.0829
## restaurantLong John Silver's
## -154.7588
## restaurantLonghorn Steakhouse
## -47.3462
## restaurantLongHorn Steakhouse
## 92.0187
## restaurantMarco's Pizza
## -171.1656
## restaurantMcAlister's Deli
## 21.6938
## restaurantMcDonald's
## -39.7029
## restaurantMoe's Southwest Grill
## -58.4298
## restaurantO'Charley's
## 331.4152
## restaurantOlive Garden
## -205.6229
## restaurantOn The Border
## 25.1348
## restaurantOutback Steakhouse
## 40.7465
## restaurantPanda Express
## -168.6856
## restaurantPanera Bread
## -165.2798
## restaurantPapa John's
## -207.5975
## restaurantPapa Murphy's
## -376.1557
## restaurantPerkins
## -132.9237
## restaurantPF Chang's
## -113.0694
## restaurantPizza Hut
## -204.2574
## restaurantPopeyes
## -207.4984
## restaurantPortillo's
## 318.8487
## restaurantPotbelly Sandwich Shop
## -16.1656
## restaurantQdoba
## -120.7657
## restaurantQuiznos
## -90.5477
## restaurantRaising Cane's Chicken Fingers
## -196.1656
## restaurantRed Lobster
## 371.2892
## restaurantRed Robin
## -41.3095
## restaurantRomano's Macaroni & Grill
## -225.3894
## restaurantRound Table Pizza
## -188.6526
## restaurantSbarro
## 1026.1375
## restaurantShake Shack
## -142.7362
## restaurantSonic
## -56.3560
## restaurantStarbucks
## -125.3661
## restaurantStarbucks
## -65.4513
## restaurantSteak 'N Shake
## -140.1150
## restaurantSubway
## -107.5524
## restaurantTaco Bell
## -110.3837
## restaurantTGI Friday's
## -35.4903
## restaurantThe Capital Grille
## 479.7140
## restaurantThe Cheesecake Factory
## 192.9608
## restaurantTim Hortons
## -175.7270
## restaurantTropical Smoothie Caf\xe9
## -157.6383
## restaurantWaffle House
## -263.4779
## restaurantWendy's
## 165.4848
## restaurantWhataburger
## -52.0488
## restaurantWhite Castle
## -94.4836
## restaurantWingstop
## -137.4121
## restaurantYard House
## 126.2671
## restaurantZaxby's
## 130.2968
## food_category_2020Appetizers & Sides
## 251.1664
## food_category_2020Baked Goods
## 146.9128
## food_category_2020Beverages
## 1.0864
## food_category_2020Burgers
## 480.6954
## food_category_2020Desserts
## 254.0001
## food_category_2020Entrees
## 305.2003
## food_category_2020Fried Potatoes
## 408.8893
## food_category_2020Pizza
## 319.0957
## food_category_2020Salads
## 159.1553
## food_category_2020Sandwiches
## 320.8906
## food_category_2020Soup
## 122.4319
## food_category_2020Toppings & Ingredients
## -86.7730
Basado en nuestro análisis, no existe una correlación significativa entre el promedio del índice de precios al consumidor y el contenido calórico de los alimentos vendidos en los restaurantes más populares de Estados Unidos entre 2020 y 2022, ya que el coeficiente de correlación es R^2=0.3132, que es<0.5. Sin embargo, podemos concluir que, en promedio, los artículos vendidos en estos restaurantes contienen aproximadamente 284 calorías, y que el índice promedio de precios al consumidor durante este período fue de 186.1.
Adicional, no se puede interpretar la pendiente, puesto que el intercepto no es un número que se pueda analizar lógicamente