# Find the correlatin coefficient r using bivariate data.

Question
Bivariate numerical data
Find the correlatin coefficient r using bivariate data.

2021-01-08
Given:
The given bivariate data is(1,6),(3,2), and (2,4).
Calculation:
First determine $$\displaystyle\sum{x}_{{i}}{y}_{{i}},\sum{x}_{{i}}{\quad\text{and}\quad}\sum{y}_{{i}}$$.
$$\displaystyle{x}_{{i}}\rightarrow$$ first coordinates of the ordered pairs.
$$\displaystyle{y}_{{i}}\rightarrow$$ second coordinates of the ordered pairs.
$$\displaystyle\sum{x}_{{i}}{y}_{{i}}={1}\cdot{6}+{3}\cdot{2}+{2}\cdot{4}={20}$$
$$\displaystyle\sum{x}_{{i}}={1}+{3}+{2}={6}$$
$$\displaystyle\sum{{x}_{{i}}^{{2}}}={1}^{{2}}+{3}^{{2}}+{2}^{{2}}={14}$$
$$\displaystyle\sum{y}_{{i}}={6}+{2}+{4}={12}$$
$$\displaystyle\sum{{y}_{{i}}^{{2}}}={6}^{{2}}+{2}^{{2}}+{4}^{{2}}={56}$$
Find the sample variance $$\displaystyle{s}^{{2}}$$ using the formula $$\displaystyle{s}^{{2}}=\frac{{\sum{{x}_{{i}}^{{2}}}-\frac{{\sum{{x}_{{i}}^{{2}}}}}{{{n}}}}}{{{n}-{1}}}$$
$$\displaystyle{{s}_{{x}}^{{2}}}=\frac{{{14}-\frac{{{6}^{{2}}}}{{3}}}}{{{3}-{1}}}=\frac{{{14}-{12}}}{{2}}={1}$$
$$\displaystyle{{s}_{{y}}^{{2}}}=\frac{{{56}-\frac{{{12}^{{2}}}}{{3}}}}{{{3}-{1}}}=\frac{{{56}-{48}}}{{2}}={4}$$
Find sample standard deviation.
$$\displaystyle{s}_{{x}}=\sqrt{{1}}={1}$$
$$\displaystyle{s}_{{y}}=\sqrt{{4}}={2}$$
For covariance $$\displaystyle{s}_{{{x}{y}}}{u}{\sin{{g}}}{f}{\quad\text{or}\quad}\mu{l}{a}{s}_{{{x}{y}}}=\frac{{\sum{x}_{{i}}{y}_{{i}}-\frac{{\sum{x}_{{i}}-\sum{y}_{{i}}}}{{{n}}}}}{{{n}-{1}}}$$.
Where n = number of ordered pairs.
n=3
$$\displaystyle{s}_{{{x}{y}}}=\frac{{{20}-\frac{{{6}\cdot{12}}}{{3}}}}{{{3}-{1}}}$$
$$\displaystyle=\frac{{{20}-\frac{{{72}}}{{3}}}}{{{3}-{1}}}$$
$$\displaystyle=\frac{{{20}-{24}}}{{2}}$$
$$\displaystyle=-\frac{{4}}{{2}}=-{2}$$
Find the correlation coefficient r using the formula $$\displaystyle{r}=\frac{{{s}_{{{x}{y}}}}}{{{s}_{{x}}{s}_{{y}}}}$$.
$$\displaystyle{r}=-\frac{{2}}{{{1}\cdot{2}}}=-{1}$$
Hence the value of correlation coefficient r = -1.

### Relevant Questions

When working with bivariate data, which of these are useful when deciding whether it’s appropriate to use a linear model?
I. the scatterplot
II. the residuals plot
III. the correlation coefficient
A) I only
B) II only
C) III only
D) I and II only
E) I, II, and III
Find the covariance $$\displaystyle{s}_{{{x}{y}}}$$ using bivariate data.
In bivariate data, we sometimes notice that one of the quantities increases (1, 2, 3...) while the other quantity decreases (20, 19, 18...). Which phrase best describes this association? would it be no correlation, a perfect correlation,a positive correlation or a negative correlation?
Differentiate between univariate, bivariate and multivariate data.