In-Class Exercise 6
Shih Chien University
2026-09-16
A retailer records its monthly advertising expenditure (in NT$10,000) and sales revenue (in NT$100,000) for ten months.
Scatter Plot
Draw a scatter plot of sales against ads with ggplot() and geom_point(), and add the least-squares line with geom_smooth(method = "lm", se = FALSE).
Describe the direction and the strength of the relationship in one sentence.
Correlation Coefficient
cor().Testing the Significance of r
Test H_0\text{: }\rho=0 against H_1\text{: }\rho\neq0 at \alpha=0.05.
qt() and d.f.=n-2.cor.test(ads, sales), then state the conclusion.Elementary Statistics: A Step by Step Approach