Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Store Longitude Latitude 1 -123.7903054 46.1934274 2 -123.2601431 44.5825846 3 -

ID: 3205791 • Letter: S

Question

Store Longitude Latitude 1 -123.7903054 46.1934274 2 -123.2601431 44.5825846 3 -122.989827 45.5228939 4 -122.8755949 42.3265152 5 -122.8029665 45.4923824 6 -122.7201232 45.413914 7 -122.6948697 47.6445386 8 -122.6427372 45.4807521 9 -122.6366524 38.232417 10 -122.6359433 45.5443776 11 -122.620471 45.534627 12 -122.571731 45.419814 13 -122.5538767 45.6197293 14 -122.5504041 47.2356536 15 -122.5134351 45.4433066 16 -122.503327 37.9650627 17 -122.4894588 48.7562157 18 -122.4863492 37.6800002 19 -122.481906 37.977161 20 -122.4184108 37.6531903 21 -122.4099154 37.7726402 22 -122.4047843 47.5745802 23 -122.3871942 37.5985468 24 -122.3435336 47.7393027 25 -122.3390936 37.5245965 26 -122.3223975 47.3165043 27 -122.3050823 37.5349925 28 -122.3019206 38.3170536 29 -122.2983676 47.3970667 30 -122.2964235 47.6087583 31 -122.293793 37.837012 32 -122.2937428 37.9963136 33 -122.2824021 37.7712165 34 -122.2738958 37.8524741 35 -122.2605222 37.5071591 36 -122.1853637 47.8962246 37 -122.1575745 37.4457966 38 -122.142426 47.6105427 39 -122.1180201 37.8857582 40 -122.086585 37.3785351 41 -122.072837 37.685271 42 -122.0326019 37.3492097 43 -122.026918 38.0349026 44 -122.024399 36.974453 45 -122.0212337 37.9461207 46 -122.002485 37.82312 47 -121.9871217 37.3052272 48 -121.9700556 36.9786513 49 -121.9623751 37.2358078 50 -121.9529992 37.2770029 51 -121.8943575 36.5965583 52 -121.877804 37.2517684 53 -121.8618108 37.2994014 54 -121.761124 38.546632 55 -121.6957863 37.931868 56 -121.6543901 37.1305012 57 -121.4920572 38.5775937 58 -121.4399041 38.5678631 59 -121.3884671 38.6258567 60 -121.3198491 37.9983748 61 -121.3153096 44.0581728 62 -121.2721718 38.6446264 63 -121.1760583 38.6779591 64 -121.0220422 37.7208684 65 -120.7060049 35.5496939 66 -120.5969758 35.2454989 67 -120.5907252 35.1185868 68 -120.4357191 34.9530337 69 -119.8276389 34.4358294 70 -119.8172076 39.5329047 71 -119.7844676 36.7370362 72 -119.7759879 39.1127083 73 -119.7599761 36.8179331 74 -119.7289889 34.4402467 75 -119.7280097 36.8492572 76 -119.6817845 34.433094 77 -119.0376023 34.2163937 78 -119.0235151 35.3848408 79 -119.0187125 35.3732921 80 -118.9102882 34.1842233 81 -118.8691404 34.2189752 82 -118.8073729 34.1466467 83 -118.7616764 34.1533395 84 -118.6439809 34.1973122 85 -118.5914696 34.1544724 86 -118.5155901 34.4338228 87 -118.5021527 34.2793576 88 -118.4221519 34.0386656 89 -118.3900204 34.0236878 90 -118.3874701 33.9756837 91 -118.3870991 34.1395597 92 -118.3870173 33.7444613 93 -118.3783347 34.0931603 94 -118.3734061 33.8277951 95 -118.373406 34.1503839 96 -118.3726571 33.8151226 97 -118.3724915 34.0741548 98 -118.3592206 34.0551212 99 -118.3591135 34.1812611 100 -118.3520389 33.8409696 101 -118.351908 34.151895 102 -118.325739 34.1012181 103 -118.3181943 34.1122669 104 -118.3101326 33.7552819 105 -118.3082034 34.1772371 106 -118.2702036 34.1893001 107 -118.224685 34.206551 108 -118.2074793 34.5360337 109 -118.200156 34.139488 110 -118.2000277 34.2068182 111 -118.188329 33.8303474 112 -118.1678543 34.1406082 113 -118.1493082 34.6003206 114 -118.1386005 34.1427587 115 -118.1298234 33.7523035 116 -118.1181199 33.7963296 117 -118.0830047 34.1642396 118 -118.0478826 33.721051 119 -118.0019482 34.1442616 120 -117.9659037 33.6587745 121 -117.9190418 33.6496252 122 -117.9073244 33.7246333 123 -117.9000604 33.9166805 124 -117.8313748 33.6038216 125 -117.8146866 33.8155586 126 -117.8067257 34.1066756 127 -117.791835 33.889601 128 -117.7197785 34.0966764 129 -117.7075526 33.5225261 130 -117.6939518 34.0474459 131 -117.637617 33.6147846 132 -117.6317494 33.4662881 133 -117.5904936 33.9089023 134 -117.5848025 34.1787581 135 -117.409345 47.7088497 136 -117.3272224 47.5888029 137 -117.2712717 32.8328112 138 -117.2687905 32.8208124 139 -117.259505 33.046865 140 -117.2499749 33.095442 141 -117.2337651 32.7868236 142 -117.2319667 32.8656058 143 -117.2173081 32.7360706 144 -117.1676501 32.749789 145 -117.1147095 33.5273381 146 -117.0970596 32.7348953 147 -117.074893 33.10019 148 -117.0735241 33.0013938 149 -117.0676398 32.8932137 150 -116.3965806 33.7275062 151 -116.225113 33.7130401 152 -116.1630431 43.6624385 153 -115.3355331 36.14631 154 -115.2577339 36.1805335 155 -115.2098129 36.1486584 156 -115.0525302 36.0633189 157 -112.4685025 34.5400242 158 -112.4649083 33.657298 159 -112.2577739 33.6381927 160 -112.0991303 33.8585382 161 -112.0629493 33.5832391 162 -112.029752 33.5106684 163 -111.9937549 33.4354153 164 -111.978651 33.583373 165 -111.9641728 33.5388471 166 -111.8988812 33.3784731 167 -111.8926303 33.6160293 168 -111.7912025 33.3063425 169 -110.966488 32.3909071 170 -110.9447027 32.2546522 171 -110.8850949 32.2540946 172 -106.5701927 35.1009909 173 -106.519036 35.1808064 174 -105.8525154 35.616067 175 -104.9826965 39.7312095 176 -104.9505671 39.6117926 177 -104.7637619 38.9043608 178 -98.4513272 29.4854054 179 -98.4093146 29.4023259 180 -97.7623118 30.4407287 181 -97.7525352 30.401356 182 -97.7443863 30.2729209 183 -97.3840729 32.737615 184 -97.3783231 32.7078686 185 -97.1341783 32.9412363 186 -96.9518267 32.6305776 187 -96.7868794 32.9005121 188 -96.75787 32.777133 189 -96.6477771 40.7422154 190 -96.4983194 32.8262609 191 -96.0520363 41.2674199 192 -95.8777162 36.1755994 193 -95.7754069 29.7406954 194 -95.6327904 29.8965518 195 -95.5830253 29.7364834 196 -95.509247 30.1704912 197 -95.4935119 29.7503969 198 -94.8406555 39.0360763 199 -93.4557877 45.0724642 200 -93.4307587 44.957939 201 -93.3439291 44.9465193 202 -93.1629063 44.9330076 203 -93.1471667 45.0791325 204 -92.9475662 44.915423 205 -91.1448981 30.4192451 206 -90.752065 41.923321 207 -90.5771493 38.6633659 208 -90.4328968 38.6008862 209 -88.3381606 41.8638959 210 -88.2942493 42.1655801 211 -88.1437782 41.7606321 212 -88.0444947 42.0505306 213 -88.0216334 41.8132909 214 -88.0130464 41.8635885 215 -87.9824758 42.1099506 216 -87.9531303 42.2830786 217 -87.8406192 42.0111412 218 -87.8325546 42.012807 219 -87.8289548 42.1275267 220 -87.8255007 41.6305694 221 -87.8205864 42.0723953 222 -87.7978506 41.8880619 223 -87.6579616 41.8962238 224 -87.6423915 41.9267278 225 -87.6235742 41.8703314 226 -86.7315785 33.4514846 227 -86.2208076 41.7367717 228 -86.2118347 39.9125426 229 -86.0759212 39.9050495 230 -85.6486251 38.262469 231 -85.630707 38.249994 232 -85.5765995 42.9120339 233 -84.5885474 42.6923687 234 -84.5327038 38.0103355 235 -84.4964696 33.8575276 236 -84.4015075 39.2123057 237 -84.3857442 33.9253024 238 -84.3726049 33.7717008 239 -84.2807329 30.4382559 240 -84.238417 33.9851868 241 -84.1557902 39.8458148 242 -84.1540659 39.6801641 243 -84.0061661 35.9073934 244 -83.4832692 42.4311464 245 -83.1327332 42.4922946 246 -83.1140771 40.0992294 247 -83.1109648 42.6981212 248 -82.9178838 40.0415191 249 -82.6321376 27.7929237 250 -82.5131717 27.2612782 251 -82.5104655 27.9407591 252 -82.3659168 29.6156734 253 -82.3343375 34.8083898 254 -82.2729132 28.3329776 255 -81.9179173 41.4553232 256 -81.8115051 26.2448015 257 -81.4806747 41.4622757 258 -81.460856 28.4630493 259 -81.4114142 30.2745944 260 -81.3658911 28.5982484 261 -80.8507878 35.1602871 262 -80.2934522 26.0272663 263 -80.2878794 25.6579955 264 -80.2432839 26.6374761 265 -80.119291 26.147276 266 -80.0870155 26.8598894 267 -80.0775135 26.550341 268 -80.0590804 26.4670801 269 -80.0199562 40.5569121 270 -79.8520818 32.8234848 271 -79.0907202 40.3648363 272 -79.0038698 35.9324676 273 -78.7816219 43.0378104 274 -78.4748392 38.0768734 275 -77.8600012 40.7933949 276 -77.5945435 43.0883566 277 -77.5063739 37.665978 278 -77.4288769 38.8403909 279 -77.3496708 38.9770833 280 -77.1887747 38.7742151 281 -77.1310789 38.8502289 282 -77.0737149 38.9875145 283 -77.0506896 38.7999723 284 -77.0206093 38.8961153 285 -77.004626 39.0207668 286 -76.795547 39.188312 287 -76.7360118 39.3886671 288 -76.5372625 37.1120848 289 -76.0798006 43.0385133 290 -76.0507949 36.8653194 291 -75.432927 40.073467 292 -75.2854622 40.0067785 293 -75.2535203 40.2340101 294 -74.9218324 39.8912248 295 -74.6127133 40.3544185 296 -74.3882072 40.787878 297 -74.2971543 40.727549 298 -74.1533563 40.843339 299 -74.0754189 40.9445428 300 -74.0326395 40.9912087 301 -74.0034415 40.7171017 302 -73.9874105 40.7322535 303 -73.9859414 40.6986772 304 -73.9815337 40.7388319 305 -73.9800645 40.7769059 306 -73.975694 40.8270448 307 -73.8334554 42.7178558 308 -73.7981884 41.0189863 309 -73.7476887 40.7733736 310 -73.6956864 40.6431591 311 -73.6401296 40.6387141 312 -73.583127 40.7487524 313 -73.4673454 40.7764882 314 -73.4615016 41.0837578 315 -73.4313091 41.2141651 316 -73.3590802 41.1270095 317 -73.311394 40.840139 318 -73.2451167 41.1909609 319 -73.1151102 40.8528761 320 -72.7274495 41.7370975 321 -72.5884222 42.3417565 322 -71.7128471 42.2959267 323 -71.5481154 -32.9298971 324 -71.4536835 42.3240042 325 -71.413539 42.482836 326 -71.2319913 42.2931469 327 -71.1956205 42.5047161 328 -71.1240559 42.3421605 329 -71.1032591 42.3647559 330 -70.9407687 42.4592752 331 -70.9286609 42.5278731 332 -70.2881124 41.6524911 333 -70.2568775 43.6629964 334 50.1211829 26.4603617 Problem 4-15 Josephine Mater works for a market research firm that specializes in the food industry. She currently is analyzing Trader Joe's, a national chain of specialty grocery stores. Specifically, Josephine would like to gain insight on Trader Joe's future expansion plans (which are closely guarded by the company). Josephine knows that Trader Joe's replenishes its inventory at its retail stores with frequent trucking shipments from its distribution centers. The file TraderJoes contains data on the location of Trader Joe's retail stores. To keep costs low, retail stores are typically located near a distribution center. Josephine would like to use k means clustering to estimate the location and number of Trader Joe's distribution centers (information on Trader Joe's distribution centers is not publicly disclosed). Click on the datafile logo to reference the data. DATA file How large must k be so that the average distance to each cluster centroid is less than 8 distance units as measured in the original (nonnormalized) coordinates? Be sure to Normalize Input Data and specify 50 iterations and 10 random starts in Step 2 of the XLMiner k Means Clustering procedure. Seven clusters Select your answer Three clusters Five clusters Check My Work (2 remaining) v Seven clusters Eight clusters 0 Ten clusters

Explanation / Answer

We cannot provide soultions using the paid softwares such as XLminer. However we shall provide a solution using the open source package R . The complete R snippet is as follows

# read the data into R dataframe
data.df<- read.csv("C:\Users\586645\Downloads\Chegg\store.csv",header=TRUE)
str(data.df)

# drop the variables not use in clustering
data.df<- data.df[,-c(1,4)]
# normalise the data
data.df<- scale(data.df)

# perform clustering with 5 clusters and 10 starts and 50 iterations
set.seed(20)
storeCluster <- kmeans(data.df, 5, nstart = 10,iter=50)
storeCluster

The results are

> storeCluster
K-means clustering with 5 clusters of sizes 26, 111, 1, 152, 44

Cluster means:
Longitude Latitude
1 -0.9930847 1.4708951
2 1.0065202 0.6230539
3 1.4276869 -11.3209316
4 -0.8009789 -0.3053598
5 0.7822173 -1.1287872

Clustering vector:
[1] 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 4 1 4 4 4 4 1 4 1 4 1 4 4 1 1 4 4 4 4 4 1 4 1 4 4
[41] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
[81] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
[121] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 4 4 4 4 4 4 4 4
[161] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 2 5 2 4 5 5 5 5 5 2 2 2
[201] 2 2 2 2 5 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 2 2 2 2 2 2 2 2 5 2 5 5 5 5
[241] 2 2 2 2 2 2 2 2 5 5 5 5 5 5 2 5 2 5 5 5 5 5 5 5 5 5 5 5 2 5 2 2 2 2 2 2 2 2 2 2
[281] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[321] 2 2 3 2 2 2 2 2 2 2 2 2 2 5

Within cluster sum of squares by cluster:
[1] 1.791132 22.998673 0.000000 21.732823 57.163643
(between_SS / total_SS = 84.4 %)

The goodness of classification is 84.4% , however if we change the number of clusters to 10 this value becomes 96%. hence we shall consider the number of clusters as 10 in this case

> storeCluster <- kmeans(data.df, 10, nstart = 10,iter=50)
> storeCluster
K-means clustering with 10 clusters of sizes 28, 52, 17, 1, 1, 47, 29, 34, 99, 26

Cluster means:
Longitude Latitude
1 0.6729979 -1.3901477
2 -0.9205086 0.1011377
3 0.5521286 -0.5513041
4 7.2748687 -1.7256028
5 1.4276869 -11.3209316
6 1.3233326 0.6866643
7 0.9795524 0.2768490
8 0.5967975 0.8546012
9 -0.7488970 -0.5203826
10 -0.9930847 1.4708951

Clustering vector:
[1] 10 10 10 10 10 10 10 10 2 10 10 10 10 10 10 2 10 2 2 2 2 10 2 10 2 10
[27] 2 2 10 10 2 2 2 2 2 10 2 10 2 2 2 2 2 2 2 2 2 2 2 2 2 2
[53] 2 2 2 2 2 2 2 2 10 2 2 2 9 9 9 9 9 2 2 2 2 9 2 9 9 9
[79] 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
[105] 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
[131] 9 9 9 9 10 10 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 2 2 2 9
[157] 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 2 2 2 1 1 1 1 1
[183] 3 3 3 3 3 3 8 3 8 3 1 1 1 1 1 8 8 8 8 8 8 8 1 8 7 7
[209] 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 3 8 7 7 7 7 8 8 7
[235] 3 7 3 3 1 3 7 7 3 8 8 7 8 7 1 1 1 1 3 1 8 1 6 1 1 1
[261] 3 1 1 1 1 1 1 1 7 3 7 7 6 7 6 6 7 7 7 7 7 7 7 7 7 7
[287] 7 7 6 7 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
[313] 6 6 6 6 6 6 6 6 6 6 5 6 6 6 6 6 6 6 6 6 6 4

Within cluster sum of squares by cluster:
[1] 5.534844 2.997878 2.388979 0.000000 0.000000 1.586215 2.107288 2.662288 3.409009
[10] 1.791132
(between_SS / total_SS = 96.6 %)