StatisticsUnit 610 min read
Correlation: Scatter Diagrams, Karl Pearson's and Spearman's Coefficients
Unit 6 of Statistics: covers the study of the relationship between two variables, focusing on the direction and strength of their association using graphical and mathematical methods.
Key points
- Correlation measures the degree of linear relationship between two quantitative variables.
- Scatter diagrams provide a visual representation of the relationship before calculation.
- Karl Pearson's coefficient is used for quantitative data with a linear relationship.
- Spearman's Rank correlation is used for qualitative data or non-linear monotonic relationships.
- The correlation coefficient \( r \) always ranges between \(-1\) and \(+1\).
- Correlation does not imply causation; it only shows a statistical association.
Introduction to Correlation
In the hospitality industry, managers often need to understand how one factor affects another. For example, does increasing the advertising budget lead to more room bookings? Does the temperature outside affect the sale of cold beverages in a hotel restaurant? This study of the relationship between two variables is called Correlation.
Definition: Correlation is a statistical tool that describes the strength and direction of the relationship between two variables. If two variables move together (either in the same or opposite direction), they are said to be correlated.
Types of Correlation
Correlation can be classified based on direction and number of variables:
- Positive Correlation: When both variables move in the same direction. (e.g., As the number of guests increases, the total food revenue increases).
- Negative Correlation: When variables move in opposite directions. (e.g., As the price of a luxury suite increases, the number of bookings may decrease).
- Zero Correlation: When there is no linear relationship between variables. (e.g., The shoe size of a guest and their room service spending).
Scatter Diagram
A scatter diagram is a graphical representation of the relationship between two variables. The independent variable is usually plotted on the X-axis and the dependent variable on the Y-axis.
- Upward slope: Indicates positive correlation.
- Downward slope: Indicates negative correlation.
- Random dots: Indicates zero correlation.
Karl Pearson's Coefficient of Correlation
Karl Pearson's coefficient, denoted by , is the most widely used measure of linear correlation. It measures the strength and direction of the linear relationship between two quantitative variables.
Formula
The formula for the correlation coefficient is:
Alternatively, the computational formula is:
Where:
- = Number of pairs of observations
- = Sum of the product of x and y
- = Sum of x and y values respectively
- = Sum of squares of x and y values
Interpretation of
| Value of | Interpretation |
|---|---|
| Perfect Positive Correlation | |
| to | High Positive Correlation |
| to | Moderate Positive Correlation |
| to | Low Positive Correlation |
| No Correlation | |
| to | Low Negative Correlation |
| to | Moderate Negative Correlation |
| to | High Negative Correlation |
| Perfect Negative Correlation |
Worked Example 1: Hotel Staffing and Guest Satisfaction
A hotel manager wants to see if there is a correlation between the number of staff members on a shift () and the guest satisfaction score () out of 10.
Data:
| Shift | Staff () | Score () |
|---|---|---|
| 1 | 5 | 6 |
| 2 | 8 | 8 |
| 3 | 10 | 9 |
| 4 | 12 | 8 |
| 5 | 15 | 10 |
Step-by-step Calculation:
- Create a calculation table:
| 5 | 6 | 25 | 36 | 30 |
| 8 | 8 | 64 | 64 | 64 |
| 10 | 9 | 100 | 81 | 90 |
| 12 | 8 | 144 | 64 | 96 |
| 15 | 10 | 225 | 100 | 150 |
- Apply the formula:
Conclusion: There is a high positive correlation () between the number of staff and guest satisfaction.
Spearman's Rank Correlation Coefficient
When data is qualitative (e.g., beauty, honesty, taste) or when the relationship is not linear, we use Spearman's Rank Correlation ().
Formula
Where:
- = Difference between the ranks of the two variables ()
- = Number of pairs of observations
Worked Example 2: Taste and Presentation
Two judges rank 5 dishes based on Taste () and Presentation ().
Data:
| Dish | Judge X Rank | Judge Y Rank |
|---|---|---|
| A | 1 | 2 |
| B | 2 | 1 |
| C | 3 | 4 |
| D | 4 | 3 |
| E | 5 | 5 |
Step-by-step Calculation:
- Calculate and :
| Dish | ||||
|---|---|---|---|---|
| A | 1 | 2 | -1 | 1 |
| B | 2 | 1 | 1 | 1 |
| C | 3 | 4 | -1 | 1 |
| D | 4 | 3 | 1 | 1 |
| E | 5 | 5 | 0 | 0 |
- Apply the formula:
Conclusion: There is a strong positive correlation () between the two judges' rankings.
Comparison: Karl Pearson vs. Spearman
| Feature | Karl Pearson () | Spearman () |
|---|---|---|
| Data Type | Quantitative (Interval/Ratio) | Qualitative or Quantitative (Ordinal) |
| Relationship | Must be Linear | Must be Monotonic |
| Sensitivity | Sensitive to outliers | Less sensitive to outliers |
| Requirement | Requires actual values | Requires ranks |
| Calculation | More complex (means, variances) | Simpler (differences in ranks) |
Advantages and Applications
Advantages
- Predictive Power: Helps in forecasting trends (e.g., predicting room demand based on flight arrivals).
- Efficiency: Identifies redundant variables in a business process.
- Validation: Confirms if a change in one variable is associated with a change in another.
Applications in Hotel Management
- Revenue Management: Correlating room rates with occupancy percentages to find the optimal price.
- HR Management: Correlating employee training hours with the number of customer complaints.
- Marketing: Correlating social media engagement (likes/shares) with the number of direct bookings.
In the real world
- Pathao/InDrive: These apps use correlation to determine "Surge Pricing." They analyze the correlation between the number of active riders (demand) and the number of available drivers (supply) in a specific area of Kathmandu. When the correlation shows a high demand but low supply, the price increases.
- NEPSE (Nepal Stock Exchange): Investors use correlation to diversify their portfolios. They look for stocks that have a negative correlation with each other. For example, if a hydropower stock goes down, they might hold a commercial bank stock that doesn't move in the same direction, reducing their overall risk.
- Daraz: Daraz uses correlation analysis to power its "Frequently Bought Together" section. If the data shows a high positive correlation between people buying a "Smartphone" and a "Screen Protector," the system automatically suggests the protector to anyone buying a phone.
Exam tip
When solving correlation problems in the TU/PU board exams, follow these rules to ensure full marks:
- Always draw the table clearly. Use a ruler. If the question asks for Karl Pearson, include columns for and .
- State the formula first. Never jump straight to the numbers. Write the general formula and then substitute the values.
- Interpret the result. Do not just write . Write: "Since , there is a high degree of positive correlation between [Variable X] and [Variable Y]."
- Check the range. If your answer is or , you have made a calculation error. and can never be outside the range of to .
- Rank Order: In Spearman's correlation, remember that the highest value gets Rank 1 (unless specified otherwise). Be consistent.
Based on the TU BHM syllabus for Statistics (STT311), unit 6.
Discussion
Loading…