<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m10121">

  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Equations for Bivariate Data</name>

  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.4</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2001/06/20</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2002/11/07</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="jago">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Adan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Galvan</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">jago@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="jago">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Adan</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Galvan</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">jago@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">bivariate</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">statistics</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Equations for Bivariate Data</md:abstract>
</metadata>


  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">

    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="bivariate1">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Formulas for Bivariate Data</name>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="pearson">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Pearson's Correlation</name>

	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="pearsons1">

	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="pearsonseq">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>r</m:ci>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:minus/>
		    <m:apply>
		      <m:sum/>
		      <m:domainofapplication><m:bvar>
			  <m:ci>X</m:ci>
			  <m:ci>Y</m:ci>
			</m:bvar></m:domainofapplication>
		      <m:apply>
			<m:times/>
			<m:ci>X</m:ci>
			<m:ci>Y</m:ci>
		      </m:apply>
		    </m:apply>
		    <m:apply>
		      <m:divide/>
		      <m:apply>
			<m:times/>
			<m:apply>
			  <m:sum/>
			  <m:domainofapplication><m:bvar>
			      <m:ci>X</m:ci>
			    </m:bvar></m:domainofapplication>
			  <m:ci>X</m:ci>
			</m:apply>
			<m:apply>
			  <m:sum/>
			  <m:domainofapplication><m:bvar>
			      <m:ci>Y</m:ci>
			    </m:bvar></m:domainofapplication>
			  <m:ci>Y</m:ci>
			</m:apply>
		      </m:apply>
		      <m:ci>N</m:ci>
		    </m:apply>
		  </m:apply>
		  <m:apply>
		    <m:root/>
		    <m:apply>
		      <m:times/>
		      <m:apply>
			<m:minus/>
			<m:apply>
			  <m:sum/>
			  <m:domainofapplication><m:bvar>
			      <m:ci>X</m:ci>
			    </m:bvar></m:domainofapplication>
			  <m:apply>
			    <m:power/>
			    <m:ci>X</m:ci>
			    <m:cn>2</m:cn>
			  </m:apply>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:power/>
			    <m:apply>
			      <m:sum/>
			      <m:domainofapplication><m:bvar>
				  <m:ci>X</m:ci>
				</m:bvar></m:domainofapplication>
			      <m:ci>X</m:ci>
			    </m:apply>
			    <m:cn>2</m:cn>
			  </m:apply>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>  
		      <m:apply>
			<m:minus/>
			<m:apply>
			  <m:sum/>
			  <m:domainofapplication><m:bvar>
			      <m:ci>Y</m:ci>
			    </m:bvar></m:domainofapplication>
			  <m:apply>
			    <m:power/>
			    <m:ci>Y</m:ci>
			    <m:cn>2</m:cn>
			  </m:apply>
			</m:apply>
			<m:apply>
			  <m:divide/>
			  <m:apply>
			    <m:power/>
			    <m:apply>
			      <m:sum/>
			      <m:domainofapplication><m:bvar>
				  <m:ci>Y</m:ci>
				</m:bvar></m:domainofapplication>
			      <m:ci>Y</m:ci>
			    </m:apply>
			    <m:cn>2</m:cn>
			  </m:apply>
			  <m:ci>N</m:ci>
			</m:apply>
		      </m:apply>
		    </m:apply>
		    <m:cn>2</m:cn>
		  </m:apply>             
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>

	  A simpler looking formula can be used if the numbers are
	  converted into <m:math><m:ci>z</m:ci></m:math> scores:
	  
	  <equation xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="zpearson">
	    <m:math>
	      <m:apply>
		<m:eq/>
		<m:ci>r</m:ci>
		<m:apply>
		  <m:divide/>
		  <m:apply>
		    <m:sum/>
		    <m:domainofapplication><m:bvar>
			<m:ci>X</m:ci>
			<m:ci>Y</m:ci>
		      </m:bvar></m:domainofapplication>
		    <m:apply>
		      <m:times/>
		      <m:ci><m:msub>
			  <m:mi>z</m:mi>
			  <m:mi>x</m:mi>
			</m:msub></m:ci>
		      <m:ci><m:msub>
			  <m:mi>z</m:mi>
			  <m:mi>y</m:mi>
			</m:msub></m:ci>
		    </m:apply>
		  </m:apply>
		  <m:ci>N</m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>
	  </equation>
	</para>

      </section>

      <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="spearmansrho">
	<name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Spearmans's Rho</name>
	<para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="spear">

	  Spearman's rho is a measure of the linear relationship
	  between two variables.  It differs from Pearson's
	  correlation only in that the computations are done after the
	  numbers are converted to ranks. When converting to ranks,
	  the smallest value on <m:math><m:ci>X</m:ci></m:math>
	  becomes a rank of 1, the second smallest becomes a value on
	  <m:math><m:ci>X</m:ci></m:math> becomes a rank of 2,
	  <foreign xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">etc.</foreign> The same ranking procedure is done
	  with the values of <m:math><m:ci>Y</m:ci></m:math>.
	  Spearman's rho can be computed with the formula for
	  Pearson's <m:math><m:ci>r</m:ci></m:math> using the ranked
	  data.

	</para>
      </section>  

    </section>

  </content>
</document>
