Red Wine Quality: What Makes It Good?
Wine folks obsess over quality—it's what keeps drinkers happy and brands solid. I took a
crack at the Red Wine Quality dataset, using data analysis and some machine learning to figure out what makes a
red wine tick. The plan? Dig into the chemical makeup—like acidity and alcohol—and see how it ties to that 0-10
quality score.

What I Did
- Data Setup: Grabbed a dataset with 11 chemical traits (think acidity, sugar, alcohol) and quality ratings for red wines. Cleaned it up, scaled the numbers, and kicked out duplicates.
- Exploration: Plotted histograms and heatmaps to spot patterns—like how alcohol and acidity play with quality.
- Stats Dive: Ran correlation tests (Pearson's) to nail down key links, like alcohol boosting quality or volatile acidity dragging it down.
- Modeling: Built linear regression models to predict quality and alcohol content from the chemical stuff. Checked how well they fit with R-squared and p-values.
- Results: Quality model explained 35% of the variance—decent, not amazing. Alcohol model hit 72%, way stronger. Alcohol and acidity were the stars.
How It Went
Our data prep started with 1,599 wines, trimmed 240 duplicates, leaving 1,359 unique ones. No missing
data—nice. Features like volatile acidity (0.12-1.58) and alcohol (8.4-14.9%) had wild ranges. Log-transformed
the skewed ones to tame outliers (dropped from 502 to 360).
EDA showed most traits skew right—lots of wines cluster low on sugar or sulfur, few go extreme. Quality's
bell-shaped around 5-6. Heatmaps flagged alcohol (positive) and volatile acidity (negative) as big quality
players. Stats confirmed alcohol's link to quality (r = 0.48, p ≈ 0) and volatile acidity's drag (r = -0.40, p
≈ 0). Fixed acidity and citric acid vibe together (r = 0.66), and citric acid lowers pH (r = -0.55). All super
significant.
Why It Matters
This shows what's behind a good red—alcohol lifts it, too much volatile acidity tanks it. Winemakers could
tweak these to up their game, and the models (especially for alcohol) give a decent guess at what's in the
bottle. It's not perfect—35% for quality leaves room to grow—but it's a solid start.
What the Data Showed