4.5 Patterns, trends and relationships

NCA-ADS · Descriptive Analysis and Visualization (13% of the exam) · Official objective: “Interpreting patterns, trends, and relationships in data”

Pearson and Spearman correlation, rolling means and changing trends.

Key points

  1. Correlation measures how two variables move together. Causation needs more evidence, such as a controlled experiment.

    What NVIDIA says (2)

    “pearson : Standard correlation coefficient spearman : Spearman rank correlation”

    — cuDF API: DataFrame.corr

    “However, it’s important to remember that correlation and causation are two different things.”

    — NVIDIA Glossary: Linear Regression and Logistic Regression

  2. Monotonic means one variable tends to rise when the other rises, not always at the same rate. Spearman uses ranks, so it captures that without assuming a line.

    What NVIDIA says (1)

    “Method used to compute correlation: pearson : Standard correlation coefficient spearman : Spearman rank correlation”

    — cuDF API: DataFrame.corr

  3. A trend is the long-run direction of a series. A rolling window averages nearby values to smooth out noise.

    What NVIDIA says (1)

    “Parameters : window int, offset or a BaseIndexer subclass Size of the window, i.e., the number of observations used to calculate the statistic.”

    — cuDF API: DataFrame.rolling

  4. A linear model assumes a straight-line relationship. When the pattern curves, a nonlinear model can describe it better.

    What NVIDIA says (2)

    “While there is a strong relationship between population and time, the relationship is not linear because various factors influence changes from year to year.”

    — NVIDIA Glossary: Linear Regression and Logistic Regression

    “Nonlinear regression can estimate models with arbitrary relationships between independent and dependent variables.”

    — NVIDIA Glossary: Linear Regression and Logistic Regression

Key terms

Sample question

Two columns have a strong Pearson correlation. What can you conclude?

Show the answer

Answer: They move together linearly, but correlation alone does not show that one causes the other

Correlation measures how two variables move together. Causation needs more evidence, such as a controlled experiment.

What NVIDIA says (2)

“pearson : Standard correlation coefficient spearman : Spearman rank correlation”

— cuDF API: DataFrame.corr

“However, it’s important to remember that correlation and causation are two different things.”

— NVIDIA Glossary: Linear Regression and Logistic Regression

Practice 4.5 (4 questions) Full Descriptive Analysis and Visualization guide

← 4.4 Hypothesis testing and significance · 5.1 Python for data analysis →