Statistical Association and Correlation Analysis

Association Between Two Variables

  • Association tests are used to explore if two variables, x and y, are related.

    • Examples:

      • Body length and mass

      • Concentration of ozone and NOx in the atmosphere

      • Daylight duration and oxygen progression in plants

      • Relative humidity and average temperature

Correlation

  • Examines the direction and strength of the association between two numeric variables.

  • Evaluates the direction and strength of the linear relationship between two numeric variables x and y.

  • Assumptions:

    • Both variables are continuous (Pearson product moment correlation).

    • One variable continuous and one ordinal (Spearman correlation).

    • Related pairs: Each observation should have a value for both variables (x<em>1,y</em>1;x<em>2,y</em>2;x<em>n,y</em>n)(x<em>1, y</em>1; x<em>2, y</em>2; … x<em>n, y</em>n)

    • Linearity

    • No outliers

Linear Regression

  • Examines how well the line describing the association can be used to explain the variation in Y.

  • As xx goes up, does yy change at the same rate (either goes up or down)?

Chi-square for Contingency Tables

  • Examines the association or independence between two categorical variables.

Correlation Analysis

Step 1: Plot the Data Pairs

  • Visualize the data to inspect for outliers and linearity using a scatterplot.

  • Example: As PM10 increases in the 1st station, it also increases in the 2nd station.

    • Visually, it seems to be linearity.

    • The association is definitely positive.

Step 2: Estimate the Correlation Coefficient

  • Scale-invariant numeric measure of the linear association between two numeric variables.

  • Standardize the pairs of data (x,y)(x, y) using z-scores: z=fracobservationmeanstandard deviationz = frac{observation - mean}{standard \ deviation}

  • Provides information about the directionality of the relationship: positive or negative.

    • Positive correlation: As the values of xx increase, the values of yy increase too (r is positive).

    • Negative correlation: As the values of xx increase, the values of yy decrease (r is negative).

  • Provides information about the strength of the relationship.

    • The closer rr is to either -1 or +1, the stronger the relationship.

    • The closer rr is to 0, the weaker the relationship.

  • Formula: r=1n1<em>i=1nx</em>ixˉSD<em>xy</em>iyˉSD<em>y=1n1</em>i=1nZScore(x)ZScore(y)r = \frac{1}{n-1} \sum<em>{i=1}^{n} \frac{x</em>i - \bar{x}}{SD<em>x} * \frac{y</em>i - \bar{y}}{SD<em>y} = \frac{1}{n-1} \sum</em>{i=1}^{n} Z-Score(x) * Z-Score(y)

  • Example calculation:

    • Given sum of Z(x)Z(y)=4.65Z(x) * Z(y) = -4.65 and n=6n = 6

    • Degrees of freedom = n1=5n - 1 = 5

    • r=1614.65=0.93r = \frac{1}{6-1} * -4.65 = -0.93

Step 3: Determine if the Observed Relationship Can Be Due to Chance (Hypothesis Testing)

  • Step 3.1: State the statistical null hypothesis and set the confidence level.

    • H0:ρ=0H_0: \rho = 0 | There is no linear relationship between RH (x) and Avg. temperature (y).

    • rr is the sample correlation, an estimate of the population correlation ρ\rho.

  • Step 3.2: Calculate the test statistic and p-value.

    • t=rn21r2t = r * \sqrt{\frac{n-2}{1-r^2}}

    • Example: t=1.987t = -1.987, p-value = 7.13×1067.13 \times 10^{-6}

Interpreting a Correlation Analysis

  • Step 3: Decision and report of results.

    • If p-value < α\alpha (significance level), we reject H0H_0.

    • Example: p-value = 0.00000713 < α\alpha; we reject H0H_0 | The negative linear correlation between RH and avg. temperature is statistically significant.

    • RH showed a relatively high negative correlation to the avg. temperature (r=0.93r = -0.93). This correlation is statistically significant (t=1.97t = 1.97; df=5df = 5; p=0.00000713p = 0.00000713).

Caution

  • A non-significant correlation means that the strength (rr value) could be explained by chance.

  • A significant correlation does not mean a strong correlation.

  • Small sample sizes can yield a non-significant correlation when in reality it is significant (Error type II).

  • Large sample sizes can yield a significant correlation when in reality it is weak (Error type I).

  • Not having a linear relation does not mean not having a relation; non-linear relations exist.