The relationship of two variables

Statistical Techniques in Tableau

Maarten Van den Broeck

Content Developer at DataCamp

Revisit the lake again

Plotting species richness and distance to agricultural activity for one lake.

Statistical Techniques in Tableau

Revisit the lake again: scatter plot

Plotting species richness and distance to agricultural activity for 30 lakes.

  • Variable of interest is placed on y-axis
Statistical Techniques in Tableau

Correlation coefficient

  • Quantifies the relationship between two variables
  • Between -1 and 1
  • Sign (+ or -) corresponds to direction of relationship
  • Magnitude (absolute value) corresponds to strength of the relationship

Different correlation coefficients on a scatter plot.

Statistical Techniques in Tableau

Trend lines

  • Visualizes the relationship between two variables
  • As close as possible to each data point
  • A high (absolute) correlation value has all point close or on the trend line
  • Not necessarily a straight line

The same scatter plot, now with a trend line

Statistical Techniques in Tableau

Trend lines: linear vs. logarithmic

Linear trend line

Species richness versus distance, with a linear trend line.

Logarithmic trend line

Species richness versus distance, with a linear logarithmic line.

Statistical Techniques in Tableau

Trend lines: predicting and extrapolating

Species richness versus distance, with a linear logarithmic line.

  • Distance of 1400 m corresponds to approx. 19 species

Species richness versus distance, with a linear logarithmic line, extended. This is called extrapolation.

  • Distance of 3000 m corresponds to approx. 21 species
Statistical Techniques in Tableau

Other types of trend lines

Screenshot of the different trend lines in Tableau.

  • Exponential: inverse of logarithmic
  • Power or log-log: both variables follow logarithmic trend
  • Polynomial: n-degree, from second degree till eight degree
Statistical Techniques in Tableau

Let's practice!

Statistical Techniques in Tableau

Preparing Video For Download...