title: Applying K-means clustering on Z-score Normalized Data
body: <p>I've been working to understand how to apply k-means clustering to a small set of data for a list of companies.</p>
  
  <p>The mean and standard deviation is given so that I can determine the normalized data.</p>
  
  <p>For example, I have the following:</p>
  
  <p><img src="https://i.stack.imgur.com/W2nRX.png" alt="zscore"></p>
  
  <p>From my understanding of k-means clustering, I have to randomly find the centroids, where k = 3. I have to keep adjusting the centroid locations until no more movements are possible, that is the data remains the same after a certain result is met. </p>
  
  <p>I am having difficulty applying these procedures to my data set. I've watched and searched for many examples on how to accomplish this, step by step, but I haven't had any success that allows me to understand. </p>
  
  <p>Basically what I am suppose to do is show a scatter plot at each adjustment to the centroid. </p>
  
  <p>I believe that I have to calculate the distance between two data items using the Euclidean distance algorithm, but does that mean the distance between z-score sales and z-score fuel, or what? This is why I am lost, even after I've read through about a dozen powerpoints and watched multiple videos.</p>
  
  <p>This seems to be the best example I've come across, but even then, I'm still a bit lost due to my example being slightly different than the one introduced: <a href="http://www.indiana.edu/~dll/Q530/Q530_kk.pdf" rel="nofollow noreferrer">http://www.indiana.edu/~dll/Q530/Q530_kk.pdf</a></p>
  
  <p>The most progress I've made was coming across a variety of data mining software, such as WEKA, Orange, various Excel add-ons such as XLMiner, etc. However, they seem to provide the end result, not the procedures required to get there.</p>
  
  <p>Any help is appreciated. If more information is needed, please let me know.</p>
  
  <p>Thank you. </p>
  
  <p><strong>Edit:</strong> I've found some more solutions and thought I should add in the event anyone runs into the same issues.</p>
  
  <p>1) I calculated the Euclidean distance using this Excel formula mentioned on this video: <a href="http://www.lynda.com/Excel-tutorials/Calculating-distance-centroid/165438/175003-4.html" rel="nofollow noreferrer">http://www.lynda.com/Excel-tutorials/Calculating-distance-centroid/165438/175003-4.html</a>  </p>
  
  <hr>
  
  <p>This is what the formula looks like: <code>=SQRT((B28-$B$52)^2+(C28-$C$52)^2)</code> keeping in mind that each cell represents where your data is contained. </p>
  
  <p>In this case my cells are listed in the image here: <a href="https://i.imgur.com/W44km64.png" rel="nofollow noreferrer">http://i.imgur.com/W44km64.png</a></p>
  
  <p>This has given me the following table: <a href="https://i.imgur.com/miTiVj5.png" rel="nofollow noreferrer">http://i.imgur.com/miTiVj5.png</a></p>
  
  <hr>