LM 3.1

Elsie Sorrell

INTRODUCTION

  • I was part of a group that had the wine dataset in the datasetsICR package

Data Understanding

  • I analyized hue and malic acid variables
  • The dataset has information on 178 wines from three wine cultivators
  • The dataset has 14 total variables

Looking at the first and last 10 rows and structure of the dataset

  • The first 10 observations for hue are mostly in the 1.01 range
  • The first 10 observations for malic acid are less than the last 10 observations
 [1] 1.04 1.05 1.03 0.86 1.04 1.05 1.02 1.06 1.08 1.01
 [1] 0.74 0.67 0.66 0.57 0.62 0.64 0.70 0.59 0.60 0.61
 [1] 1.71 1.78 2.36 1.95 2.59 1.76 1.87 2.15 1.64 1.35
 [1] 2.58 4.60 3.03 2.39 2.51 5.65 3.91 4.28 2.59 4.10
'data.frame':   178 obs. of  14 variables:
 $ Class                       : int  1 1 1 1 1 1 1 1 1 1 ...
 $ Alcohol                     : num  14.2 13.2 13.2 14.4 13.2 ...
 $ Malic acid                  : num  1.71 1.78 2.36 1.95 2.59 1.76 1.87 2.15 1.64 1.35 ...
 $ Ash                         : num  2.43 2.14 2.67 2.5 2.87 2.45 2.45 2.61 2.17 2.27 ...
 $ Alcalinity of ash           : num  15.6 11.2 18.6 16.8 21 15.2 14.6 17.6 14 16 ...
 $ Magnesium                   : int  127 100 101 113 118 112 96 121 97 98 ...
 $ Total phenols               : num  2.8 2.65 2.8 3.85 2.8 3.27 2.5 2.6 2.8 2.98 ...
 $ Flavanoids                  : num  3.06 2.76 3.24 3.49 2.69 3.39 2.52 2.51 2.98 3.15 ...
 $ Nonflavanoid phenols        : num  0.28 0.26 0.3 0.24 0.39 0.34 0.3 0.31 0.29 0.22 ...
 $ Proanthocyanins             : num  2.29 1.28 2.81 2.18 1.82 1.97 1.98 1.25 1.98 1.85 ...
 $ Color intensity             : num  5.64 4.38 5.68 7.8 4.32 6.75 5.25 5.05 5.2 7.22 ...
 $ Hue                         : num  1.04 1.05 1.03 0.86 1.04 1.05 1.02 1.06 1.08 1.01 ...
 $ OD280/OD315 of diluted wines: num  3.92 3.4 3.17 3.45 2.93 2.85 3.58 3.58 2.85 3.55 ...
 $ Proline                     : int  1065 1050 1185 1480 735 1450 1290 1295 1045 1045 ...

Summary statistics

  • The average hue value is 0.95
  • The average Malic acid value is 3.08
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
 0.4800  0.7825  0.9650  0.9574  1.1200  1.7100 
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.740   1.603   1.865   2.336   3.083   5.800 

Creating a Table

  • Class 1 contains 59 different wines
  • Class 2 contains 71 different wines
  • Class 3 contains 48 different wines

 1  2  3 
59 71 48 

Creating a Scatterplot

  • Hue is on the x-axis
  • Malic Acid is on the y-axis
  • The different classes are sorted by color

Interpretation of the first graph

In this dataset, there are three wine cultivators. I am specifically analyzing the hue and malic acid components of the wine. Hue helps describe pH of the wine, and the pH of the wine will describe the color. Malic acid provides a good insight to how acidic the wine will taste. Hue and malic acid are linked because the lower the pH, most likely the higher the malic acid.

Class 1 has a hue value gathered around 1 and malic acid counts gathered around 2. Class 1 will not be the most acidic nor the strongest in color. Class 2 is more scattered across the graph. However, it does generally contain the wines with the highest hue value, and values with the middle or lowest malic acid value. Class 2 is lower in hue, which means it has a lower pH level. This describes the lower malic acid values. Lastly, Class 3 has the lowest hue values, making it the class with the highest pH levels. Class 3 has has the highest malic acid values.

Feedback

  • One of my peers suggested I only look at the hue and malic acid observations when looking at the first and last 10 observations  
  • Intervals on the x-axis are unevenly distributed
  • The y-axis intervals are also unevenly distributed
  • The observations dots needed to be a bigger for ease of understanding

Scatterplot after Feedback

Interpretation of the second graph

  • The wines in Class 1 have a hue value around 1 and malic acid counts around 2. This suggests that Class 1 wines are likely to have a moderate acidity level and may not display the strongest color

  • Class 2 wines are more scattered across the graph but tend to have higher hue values. Additionally, these wines generally show middle to lower malic acid values. The higher hue values in Class 2 indicate lower pH levels, which corresponds to lower acidity

  • Wines in Class 3 have the lowest hue values, indicating higher pH levels. This suggests that Class 3 wines have the highest malic acid values

END