开始使用免费开始使用

Nonlinear relationship

Covariance and correlation measure the strength of a linear relationship.

If these metrics are low, it doesn't mean that the variables are not related at all!

In some cases, you can achieve linearity using a transformation of one or more of the variables. If your data is heavily skewed, a log-transformation usually helps.

In your environment, you can find the houses data frame with two variables: area and price.

本练习是课程的一部分

Practicing Statistics Interview Questions in R

查看课程

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Draw a scatterplot of price vs. area
___(___ ~ ___, data = ___)

# Calculate the correlation coefficient of price and area
___(___, ___)
编辑并运行代码