Week 11 - Understanding Correlation and Regression for Business Decisions in Business

Introduction and Learning Objectives

  • Presenter: Petar Zivkovic
  • Date: 02.06.2026
  • Theme: Understanding relationships in data to make better business decisions using correlation and regression.
  • Agenda:
    • Key Concepts: Variables and Relationships.
    • Measuring Relationships: Correlation and Covariance.
    • Building regression models to quantify effects.
    • Evaluating model quality: R2R^2, residuals, and assumptions.
    • Real-world applications: Business examples.
  • Core Learning Objectives:
    • Identify and interpret relationships between variables within a business context.
    • Develop and apply regression models to explain and predict specific outcomes.
    • Assess the reliability and quality of regression models to support data-driven decision-making processes.

Bivariate Analysis

  • Definition: Bivariate analysis is the study of the relationship between exactly two variables.
  • Primary Goal: To explore if and how two variables are related, associated, or influence one another.
  • Applications in Hospitality:
    • Analyzing guest age and the likelihood to book a spa treatment.
    • Analyzing room type and its effect on satisfaction ratings.
    • Analyzing guest nationality and breakfast preference.
    • Analyzing staff experience levels and the rate of guest complaints.
  • Relationship to Multivariate Analysis: Bivariate analysis serves as a foundational step. Multivariate analysis moves further by examining how multiple variables interact simultaneously (e.g., how age, nationality, and income level together influence booking behavior).

Key Roles of Variables

  • Independent Variable (XX):
    • Alternative Names: Predictor variable, Explanatory variable, Input, Feature.
    • Purpose: The variable believed to influence or explain changes in another variable.
    • Hospitality Example: Room rate.
  • Dependent Variable (YY):
    • Alternative Names: Response variable, Outcome variable, Output, Target.
    • Purpose: The variable the researcher is attempting to understand, predict, or explain.
    • Hospitality Example: Customer satisfaction.
  • Analysis Comparison:
    • Bivariate Analysis: One independent variable (XX) and one dependent variable (YY). Example: Y=Customer satisfactionY = \text{Customer satisfaction}, X=Room rateX = \text{Room rate}.
    • Multivariate Analysis: One dependent variable (YY) and two or more independent variables (X1,X2,,XnX_1, X_2, \dots, X_n). Example: Y=Customer satisfactionY = \text{Customer satisfaction}, X1=Room rateX_1 = \text{Room rate}, X2=Staff friendlinessX_2 = \text{Staff friendliness}, X3=Room cleanlinessX_3 = \text{Room cleanliness}.
  • Assignment of Roles:
    • Prediction: YY is the target to be predicted; XX is the input used for prediction.
    • Causal Analysis: XX is explicitly assumed to affect YY (e.g., more amenities leads to higher satisfaction).
    • Exploration: Roles are not always strict; tools like pairplots or correlation matrices may treat all variables equally.

Statistical Indicators for Measuring Relationships

  • Covariance:
    • Formula: Cov(x,y)=1n1i=1n(xixˉ)(yiyˉ)\text{Cov}(x,y) = \frac{1}{n-1} \sum_{i=1}^{n} (x_i - \bar{x})(y_i - \bar{y})
    • Excel Function: COVARIANCE.S(range1, range2)
    • Usage: Measures how two variables change together. Positive values indicate they move in the same direction; negative values indicate they move in opposite directions.
  • Correlation (rr):
    • Formula: r=Cov(x,y)sx×syr = \frac{\text{Cov}(x,y)}{s_x \times s_y}
    • Excel Function: CORREL(range1, range2)
    • Usage: Standardizes covariance to a scale of 1-1 to 11. It shows the strength and direction of a linear relationship.
  • Interpreting Correlation:
    • Range: 1-1 to 11. Positive means same direction; negative means opposite direction; near 00 means weak or no linear relationship.
    • Linearity: Correlation only measures linear relationships. Data must be visualized with scatterplots to confirm linearity.
    • Outliers: Unusual data points can distort correlation values, necessitating investigation through scatterplots.
    • Causation: Correlation does not imply causation.
    • Business Uses: Standardized metrics allow for comparing relationship strengths across different variables, help prioritize variables for predictive modeling, and reveal patterns for business insights.

Qualitative Mechanics of Correlation and Covariance

  • Deviation Interaction:
    • Positive deviation from xx and positive deviation from yy results in a positive (++) overall effect.
    • Negative deviation from xx and negative deviation from yy results in a positive (++) overall effect.
    • Positive deviation from xx and negative deviation from yy results in a negative (-) overall effect.
    • Negative deviation from xx and positive deviation from yy results in a negative (-) overall effect.
  • Strength Identification: Correlation is used specifically to determine if a relationship is strong or weak, which covariance alone cannot signify because covariance is not standardized.

Causation vs. Coincidence

  • The Principle: Correlation is not causation.
  • Example Case: A graph showing a high correlation between "Divorce rate in Maine" and "Per capita consumption of margarine (US)".
    • Conclusion: While variations in divorce rate and margarine consumption appear synchronized, there is no causal link; the relationship is a pure coincidence.

Regression Analysis Objectives

  • Test and Quantify Relationships:
    • Existence: Use significance tests like p-values and t-tests to determine if an XYX-Y relationship exists.
    • Impact: Use regression coefficients (β\beta) to interpret the amount YY changes when XX changes.
  • Evaluate Model Quality:
    • Fit: Evaluate model fit using R2R^2 or adjusted R2R^2.
    • Residuals: Inspect residuals for patterns.
    • Reliability: Check for outliers and verify regression assumptions.
  • Predict Outcomes:
    • Forecasting: Use the regression equation y^=b0+b1x\hat{y} = b_0 + b_1 x to estimate the value of YY based on known inputs (XX).

The Linear Regression Model and Equation

  • Conceptual Model: y=β0+β1x+νy = \beta_0 + \beta_1 x + \nu
  • Estimated Regression Equation: y^=b0+b1x\hat{y} = b_0 + b_1 x
  • Least Squares Criterion: This method finds values for b0b_0 and b1b_1 that minimize the sum of squared residuals: (yiy^i)2\sum (y_i - \hat{y}_i)^2.
  • Calculations:
    • b1=(xixˉ)(yiyˉ)(xixˉ)2b_1 = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2}
    • b0=yˉb1xˉb_0 = \bar{y} - b_1 \bar{x}
  • Visualization of the Equation:
    • Slope (b1b_1): Δy^/Δx\Delta \hat{y} / \Delta x. Represents the change in the predicted value of YY for every one-unit increase in XX.
    • Intercept (b0b_0): The value of YY when X=0X = 0.

Business Examples of Regression

  • Battery Degradation:
    • Model: Battery Range (miles)=β0+β1×Mileage+ν\text{Battery Range (miles)} = \beta_0 + \beta_1 \times \text{Mileage} + \nu
    • Interpretation: If b1=0.02b_1 = -0.02 and p-value = 0.010.01, the result is significant. Battery range decreases as mileage increases.
  • Hotel Room Price:
    • Model: \text{Room Price ($)} = \beta_0 + \beta_1 \times \text{Distance from beach (km)} + \nu
    • Interpretation: If b1=5b_1 = -5 and p-value = 0.200.20, the result is not significant (Accept H0H_0). Distance from the beach does not significantly affect room price in this model.
  • House Price Prediction:
    • Model: \text{House Price ($)} = \beta_0 + \beta_1 \times \text{Square Footage} + \nu
    • Interpretation: If b1=150b_1 = 150 and p-value = 0.0050.005, the result is significant. House price increases significantly by $150\$150 for every additional square foot.

Types of Regression Relationships

  • Positive Linear Relationship: Upward straight line (H1H_1 holds).
  • Negative Linear Relationship: Downward straight line (H1H_1 holds).
  • Positive Curvilinear Relationship: Upward curve.
  • Negative Curvilinear Relationship: Downward curve.
  • U-shaped Curvilinear Relationship: A parabolic curve.
  • No Relationship: Flat line or scattered data points with no trend (H0H_0 holds).

Hypothesis Testing and the t-Test

  • Null Hypothesis (H0H_0): β1=0\beta_1 = 0. Suggests there is no slope and therefore no relationship between the variables.
  • Alternative Hypothesis (H1H_1): β10\beta_1 \neq 0. Suggests a significant slope exists, indicating a relationship.
  • Test Statistic: t=b1sb1t = \frac{b_1}{s_{b_1}}
  • Decision Rule: Accept H0H_0 (proving no relationship) if the p-value is greater than the Significance Level (SL). Reject H0H_0 (confirming a relationship) if the p-value is less than or equal to the SL.

ANOVA and the Coefficient of Determination (R2R^2)

  • R2R^2 Definition: Measures the proportion of variation in the dependent variable that is explained by the independent variable in the model.
  • Formula: R2=Variation explained by regressionTotal variation in Y=SSRSST=(y^iyˉ)2(yiyˉ)2R^2 = \frac{\text{Variation explained by regression}}{\text{Total variation in } Y} = \frac{SSR}{SST} = \frac{\sum (\hat{y}_i - \bar{y})^2}{\sum (y_i - \bar{y})^2}
  • Variables:
    • yiy_i: The actual measured value.
    • y^i\hat{y}_i: The predicted value from the regression line.
    • yˉ\bar{y}: The average value of all actual measured points.
  • Sum of Squares Components:
    • Total Sum of Squares (SST): (yiyˉ)2\sum (y_i - \bar{y})^2. Represents the total variation in the data.
    • Error Sum of Squares (SSE): (yiy^i)2\sum (y_i - \hat{y}_i)^2. Represents variation not explained by the model.
    • Regression Sum of Squares (SSR): (y^iyˉ)2\sum (\hat{y}_i - \bar{y})^2. Represents variation explained by the relationship between XX and YY.

Model Assumptions

The validity of the regression model y=β0+β1x+νy = \beta_0 + \beta_1 x + \nu relies on four assumptions about the error term (nu/epsilon):

  1. Expected Value: The error term is a random variable with an expected value (mean) of zero: E(ν)=0E(\nu) = 0.
  2. Independence: The values of error terms are independent of each other.
  3. Normality: The error term is normally distributed.
  4. Constant Variance: The variance of the error term, denoted by σ2\sigma^2, is the same for all values of xx (Homoscedasticity).

Outliers

  • Definition: An outlier is a data point that deviates significantly from the trend shown by the rest of the observations.
  • Handling Outliers:
    • Erroneous Data: If caused by error, they should be corrected.
    • Assumption Violation: If they signal the model is incorrect, a different model should be considered.
    • Chance Occurrence: If they are valid unusual values occurring by chance, they should be retained.
  • Detection: Standardized residuals are used to identify outliers. Any observation with a standardized residual less than 3-3 or greater than +3+3 is classified as an outlier.