A supermarket chain analyzed data on sales of a particular brand of snack cracker
at 104 stores for a certain one week period. The analyst decided to build a regresion model to predict the sales of the snack cracker based on the total sales of all brands in the snack cracker category.
c. The difference in category sales between two stores is 150. What is the
predicted differnece of the cracker sales between these stores?
CategorySales | Sales |
1348 | 394 |
1110 | 388 |
1096 | 357 |
1208 | 385 |
1063 | 346 |
1097 | 326 |
1277 | 358 |
1275 | 359 |
1328 | 360 |
1281 | 374 |
1127 | 362 |
1339 | 406 |
1055 | 354 |
1263 | 368 |
1158 | 391 |
1286 | 370 |
1401 | 372 |
1085 | 381 |
1178 | 371 |
1248 | 353 |
1241 | 372 |
1320 | 375 |
1353 | 369 |
1173 | 353 |
1208 | 364 |
1280 | 371 |
1214 | 391 |
1213 | 381 |
1291 | 371 |
1230 | 335 |
1095 | 338 |
1149 | 320 |
1305 | 370 |
1134 | 351 |
1127 | 328 |
1053 | 295 |
1107 | 318 |
1054 | 296 |
1141 | 327 |
1190 | 313 |
1071 | 346 |
1147 | 361 |
1127 | 350 |
1204 | 367 |
1301 | 411 |
1184 | 390 |
1214 | 367 |
1132 | 341 |
1213 | 380 |
1173 | 347 |
1226 | 365 |
1261 | 352 |
1118 | 341 |
1096 | 321 |
1211 | 329 |
1033 | 336 |
1228 | 361 |
1241 | 386 |
1381 | 408 |
1332 | 359 |
1253 | 375 |
1043 | 330 |
1456 | 341 |
1099 | 340 |
1044 | 336 |
1230 | 341 |
1143 | 371 |
1238 | 378 |
1357 | 371 |
1150 | 378 |
1218 | 386 |
1215 | 357 |
1238 | 376 |
1196 | 349 |
1193 | 364 |
1282 | 361 |
1317 | 365 |
1157 | 346 |
1294 | 356 |
1198 | 343 |
1436 | 358 |
1278 | 368 |
1124 | 312 |
1116 | 315 |
1109 | 338 |
1285 | 327 |
1189 | 309 |
1197 | 330 |
1091 | 345 |
1251 | 344 |
1124 | 355 |
1130 | 346 |
1067 | 328 |
1150 | 352 |
1238 | 375 |
1409 | 370 |
1264 | 377 |
1151 | 340 |
1206 | 350 |
1297 | 375 |
1164 | 364 |
1108 | 370 |
1187 | 365 |
1459 | 396 |
I have fitted the regression in R. Please ask if you have any doubts. I have saved the data in data2.csv and then read it through the command. data2.csv has to be in same working directory.
data2<-
read.csv("data2.csv")
model1<- lm(Sales ~ CategorySales, data = data2)
summary(model1)
# Call:
# lm(formula = Sales ~ CategorySales, data = data2)
#
# Residuals:
# Min 1Q Median 3Q Max
# -47.199 -11.521 1.099 12.283 43.168
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) 205.70638 24.84049 8.281 5.00e-13 ***
# CategorySales
0.12534 0.02054 6.101 1.91e-08 ***
# ---
# Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
1
#
# Residual standard error: 20.27 on 102 degrees of freedom
# Multiple R-squared: 0.2674, Adjusted R-squared:
0.2602
# F-statistic: 37.22 on 1 and 102 DF, p-value: 1.914e-08
Since the coefficient of the CategorySales is 0.12534. If there is 150 difference in CategorySales, there will be 150*0.12534 change in the predicted value of Sales since we have fit linear regression.
Hence difference in predicted value of Sales is 18.801
Please ask in the comments below if you have any doubts. Thumbs up if you like.
A supermarket chain analyzed data on sales of a particular brand of snack cracker at 104...
Hi it's python I imported a data which are so many words in txt and I arranged and reshaped with alphabetically both rows and columns I was successful with these steps but I am stuck with next step below is my code and screenshot import numpy as np import pandas as pd data=pd.read_csv("/Users/superman/Downloads/words_file2.txt",header=None) df_input=pd.DataFrame(data) df_output=pd.DataFrame(np.arange(676).reshape((26,26)), index = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'], columns = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']) df_output.index.name="Start" df_output.columns.name="End" df_output This below screen shot is what I have to find I have to find each word...
HELP needed urgently....Data and question is attacted below..... Thank you in advance there is no data link fir this data it’s all in photos.... thank you i have already posted the question We were unable to transcribe this imageNo. 2 3 4 5 6 7 8 Working Sector Public Own Public Public Private Public Private Private Own Own Private Public Public Public Private 9 10 11 12 13 Public IS 16 17 18 19 20 21 22 23 24 25...