In this comprehensive analysis, I will explore the relationship between advertising expenses and company sales. Using an R script, I will generate a scatter plot to visualize the data and assess its linearity. To measure the correlation strength, I will calculate the Pearson correlation coefficient and Spearman's ρ, and then test if the correlation differs significantly from zero. By fitting a least squares regression line, I will determine the coefficient of determination and test the significance of the advertising expenses coefficient. I will also examine the residuals and make predictions using confidence and prediction intervals. To enhance the scatter plot, I will include the fitted line, confidence bands, and prediction bands.
In the second part of the analysis, I will shift my focus to the log returns of Intel and Citigroup stocks. I will perform regression analyses with and without an intercept, calculate the Pearson correlation coefficient and Kendall's τ, and test the significance of the correlation. To broaden the scope, I will expand the model to include other stock returns. I will present the fitted model explicitly and determine the adjusted coefficient of determination. To identify the preferred model, I will conduct model selection using the Akaike information criterion, employing bidirectional and forward selection methods.