Professional Documents
Culture Documents
BAM3 Lesson03.1 LinearRegression
BAM3 Lesson03.1 LinearRegression
1
Linear Regression
https://www.youtube.com/watch?v=cRCWYj5f6z0
Bordeaux Wine
• Large difference in price and
quality between years,
although wine in produced in
a similar way
• Meant to be aged, so hard to
tell if wine will be good when
it is on the market
• Expert tasters predict which
ones will be good
• Can analytics be used to
come up with the different
system for judging wine?
Bordeaux Wine (cont.)
• On March 1990, Orley
Ashenfelter, a Princeton
economics professor, claims
he can predict wine quality
without tasting the wine.
• Ashenfelter uses a method
called linear regression
• Predicts an outcome variable,
or dependent variable
• Predicts using a set of
independent variables
Bordeaux Wine (cont.)
Dependent variable: typical price in 1990-1991
wine auctions (approximates quality)
Independent variables:
• Age (older wines are more expensive)
• Weather (Average Growing Season Temperature,
Harvest Rain, and Winter Rain)
Getting Started
Go to schoology.com > DAY THREE and
download wine.csv, then load it into RStudio
using the following command:
cor(wine$Age, wine$FrancePop)
[1] -0.9944851