Comprehensive Analysis of Simple Linear Regression for Income Prediction
Conceptual Foundations of Simple Linear Regression
Simple linear regression is a fundamental statistical method used to model and analyze the relationship between two quantitative variables. It specifically examines how a single independent variable, often denoted as , influences or predicts a dependent variable, denoted as . The term linear implies that the model assumes a straight-line relationship between the variables, while simple indicates that there is only one explanatory variable involved. In the context of the provided application, the independent variable represents the number of years of study after the Baccalaureate (Années d'études après le BAC), and the dependent variable represents the income in thousands of Moroccan Dirhams (Revenu en milliers de MAD). The primary objective of this method is to find the best-fitting line that minimizes the vertical distances (residuals) between the observed data points and the line itself, allowing researchers to estimate the effect of education on income levels and make predictions for future values.
Mathematical Specification of the Regression Model
The theoretical population model for simple linear regression is expressed by the following equation:
In this specification, is the observed value of the dependent variable for the -th observation. The parameter is the intercept, representing the value of when . The parameter is the slope coefficient, which measures the average change in the dependent variable for every one-unit increase in the independent variable . The term represents the stochastic error or disturbance term, capturing all factors other than that influence , as well as measurement errors. For estimation purposes using a sample of size , we use the estimated regression equation:
Here, is the predicted value of the income, and the hats over the beta parameters indicate that these are estimates derived from the specific dataset provided.
Data Summary and Parameter Estimation via OLS
To estimate the parameters and , we employ the Ordinary Least Squares (OLS) method, which minimizes the sum of squared residuals. Based on the provided dataset with five observations (), the key mathematical components are calculated as follows:
Observations for Years of Study ():
Observations for Income ( in thousands of MAD):
Sum of :
Sum of :
Means: and
Sum of Squares and Cross-products: and
The slope estimate is calculated using the formula:
The intercept estimate is calculated using the formula:
The resulting estimated model is: .
Inference: Confidence Intervals and Hypothesis Testing
Statistical inference involves determining the reliability of the estimated coefficients. The point estimates for and are and respectively. To construct an interval estimate, we use the standard error of the coefficients and the student's -distribution with degrees of freedom. The confidence interval is defined as:
Hypothesis testing involves two main approaches: the Confidence Interval approach and the Significance Test (p-value/t-stat) approach. For the slope , the null hypothesis is typically (no relationship), against . If the confidence interval does not contain zero, we reject the null hypothesis. Similarly, we calculate the observed t-statistic:
If , the coefficient is deemed statistically significant, meaning the number of years of study has a statistically documented impact on income.
Model Quality and The Coefficient of Determination
Evaluating the quality of the model involves measuring how well the regression line represents the data. This is primarily done using the Coefficient of Determination, denoted as . It is defined as the proportion of the total variation in the dependent variable () that is explained by the regression model (). The formula is:
Where is the Regression Sum of Squares, is the Error Sum of Squares, and is the Total Sum of Squares. The value of ranges from to . In this application, a high value (expected to be near given the linear trend in the data) would indicate that years of study are a very strong predictor of income variance. Interpretation: "Approximately of the variation in employee income is explained by the number of years of post-BAC study."
Global Significance and Analysis of Variance (ANOVA)
The global significance of the model is evaluated using the Fisher test (-test). While in simple linear regression the -test is equivalent to the square of the -test for the slope, it is formally used to test the null hypothesis that all slope coefficients in the model are zero. The -statistic is calculated as:
Where is the number of independent variables (here ). A significant -statistic (where ) implies that the model as a whole is useful and provides a better fit than a model with no predictors. This confirms that the linear relationship captured is not merely a product of chance.
Software Analysis and Implementation
The final step in modern econometric analysis is the mobilization of software such as Microsoft Excel (Data Analysis Toolpak), SPSS, R, or Python (Statsmodels/Scikit-learn). These tools automate the calculation of residuals, standard errors, p-values, and the ANOVA table. Software allows for the generation of residual plots to verify the assumptions of the classical linear regression model (homoscedasticity, normality, and absence of autocorrelation). In a professional context, a software-generated output would provide a concise summary including the coefficients ( and ), the standard error, the t-stat, the p-values, and the R-squared value, which facilitates rapid interpretation and decision-making for 2025 financial planning or human resource analysis.