STAT1430.01–Lecture5–Correlation and Regression Jan 22, 2019
•Coffee sales at football games
oSuppose you are the concessions manager for the Buffalo Bills, and you need to
make enough coffee to supply the demand at the game.
oHow much coffee should you make?
•Step 1: What can help predict coffee sales?
oAvailability/easy to get
oSales of other products
•Collect DATA: Make a scatter plot
o !(Powerpoint, page4)
oThe higher is the temperature, less coffee is sold.
•Interpreting a scatterplot
oDescribe the relationship between X(Temperature)and Y(Coffee)
▪Simplest General Pattern
•Uphill or Downhill (as moving left to the right)
•How closely the data follow the pattern
•Quantifying the straight line relationship: Correlation
Step 1: what can help predict coffee sales: availability/easy to get, game attendance, sales of other products, temperature . Collect data: make a scatter plot (powerpoint, page4: the higher is the temperature, less coffee is sold. Interpreting a scatterplot: describe the relationship between x(temperature)and y(coffee, simplest general pattern. Linear: direction, uphill or downhill (as moving left to the right, strength, how closely the data follow the pattern, quantifying the straight line relationship: correlation, notation: r . N i=1 (xi x )(yi y) n 1. N i=1 (xi x )(yi y) (xi x )2 (yi y)2 (don"t use for manual calculation: interpretation, hour x and y move together compared separately (focusing on linear relationship or not) Interpreting correlation: -1 r 1, +1 = perfect uphill linear relationship, -1 = perfect downhill linear relationship. Example: target vs. walmart: correlations: target, walmart, pearson correlation of target and walmart = 0. 659 =r.