Hours Studied (x): [2, 3, 5, 6, 7, 8, 9, 10, 12, 15]
Exam Scores (y): [55, 60, 68, 72, 75, 78, 82, 85, 90, 95]
Calculate the regression equation and interpret the slope and y-intercept.
Least Squares Regression Line: The line that minimizes the sum of the squares of the vertical distances from each data point to the line. It provides the best linear fit to the data.
Regression Equation: y = mx + b, where m is the slope and b is the y-intercept.
Slope (m): The rate of change of y with respect to x, calculated as m = Σ[(xi - x̄)(yi - ȳ)] / Σ(xi - x̄)².
Y-Intercept (b): The value of y when x = 0, calculated as b = ȳ - mx̄.
- Calculate means: x̄ and ȳ
- Calculate deviations: (xi - x̄) and (yi - ȳ)
- Calculate numerator: Σ[(xi - x̄)(yi - ȳ)]
- Calculate denominator: Σ(xi - x̄)²
- Calculate slope: m = numerator/denominator
- Calculate y-intercept: b = ȳ - mx̄
- Write equation: y = mx + b
x̄ = (2 + 3 + 5 + 6 + 7 + 8 + 9 + 10 + 12 + 15) / 10 = 77 / 10 = 7.7
ȳ = (55 + 60 + 68 + 72 + 75 + 78 + 82 + 85 + 90 + 95) / 10 = 760 / 10 = 76
For each data point, calculate (xi - x̄), (yi - ȳ), and their product:
Example for (2, 55): (2 - 7.7) = -5.7, (55 - 76) = -21, (-5.7)(-21) = 119.7
Continuing for all points: Σ[(xi - x̄)(yi - ȳ)] = 451.0
Σ(xi - x̄)² = (-5.7)² + (-4.7)² + ... + (7.3)² = 144.1
m = 451.0 / 144.1 = 3.13
b = ȳ - mx̄ = 76 - (3.13)(7.7) = 76 - 24.10 = 51.90
y = 3.13x + 51.90
Slope: For each additional hour studied, exam score increases by 3.13 points
Y-Intercept: Students who study 0 hours are predicted to score 51.90 points
Slope: 3.13 points per hour studied
Y-intercept: 51.90 points when x = 0
The equation of the least squares regression line is y = 3.13x + 51.90. The slope of 3.13 indicates that for each additional hour studied, the exam score is predicted to increase by 3.13 points. The y-intercept of 51.90 suggests that students who study 0 hours would be predicted to score 51.90 points.
• Least Squares Formula: Minimizes sum of squared residuals
• Slope Interpretation: Rate of change in y per unit change in x
• Y-Intercept Meaning: Predicted y-value when x = 0
• Regression Line Property: Passes through point (x̄, ȳ)
Correlation Coefficient (r): A measure of the strength and direction of the linear relationship between two variables. Range: -1 ≤ r ≤ 1.
Coefficient of Determination (r²): The proportion of variance in the dependent variable that is explained by the independent variable. Range: 0 ≤ r² ≤ 1.
Strength Interpretation: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak).
From Exercise 1: Σ[(xi - x̄)(yi - ȳ)] = 451.0
Σ(xi - x̄)² = 144.1 (calculated in Exercise 1)
Σ(yi - ȳ)² = (55-76)² + (60-76)² + ... + (95-76)² = 1840
r = 451.0 / √(144.1 × 1840) = 451.0 / √265,144 = 451.0 / 514.92 = 0.876
r² = (0.876)² = 0.767
r = 0.876 indicates a strong positive linear relationship between hours studied and exam scores.
r² = 0.767 means that 76.7% of the variation in exam scores can be explained by the number of hours studied.
With r² = 0.767, the model explains a substantial portion of the variation in exam scores, indicating a good fit.
Determination: r² = 0.767 (76.7% explained)
The correlation coefficient is r = 0.876, indicating a strong positive linear relationship between hours studied and exam scores. The coefficient of determination is r² = 0.767, meaning that 76.7% of the variation in exam scores can be explained by the number of hours studied. This indicates a good model with strong predictive power.
• Correlation Range: -1 ≤ r ≤ 1
• Strength Interpretation: |r| > 0.8 indicates strong relationship
• Coefficient of Determination: r² represents proportion of variance explained
• Positive Correlation: r > 0 indicates direct relationship
1. Predict the exam score for a student who studies 11 hours
2. If a student wants to score at least 85 points, how many hours should they study?
3. Predict the score for 0 hours of study and comment on the result
Discuss the reliability of these predictions.
Prediction: Using the regression equation to estimate the value of the dependent variable (y) for a given value of the independent variable (x).
Interpolation: Making predictions within the range of the observed data, which is generally more reliable.
Extrapolation: Making predictions outside the range of the observed data, which is less reliable.
Prediction Interval: A range of values that estimates where a new observation is likely to fall.
Using y = 3.13x + 51.90 with x = 11:
y = 3.13(11) + 51.90 = 34.43 + 51.90 = 86.33
Predicted score: 86.33 points
Set y = 85 and solve for x:
85 = 3.13x + 51.90
85 - 51.90 = 3.13x
33.10 = 3.13x
x = 33.10 / 3.13 = 10.57
Approximately 10.6 hours of study needed
Using y = 3.13x + 51.90 with x = 0:
y = 3.13(0) + 51.90 = 51.90
Predicted score: 51.90 points
For 11 hours: Interpolation (within data range 2-15), highly reliable
For 85 points: Based on interpolation, reliable
For 0 hours: Extrapolation (outside data range), less reliable
The prediction for 0 hours is questionable since no student in the dataset studied 0 hours. The y-intercept represents a theoretical value rather than an observed relationship.
Predictions should only be made within the range of observed data when possible. The model may not hold for extreme values of x.
85 points: 10.6 hours needed
0 hours: 51.90 points (extrapolation)
1) A student studying 11 hours is predicted to score 86.33 points. 2) To score at least 85 points, a student should study approximately 10.6 hours. 3) A student studying 0 hours is predicted to score 51.90 points, though this extrapolation is less reliable since it's outside the observed data range.
• Interpolation vs Extrapolation: Interpolation is more reliable than extrapolation
• Prediction Accuracy: Depends on correlation strength and data range
• Model Limitations: Be cautious with extreme values
• Practical Interpretation: Consider real-world feasibility of predictions
Linear Regression: A statistical method used to model the relationship between a dependent variable and one or more independent variables by fitting a linear equation to observed data.
Least Squares Method: The approach that minimizes the sum of the squares of the vertical distances from each data point to the regression line.
Regression Line: The straight line that best represents the relationship between variables in a scatterplot.
Correlation Coefficient (r): A measure of the strength and direction of the linear relationship between two variables, ranging from -1 to +1.
Coefficient of Determination (r²): The proportion of variance in the dependent variable that is explained by the independent variable.
Positive Correlation: When variables move in the same direction (r > 0).
Negative Correlation: When variables move in opposite directions (r < 0).
Residual: The difference between the observed value and the predicted value from the regression line.
Interpolation: Making predictions within the range of observed data values.
Extrapolation: Making predictions outside the range of observed data values.
- Data Collection: Gather paired observations of dependent and independent variables
- Scatterplot Creation: Visualize the relationship between variables
- Descriptive Statistics: Calculate means, standard deviations, and basic summaries
- Regression Calculation: Calculate slope and y-intercept using least squares method
- Correlation Assessment: Calculate correlation coefficient and coefficient of determination
- Model Evaluation: Assess the goodness of fit and assumptions
- Prediction: Use the model to make predictions within appropriate bounds
- Interpretation: Explain the practical meaning of the regression parameters
• Regression Equation: y = mx + b
• Slope Formula: m = Σ[(xi - x̄)(yi - ȳ)] / Σ(xi - x̄)²
• Y-Intercept Formula: b = ȳ - mx̄
• Correlation Formula: r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)²Σ(yi - ȳ)²]
• Coefficient of Determination: r² = (correlation coefficient)²
• Correlation Range: -1 ≤ r ≤ 1
• Strength Interpretation: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak)
• Linearity Assumption: Correlation measures only linear relationships
Business Application: Using regression analysis to make informed decisions about resource allocation and forecasting.
Return on Investment (ROI): The financial gain relative to the cost of an investment, which can be estimated using regression models.
Slope (2.8): Each $1,000 increase in advertising leads to $2,800 increase in sales
Y-Intercept (45): Base sales of $45,000 without any advertising
r² = 0.84 means that 84% of the variation in sales can be explained by advertising expenditure. This indicates a very strong model with high predictive power.
Set y = 100 (since y is in thousands) and solve for x:
100 = 2.8x + 45
100 - 45 = 2.8x
55 = 2.8x
x = 55 / 2.8 = 19.64
To achieve $100,000 in sales, the company should spend approximately $19,640 on advertising.
With r² = 0.84, the model explains 84% of the variance in sales, indicating high effectiveness. Only 16% of the variation remains unexplained by advertising expenditure.
The model suggests a strong positive return on advertising investment (ROI of 2.8:1), making it valuable for budget planning and sales forecasting.
$100K sales requires $19.64K advertising
Strong model effectiveness
The regression model is highly effective with r² = 0.84, explaining 84% of the variation in sales. To achieve $100,000 in sales, the company should spend approximately $19,640 on advertising. The model shows a strong positive relationship with an ROI of 2.8:1 for advertising investment.
• Business Interpretation: Relate slope and intercept to practical business metrics
• Model Effectiveness: Higher r² indicates better predictive power
• Return on Investment: Use slope to estimate ROI
• Prediction Accuracy: Consider the model's r² when making forecasts
Negative Correlation: A relationship where one variable increases as the other decreases, indicated by a negative slope.
Model Limitations: Constraints on the applicability of a regression model, including range restrictions and assumptions.
y = -1.2(15) + 85 = -18 + 85 = 67
Predicted sales: $6,700 (since y is in hundreds)
y = -1.2(25) + 85 = -30 + 85 = 55
Predicted sales: $5,500
y = -1.2(35) + 85 = -42 + 85 = 43
Predicted sales: $4,300
Set y = 500 (since $50,000 = 500 hundreds) and solve for x:
500 = -1.2x + 85
500 - 85 = -1.2x
415 = -1.2x
x = 415 / (-1.2) = -345.83°C
The prediction for $50,000 sales yields an impossible temperature of -345.83°C, indicating the model breaks down for extreme values.
The model shows decreasing sales with increasing temperature, which is counterintuitive for ice cream sales. The model is likely only valid within a specific temperature range where the relationship holds.
25°C: $5,500
35°C: $4,300
$50K sales: -345.83°C (impossible)
Predictions: 15°C → $6,700, 25°C → $5,500, 35°C → $4,300. The model predicts that $50,000 in sales would require an impossible temperature of -345.83°C. This indicates the model has significant limitations and may not be appropriate for the given scenario, as ice cream sales typically increase with temperature.
• Model Validity: Check if predictions make practical sense
• Contextual Relevance: Ensure the model aligns with real-world expectations
• Extreme Value Warning: Be cautious of predictions that yield impossible results
• Domain Knowledge: Use practical knowledge to assess model appropriateness
Linear Regression: A statistical method used to model the relationship between a dependent variable (y) and one independent variable (x) by fitting a linear equation to observed data. It aims to find the line that best represents the relationship between variables.
Least Squares Method: The mathematical approach that finds the regression line by minimizing the sum of the squares of the vertical distances (residuals) from each data point to the line. This ensures the best possible fit to the data.
Regression Line: The straight line that best represents the relationship between two variables in a scatterplot. It is determined by the equation y = mx + b, where m is the slope and b is the y-intercept.
Slope (m): The rate of change of the dependent variable (y) with respect to the independent variable (x). It represents the steepness of the regression line and indicates the direction and strength of the relationship.
Y-Intercept (b): The value of the dependent variable (y) when the independent variable (x) equals zero. It represents the baseline value of the dependent variable.
Correlation Coefficient (r): A measure of the strength and direction of the linear relationship between two variables. It ranges from -1 to +1, where values closer to the extremes indicate stronger relationships.
Coefficient of Determination (r²): The proportion of variance in the dependent variable that is explained by the independent variable. It ranges from 0 to 1, with higher values indicating better model fit.
Positive Correlation: A relationship where both variables tend to increase together, indicated by a positive correlation coefficient.
Negative Correlation: A relationship where one variable increases as the other decreases, indicated by a negative correlation coefficient.
Residual: The difference between the observed value of the dependent variable and the value predicted by the regression line. Residual = Observed - Predicted.
Interpolation: Making predictions using the regression model within the range of the observed data values, which is generally more reliable.
Extrapolation: Making predictions using the regression model outside the range of the observed data values, which is less reliable and should be done cautiously.
- Data Collection: Gather paired observations of the dependent and independent variables
- Data Visualization: Create a scatterplot to visually inspect the relationship
- Descriptive Statistics: Calculate means, standard deviations, and basic summaries
- Regression Calculation: Calculate slope and y-intercept using the least squares formulas
- Correlation Assessment: Calculate correlation coefficient and coefficient of determination
- Model Evaluation: Assess the goodness of fit and check assumptions
- Residual Analysis: Examine residuals for patterns or systematic errors
- Prediction: Use the model to make predictions within appropriate bounds
- Interpretation: Explain the practical meaning of the regression parameters
- Validation: Consider the model's limitations and scope of applicability
• Regression Equation: y = mx + b
• Slope Formula: m = Σ[(xi - x̄)(yi - ȳ)] / Σ(xi - x̄)²
• Y-Intercept Formula: b = ȳ - mx̄
• Correlation Formula: r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)²Σ(yi - ȳ)²]
• Coefficient of Determination: r² = (correlation coefficient)²
• Correlation Range: -1 ≤ r ≤ 1
• Strength Interpretation: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak)
• Linearity Assumption: Correlation measures only linear relationships
• Regression Line Property: Passes through point (x̄, ȳ)
• Sum of Residuals: Equals zero for least squares regression
Intercept: Value of y when x = 0
Correlation: Strength and direction of relationship
Determination: Proportion of variance explained