<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>43.2.02 Correlation</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p></p><h3>Correlation</h3>

So far we have assumed that we have a random variable \(Y\) related to an independent variable \(x\)
which can be measured with some accuracy. In the equation below, the dependent variable \(Y\) is a
random variable whose value, for a fixed value of \(x\) depends on a random error component say \(e\) and we have
\[ Y = mx + c + e.\]

In some situations, both \(X\) and \(Y\) are random variables and you should note that we can still use a regression line of \(y\) on \(x\) if we are required to predict values of \(y\) from observations made on \(x\). In this case the variables \(x\) and \(y\) play different roles. In correlation, the two variables are interchangeable. Examples involving two random variables often quoted are the shear strength \( (y)\) and diameter of spot welds \( (x)\) (neither can be precisely controlled) and the bending moment \( (y)\) and shear \( (x)\) at the fixed point of a beam as illustrated below<p></p><p><br></p><p><img src="@@PLUGINFILE@@/43-2-fig-7-moment.svg" alt="" width="428" height="156" role="presentation" class="img-responsive atto_image_button_text-bottom"></p><p><br></p><p><br></p>

Again, neither variable (shear or moment) can be precisely controlled, each is a random variable. In cases such as these, we turn to the correlation coefficient (sometimes called Pearson's coefficient of correlation or simply Pearson's \(r\)) defined as
\[r = \dfrac{\sigma_{xy}}{\sigma_x \sigma_y}, \]
where \( \sigma_{xy}\) is the covariance between \(X\) and \(Y\) and \(\sigma_x\) and \(\sigma_y\) are the standard deviations of \(X\) and \(Y\) . We need to express this formula in terms of quantities which facilitate the easy calculation of the correlation coefficient.


<div class="HELM_keypoint">
<h4>Key Point</h4>
<p><b> Pearson's Coefficient of Correlation, \(r\) </b></p>
In terms of corresponding sample values \( (x, y)\),
\[ r = \dfrac{n \sum xy - \sum x \sum y }{\sqrt{\left( n \sum x^2 - \left( \sum x \right) ^2 \right)} \left( n \sum y^2 - \left( \sum y \right)^2 \right) } \]
</div>

Further, it can also be shown that \( -1 \leq r \leq 1\) and that:
<p></p>(a) \(r = -1 \) represents perfect negative correlation with all \( (x, y)\) lying on a straight line with
negative gradient;
<p></p>(b) \(r = 1\) represents perfect positive correlation with all \( (x, y)\) lying on a straight line with positive gradient;
<p></p>(c) \(r = 0\) represents the situation where either there is no linear relationship between the
variables or that any relationship existing is non-linear.]]></text>
<file name="43-2-fig-7-moment.svg" path="/" encoding="base64">[encoded data, 15988 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
