{"id":618,"date":"2020-05-13T21:09:38","date_gmt":"2020-05-14T01:09:38","guid":{"rendered":"http:\/\/pressbooks.library.upei.ca\/montelpare\/?post_type=chapter&#038;p=618"},"modified":"2020-09-03T09:53:45","modified_gmt":"2020-09-03T13:53:45","slug":"computing-the-pearson-product-moment-correlation-coefficient","status":"publish","type":"chapter","link":"https:\/\/pressbooks.library.upei.ca\/montelpare\/chapter\/computing-the-pearson-product-moment-correlation-coefficient\/","title":{"raw":"Computing the Pearson Product Moment Correlation Coefficient","rendered":"Computing the Pearson Product Moment Correlation Coefficient"},"content":{"raw":"<h1>Defining the Correlation Coefficient for Continuous Data: the Pearson Product Moment Correlation Coefficient<\/h1>\r\nPearson\u2019s Product Moment Correlation Coefficient is aptly named for the mathematical computational steps that are used to produce the outcome.\u00a0 First, the computation is based on the multiplication of variables, which result in generating a product. Second, the variables, labelled x and y, are computed as independent statistical moments, whereby each score is evaluated against the variable\u2019s algebraic measure of centrality of the group scores, a.k.a. the mean. In this way, the correlation coefficient provides the researcher with an estimate of a relationship between two dependent variables.\r\n\r\nThe outcome estimate of the Pearson Product Moment Correlation Coefficient does NOT imply cause or causality between the two variables. Rather, the outcome estimate is merely an estimate of how closely two variables describe independent responses for a sample. The correlation coefficient is calculated by combining the estimates of variance on each of the separately measured variables of interest.\r\n\r\nSpecifically, the correlation coefficient is a ratio score that ranges from -1.00 to +1.00 and is created from a cross product:\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-300x43.png\" alt=\"\" class=\"size-medium wp-image-627 aligncenter\" width=\"300\" height=\"43\" \/>\r\n\r\nas the numerator term and then adjusted through division by the error term in the denominator, which is the square root of the product of the sum of squares for the x variable and the sum of squares for the y variable, as shown here:<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1-300x45.png\" alt=\"\" class=\"size-medium wp-image-626 aligncenter\" width=\"300\" height=\"45\" \/>\r\n\r\nThe formula to compute the Pearson product-moment correlation coefficient is shown here:\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr1-300x59.png\" alt=\"\" class=\" wp-image-625 aligncenter\" width=\"544\" height=\"107\" \/>\r\n\r\nWhen presented graphically, the paired measures of the x and y variables for the set of scores are represented as a single point within the graphing space. The calculation of the correlation coefficient describes the mathematical relationship between the x and y variable pairs are associated within a geometric space.\u00a0 The following three graphs illustrate the extremes of the Pearson Product Moment Correlation Coefficients for the relationships between x and y variable pairs. In Figure 1, the relationship illustrates a Pearson Product Moment Correlation Coefficient as extreme positive with an r value of 1.00. In Figure 2, the relationship illustrates an extreme negative r value of -1.00.\u00a0 In Figure 3, the relationship is shown as a Pearson Product Moment Correlation Coefficient of zero, or no mathematical relationship between each participant\u2019s paired x and y scores.\r\n\r\nFigure 1. Representation of the Pearson Product Moment Correlation Coefficient as r=1.00\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic1.png\" alt=\"\" class=\" wp-image-633 aligncenter\" width=\"331\" height=\"326\" \/>\r\n\r\nIn the figure above,\u00a0 the cluster of paired scores on the variable x and the variable y are presented in a positive direction within the graphing space. For each individual\u2019s score on the x variable there is an equal score on the y variable relative to the scale of scores. This means that a correspondingly high score on the y variable matches a high score on the x variable; and similarly a correspondingly low score on the y variable matches a low score on the x variable.\u00a0 When the x and y variables as represented as a single point in the graphing space the resulting image suggests a positive correlation between the variables x and y for the set of participants\u2019 scores.\r\n\r\nFigure 2. Representation of the Pearson Product Moment Correlation Coefficient as r= -1.00\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic2.png\" alt=\"\" class=\" wp-image-632 aligncenter\" width=\"313\" height=\"325\" \/>\r\n\r\nIn the figure above, the cluster of paired scores on the variable x and the variable y are presented in a negative direction within the graphing space. For each individual\u2019s score on the x variable, there is an inverse score on the y variable relative to the scale of scores. This means that a correspondingly high score on the y variable matches a low score on the x variable, and similarly, a correspondingly low score on the y variable matches a high score on the x variable.\u00a0 When the x and y variables as represented as a single point in the graphing space the resulting image suggests a negative correlation between the variables x and y for the set of participants\u2019 scores.\r\n\r\nFigure 3. Representation of the Pearson Product Moment Correlation Coefficient as r= 0.00\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic3.png\" alt=\"\" class=\" wp-image-631 aligncenter\" width=\"299\" height=\"300\" \/>\r\n\r\nIn Figure 3, above, the cluster of paired scores on the variable x and the variable y are presented as having no definitive direction within the graphing space. For each individual\u2019s score on the x variable, there is no corresponding score on the y variable relative to the scale of scores. In this instance, the x and y variables are simply represented as pairs of scores within the graphing space. No relationship exists when there is complete randomness in the scoring by an individual on the x and on the y variables and thereby do not depict a relationship between the two variables for the set of participants\u2019 scores.\r\n\r\nThe correlation coefficient provides the researcher with an estimate of a relationship between two variables. The Pearson Product Moment Correlation Coefficient does\u00a0<strong>NOT<\/strong>\u00a0imply cause or causality between the two variables. Rather, the measure is merely an estimate of how closely two variables describe independent responses for a sample. The correlation coefficient is calculated by combining the measures of variance on each of the separately measured variables, as shown in the following formula:\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corr1-300x150.gif\" alt=\"\" class=\"size-medium wp-image-630 aligncenter\" width=\"300\" height=\"150\" \/>\r\n\r\n<hr \/>\r\n\r\n<h2>A SAS Example<\/h2>\r\nConsider the following data set, with 6 participants measured on two separate variables.\u00a0 Your intention is to determine if the group measures on VAR_1 are similar to the group measures of VAR_2. For those of you that need more tangible labels, let\u2019s consider that VAR_1 represents IQ scores and that VAR_2 represents SHOE SIZE.\r\n\r\nSo that our query is simply, is there a relationship between IQ scores and SHOE SIZE. In order to analyze these data, you create the following SAS program which produces the output shown below.\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">SAS Code to produce Pearson Correlation Coefficient and A Line of Best Fit in a Scatterplot<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<div>\r\n<p class=\"indent\">DATA CORREX1;<\/p>\r\n<p class=\"indent\">\u00a0 TITLE 'CORRELATION BETWEEN 2 MEASURES IN SAME PERSON';<\/p>\r\n<p class=\"indent\">INPUT ID VAR1 VAR2;<\/p>\r\n<p class=\"indent\">LABEL VAR1='MEASURE FOR VARIABLE 1'<\/p>\r\n<p class=\"indent\">\u00a0\u00a0\u00a0\u00a0\u00a0 VAR2='MEASURE FOR VARIABLE 2';<\/p>\r\n<p class=\"indent\">DATALINES;<\/p>\r\n<p class=\"indent\">001 55 7<\/p>\r\n<p class=\"indent\">002 77 9<\/p>\r\n<p class=\"indent\">003 88 10<\/p>\r\n<p class=\"indent\">004 92 10.5<\/p>\r\n<p class=\"indent\">005 100 11<\/p>\r\n<p class=\"indent\">006 105 12<\/p>\r\n<p class=\"indent\">;<\/p>\r\n<p class=\"indent\">RUN;<\/p>\r\n<p class=\"indent\">PROC UNIVARIATE; VAR VAR1 VAR2;<\/p>\r\n<p class=\"indent\">PROC CORR PEARSON; VAR VAR1 VAR2;<\/p>\r\n<p class=\"indent\">PROC SGPLOT NOAUTOLEGEND DATA= CORREX1;<\/p>\r\n<p class=\"indent\">TITLE1\u00a0 \"SCATTER PLOT OF CORRELATION BETWEEN VAR1 AND VAR2\";<\/p>\r\n<p class=\"indent\">TITLE2\u00a0 \"LINE OF BEST FIT ADDED TO SCATTERPLOT\";<\/p>\r\n<p class=\"indent\">REG Y=VAR1 X=VAR2;<\/p>\r\n<p class=\"indent\">RUN;<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<strong>Output from PROC CORR with Corresponding Line of Best Fit in a Scatterplot<\/strong>\r\n\r\n<strong>Correlation between 2 measures in the same person using the SAS PROC<\/strong><strong> CORR Procedure. Table 1. Simple Statistics\r\n<\/strong>\r\n<div align=\"center\">\r\n<table style=\"width: 0px\">\r\n<thead>\r\n<tr>\r\n<td style=\"width: 59.4px\"><strong>Variable<\/strong><\/td>\r\n<td style=\"width: 11.1333px\"><strong>N<\/strong><\/td>\r\n<td style=\"width: 56.6833px\"><strong>Mean<\/strong><\/td>\r\n<td style=\"width: 54.9px\"><strong>Std Dev<\/strong><\/td>\r\n<td style=\"width: 67.1667px\"><strong>Sum<\/strong><\/td>\r\n<td style=\"width: 67.8px\"><strong>Minimum<\/strong><\/td>\r\n<td style=\"width: 70.1167px\"><strong>Maximum<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 59.4px\"><strong>Measure for Var_1 (IQ scores)\r\n<\/strong><\/td>\r\n<td style=\"width: 11.1333px\">6<\/td>\r\n<td style=\"width: 56.6833px\">86.16667<\/td>\r\n<td style=\"width: 54.9px\">18.10433<\/td>\r\n<td style=\"width: 67.1667px\">517.00000<\/td>\r\n<td style=\"width: 67.8px\">55.00000<\/td>\r\n<td style=\"width: 70.1167px\">105.00000<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 59.4px\"><strong>Measure for Var_2 Shoe Size\r\n<\/strong><\/td>\r\n<td style=\"width: 11.1333px\">6<\/td>\r\n<td style=\"width: 56.6833px\">9.91667<\/td>\r\n<td style=\"width: 54.9px\">1.74404<\/td>\r\n<td style=\"width: 67.1667px\">59.50000<\/td>\r\n<td style=\"width: 67.8px\">7.00000<\/td>\r\n<td style=\"width: 70.1167px\">12.00000<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<strong>Table 2. Matrix of Pearson Correlation Coefficients, N = 6, <\/strong><strong>Prob &gt; |r| under H0: Rho=0<\/strong>\r\n<div align=\"center\">\r\n<table style=\"height: 181px\" width=\"403\">\r\n<thead>\r\n<tr>\r\n<td style=\"width: 161.333px\"><strong>\u00a0<\/strong><\/td>\r\n<td style=\"width: 85.1833px\"><strong>IQ scores (Var_1)\r\n<\/strong><\/td>\r\n<td style=\"width: 114.25px\"><strong>Shoe Size (Var_2)<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 161.333px\"><strong>IQ scores (Var_1)<\/strong><\/td>\r\n<td style=\"width: 85.1833px\">1.00000\r\n\r\n&nbsp;<\/td>\r\n<td style=\"width: 114.25px\">r= 0.99500\r\n\r\np &lt;.0001<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 161.333px\"><strong>Shoe Size (Var_2)<\/strong><\/td>\r\n<td style=\"width: 85.1833px\">r= 0.99500\r\n\r\np &lt;.0001<\/td>\r\n<td style=\"width: 114.25px\">1.00000\r\n\r\n&nbsp;<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-300x225.png\" alt=\"\" class=\" wp-image-637 aligncenter\" width=\"467\" height=\"350\" \/>\r\n\r\nThe results indicate that there is a strong correlation between IQ scores and shoe size as indicated by the correlation coefficient value in Table 2 of the SAS output in the scatterplot, above. The reported correlation coefficient (r value) was 0.995. which is considered statistically significant (p&lt;0.0001)[footnote]Note: just because the p value extends beyond 0.01 you need only to report p&lt;0.01[\/footnote]. The r value indicates that as a group the data on each variable are traveling in the same direction. In other words, low IQ scores were associated with small shoe sizes and high IQ scores were associated with larger shoe sizes.\r\n\r\n<hr \/>\r\n\r\n<h2>Another SAS Working Example<\/h2>\r\nConsider the following comparison of VO<sub>2<\/sub> maximum tests to illustrate the computations for the Pearson product-moment correlation coefficient.\r\n\r\nAn individual\u2019s ability to perform maximal re-synthesis of ATP is often determined from their estimated VO<sub>2<\/sub> maximum. Yet the true estimate of VO<sub>2<\/sub> maximum requires an individual to undergo an extensive performance test in a \u201cclinical or laboratory\u201d setting.\r\n\r\nFurther, because physical fitness is often established from the VO<sub>2<\/sub> maximum, researchers strive to develop approaches that can provide a suitable estimate for VO<sub>2<\/sub> maximum without requiring the laboratory test. To this end, several \u201cfield tests\u201d have been presented as reliable and valid proxies for the laboratory estimate of VO<sub>2<\/sub> maximum.\r\n\r\nThe validity of field-tests for VO<sub>2<\/sub> maximum as effective measures of true physiological functioning within this system are based on the linear relationship between heart rate and oxygen consumption. Since the changes in heart rate match the changes in aerobic metabolism, an individual\u2019s ability to respire can be predicted indirectly by heart rate rather than the direct determination of oxygen utilization from a controlled laboratory setting.\r\n\r\nLaboratory tests for VO<sub>2<\/sub> maximum typically require that the individual runs or walks on a treadmill, or cycles on a standard bicycle ergometer while expired air is collected and the oxygen concentration in the expired air, is measured. The field tests, however, can use several stimulus modalities (e.g. walking, running, stepping, and cycling) and rather than measure the oxygen concentration in expired air, the technician simply records heart rate at specific stages of the exercise stress test. The relationship between field-tests and a declared \u201cgold standard\u201d is determined by comparing the statistical probability of the association between the predictive nature of the field test and a baseline reference standard measured in the laboratory.\r\n\r\nIn determining the accuracy of a clinical or diagnostic test, researchers compare the performance of subjects on the selected diagnostic (field) test against the \"gold standard\u201d. In the following example, this clinical epidemiological approach was used to determine the accuracy of field tests for predicting maximal oxygen consumption against a laboratory standard treadmill test (Bruce protocol). The field tests included the Cooper's 12-minute run, the Astrand-Rhyming bicycle test, the Canadian Aerobic Fitness Test, and the one-mile walking test. A sample of the results for each test is presented in the table, below.\r\n<h5 style=\"text-align: center\">Table of VO2 Maximum Estimates For A Sample Of Ten Individuals On 5 Different Procedures<\/h5>\r\n<table class=\"aligncenter\" style=\"border-collapse: collapse;width: 100%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">Subject<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">treadmill\r\nVO<sub>2<\/sub>\u00a0max\r\nml\/kg\/min<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">12-minute run\r\nVO<sub>2<\/sub>\u00a0max\r\nml\/kg\/min<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">Bicycle ergometer\r\nVO<sub>2\u00a0<\/sub>max\r\nml\/kg\/min<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">Step test\r\nVO<sub>2<\/sub>\u00a0max\r\nml\/kg\/min<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">1-mile walk test\r\nVO<sub>2<\/sub>\u00a0max\r\nml\/kg\/min<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">01<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">47<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">33<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">44<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">02<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">36<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">19<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">53<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">53<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">43<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">03<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">55<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">25<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">49<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">61<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">47<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">04<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">39<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">41<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">23<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">56<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">05<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">27<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">50<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">58<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">06<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">46<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">39<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">52<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">61<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">53<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">07<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">43<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">36<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">55<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">08<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">29<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">31<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">42<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">53<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">42<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">09<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">54<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">28<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">44<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">56<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">10<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">37<\/td>\r\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">44<\/td>\r\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">54<\/td>\r\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\r\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nThe following computations illustrate the application of the Pearson product-moment correlation coefficient to the oxygen consumption data shown above.\r\n\r\nSTEP 1: Select two variables to compare\u00e0, for example, we will begin with VO2 measured with the treadmill test versus VO2 measured with the 1-mile walk test. The mean for the scores on the treadmill, which in this example we designate as the x variable is 44.3 (\u00b1 9.23), and the scores on the walk test, which in this example we designate as the y variable and is 45.2 (\u00b1 3.04).\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-300x42.png\" alt=\"\" class=\"size-medium wp-image-642 aligncenter\" width=\"300\" height=\"42\" \/>\r\n\r\nThe mean score for the variable x and the mean score for the variable y are used independently in Step 2: computing variance for each selected variable.\r\n\r\nSTEP 2:\u00a0Compute the sum of squares for the variance elements of each selected variable, separately, as shown below:<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-300x43.png\" alt=\"\" class=\"size-medium wp-image-645 aligncenter\" width=\"300\" height=\"43\" \/>\r\n<table class=\"aligncenter\" style=\"border-collapse: collapse;width: 100%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">Scores on \"x\"\r\ntreadmill<\/td>\r\n<td style=\"width: 32.526%;text-align: center\"><\/td>\r\n<td style=\"width: 39.4464%;text-align: center\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">47<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">47 - 44.3 = 2.7<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(47 - 44.3)2= 7.29<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">36<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">36 - 44.3 = -8.3<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(36 - 44.3)2= 68.89<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">55<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">55 - 44.3 = 10.7<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(55 - 44.3)2= 114.49<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">39<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">39 - 44.3 = -5.3<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(39 - 44.3)2= 28.09<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">57<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">57 - 44.3 = 12.7<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(57 - 44.3)2= 161.29<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">46<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">46 - 44.3 = 1.7<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(46 - 44.3)2= 2.89<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">43<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">43 - 44.3 = -1.3<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(43 - 44.3)2= 1.69<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">29<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">29 - 44.3 = -15.3<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(29 - 44.3)2= 234.09<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">54<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">54 - 44.3 = 9.7<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(54 - 44.3)2= 94.09<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\">37<\/td>\r\n<td style=\"width: 32.526%;text-align: center\">37 - 44.3 = -7.3<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">(37 - 44.3)2= 53.29<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 27.8547%;text-align: center\"><\/td>\r\n<td style=\"width: 32.526%;text-align: center\">= 0<\/td>\r\n<td style=\"width: 39.4464%;text-align: center\">\u00a0= 766.01<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<table style=\"border-collapse: collapse;width: 100%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">Scores on \"y\"\r\nthe walk test<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\"><\/td>\r\n<td style=\"width: 38.7543%;text-align: center\"><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">45 - 45.2= -0.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(45 - 45.2)2= 0.04<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">43<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">43 - 45.2 = -2.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(43 - 45.2)2= 4.84<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">47<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">47 - 45.2 = 1.8<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(47 - 45.2)2= 3.24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">44 - 45.2 = -1.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(44 - 45.2)2= 1.44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">45 - 45.2 = -0.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(45 - 45.2)2= 0.04<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">53<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">53 - 45.2 = 7.8<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(53 - 45.2)2= 60.84<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">44 - 45.2 = -1.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(44 - 45.2)2= 1.44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">42<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">42 - 45.2 = -3.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(42 - 45.2)2= 10.24<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">44 - 45.2 = -1.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(44 - 45.2)2= 1.44<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">45 - 45.2 = -0.2<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">(45 - 45.2)2= 0.04<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 28.7197%;text-align: center\"><\/td>\r\n<td style=\"width: 32.3529%;text-align: center\">\u00a0= 0<\/td>\r\n<td style=\"width: 38.7543%;text-align: center\">= 83.6<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nSTEP 3: Compute the cross products of\u00a0 x and y using: \u00a0\u00a0 [latex](x_i - \\overline{x})(y_i - \\overline{y})[\/latex]\r\n<table style=\"border-collapse: collapse;width: 67.0246%\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">participant<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">\u00a0\u00a0 [latex](x_i - \\overline{x})(y_i - \\overline{y})[\/latex]<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">01<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">2.7 * -0.2 = -0.54<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">02<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">-8.3 * -2.2 = 18.26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">03<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">10.7 * 1.8 = 19.26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">04<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">-5.3 * -1.2 = 6.36<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">05<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">12.7 * -0.2 = -2.54<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">06<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">1.7 * 7.8 = 13.26<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">07<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">-1.3 * -1.2 = 1.56<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">08<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">-15.3 * -3.2 = 48.96<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">09<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">9.7 * -1.2 = -11.64<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 12.6443%;text-align: center\">10<\/td>\r\n<td style=\"width: 24.9719%;text-align: center\">-7.3 * -0.2 =1.46<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 37.6162%;text-align: center\" colspan=\"2\"><img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumxprod.png\" alt=\"\" class=\"alignnone size-full wp-image-646\" width=\"237\" height=\"25\" \/>= 94.4<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nSTEP 4: Compute the denominator of the correlation coefficient using the square root of the product of the sum of squares for the x and the y variables.\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-300x59.png\" alt=\"\" class=\"size-medium wp-image-649 aligncenter\" width=\"300\" height=\"59\" \/>\r\n\r\nThe specific values can be taken from the computations above where the <img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumx-1.png\" alt=\"\" class=\"alignnone size-full wp-image-655\" width=\"151\" height=\"43\" \/>= 766.01 and the\u00a0 <img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumy-1.png\" alt=\"\" class=\"alignnone size-full wp-image-654\" width=\"150\" height=\"43\" \/>= 83.6 \u00a0 The denominator term is thus the square root of:\u00a0 SQRT<strong>(766.01 x 83.6) = SQRT(64038.44) = 253<\/strong>\r\n\r\nSTEP 5: Compute the correlation coefficient by substituting the values from that which was calculated, above.\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-300x27.png\" alt=\"\" class=\" wp-image-656 aligncenter\" width=\"567\" height=\"51\" \/>\r\n\r\nIn our example, the correlation coefficient computed for the relationship between the VO2\u00a0on the treadmill and the VO2\u00a0on the 1 mile walk test = 0.37\r\n\r\n<hr \/>\r\n\r\n<h2>Verifying Our Computations with SAS<\/h2>\r\nThe data set used in the example above included two columns of data: the VO2 max scores recorded for each participant on the treadmill test and the 1-mile walk test. The columns were separated by a tab character which we denote in our INFILE statement with the command: <strong>delimiter='09'x<\/strong> . The data set has three variables: id, treadmill scores and 1-mile walk test scores.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">raw data set for three variables<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<div>\r\n<p class=\"indent\">01\u00a0\u00a0\u00a0 47\u00a0\u00a0\u00a0 45<\/p>\r\n<p class=\"indent\">02\u00a0\u00a0\u00a0 36\u00a0\u00a0\u00a0 43<\/p>\r\n<p class=\"indent\">03\u00a0\u00a0\u00a0 55\u00a0\u00a0\u00a0 47<\/p>\r\n<p class=\"indent\">04\u00a0\u00a0\u00a0 39\u00a0\u00a0\u00a0 44<\/p>\r\n<p class=\"indent\">05\u00a0\u00a0\u00a0 57\u00a0\u00a0\u00a0 45<\/p>\r\n<p class=\"indent\">06\u00a0\u00a0\u00a0 46\u00a0\u00a0\u00a0 53<\/p>\r\n<p class=\"indent\">07\u00a0\u00a0\u00a0 43\u00a0\u00a0\u00a0 44<\/p>\r\n<p class=\"indent\">08\u00a0\u00a0\u00a0 29\u00a0\u00a0\u00a0 42<\/p>\r\n<p class=\"indent\">09\u00a0\u00a0\u00a0 54\u00a0\u00a0\u00a0 44<\/p>\r\n<p class=\"indent\">10\u00a0\u00a0\u00a0 37\u00a0\u00a0\u00a0 45<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\nThe SAS program written for SAS Studio to compute the correlation coefficient for the relationship between the scores on the treadmill and the 1-mile walk test is shown here:\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">SAS Code to produce Pearson Correlation Coefficient for treadmill and the 1-mile walk test<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<div>\r\n<p class=\"indent\">DATA CORR1(LABEL= 'CORRELATION COEFFICIENTS');<\/p>\r\n<p class=\"indent\">TITLE 'PRACTICE DATA SET TO COMPUTE CORRELATION COEFFICIENTS';<\/p>\r\n<p class=\"indent\">INFILE '\/FOLDERS\/DATASETS\/CORR1.DAT' DELIMITER='09'X ;<\/p>\r\n<p class=\"indent\">* THE DATA IN THE FILE CORR1.DAT ARE TAB DELIMITED;<\/p>\r\n<p class=\"indent\">INPUT ID 1-3 @4 TRDMILL ONEMLWLK;<\/p>\r\n<p class=\"indent\">PROC CORR; VAR TRDMILL ONEMLWLK;<\/p>\r\n<p class=\"indent\">RUN;<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<h3><a name=\"_Toc534877359\"><\/a>Output from the SAS PROC CORR PROCEDURE<\/h3>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><strong>Variable<\/strong><\/td>\r\n<td><strong>N<\/strong><\/td>\r\n<td><strong>Mean<\/strong><\/td>\r\n<td><strong>Std Dev<\/strong><\/td>\r\n<td><strong>Sum<\/strong><\/td>\r\n<td><strong>Minimum<\/strong><\/td>\r\n<td><strong>Maximum<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>trdmill<\/strong><\/td>\r\n<td>10<\/td>\r\n<td>44.30000<\/td>\r\n<td>9.22617<\/td>\r\n<td>443.00000<\/td>\r\n<td>29.00000<\/td>\r\n<td>57.00000<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Onemlwlk<\/strong><\/td>\r\n<td>10<\/td>\r\n<td>45.20000<\/td>\r\n<td>3.04777<\/td>\r\n<td>452.00000<\/td>\r\n<td>42.00000<\/td>\r\n<td>53.00000<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<div align=\"center\">\r\n<table>\r\n<thead>\r\n<tr>\r\n<td><\/td>\r\n<td><strong>trdmill<\/strong><\/td>\r\n<td><strong>Onemlwlk<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td><strong>Trdmill<\/strong><\/td>\r\n<td>r= 1.00000<\/td>\r\n<td>r = 0.37301\r\n\r\np &lt; 0.2884<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Onemlwlk<\/strong><\/td>\r\n<td>r = 0.37301\r\n\r\np &lt; 0.2884<\/td>\r\n<td>r = 1.00000<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n\r\n<hr \/>\r\n\r\n<h2>Testing the significance of the sample correlation coefficient<\/h2>\r\nWhen we compute the r statistic (correlation coefficient) the relationship that we observe is specific to the sample from which the data were drawn. If we wish to compute the population parameter of a correlation coefficient, that is the extension of the statistic for the sample to the parameter in the population, then our next step is to compute the rho statistic \u2013 rho is the population parameter estimate of the correlation coefficient and it is determined using a t test with (n-2 degrees of freedom).\r\n\r\nTo determine if the computed correlation coefficient is equal to 0 as in the null hypothesis test:\u00a0 H<sub>0<\/sub>: r = 0 at\u00a0 p&lt;0.05 we use the following equation:\r\n<p style=\"text-align: center\">[latex]t = r \\sqrt\\frac{n-2}{1-r^2}[\/latex]<\/p>\r\nwith the degrees of freedom (npairs - 2).\r\n\r\nTherefore, in the example presented above, the correlation coefficient was r=0.37, and the sample size was n=10. The t value to evaluate the population parameter is shown below with degrees of freedom = (npairs - 2) = (10 \u2013 2) = 8.\r\n\r\n<img src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-300x25.png\" alt=\"\" class=\" wp-image-667 aligncenter\" width=\"1020\" height=\"85\" \/>\r\n\r\nThe <em>t <\/em>critical value for t=1.126 with df=8 is 2.31 for p&lt;0.05. Therefore, because our t statistic is less than the critical value, we would accept the null hypothesis at p&lt;0.05 and suggest that in this sample, the estimate of the relationship between treadmill VO2 maximum scores with 1-mile walk test scores is not an estimate of the true population parameter (i.e. the rho score). Finally, in addition to computing the significance of the correlation coefficient, we can also determine the strength of the correlation coefficient.\u00a0 Typically,\u00a0 the decision rule concerning the strength of a correlation coefficient is as follows: if the absolute value of r is low (&lt;0.7) then we say that is no correlation, but if the absolute value is (&gt;0.7) then we say that there is a correlation between the scores on the variable x and the scores on the variable y.\r\n\r\n<hr \/>\r\n\r\n<h3><strong>Strength of the Correlation<\/strong><\/h3>\r\nThe strength of the correlation is determined by squaring the value of r (the correlation coefficient) and multiplying the result by 100. Taken in this way, we are able to express the bivariate correlation (i.e. the relationship between two variables) as a percent of variance that is explained between the two variables.\r\n\r\nFor example, if we square the correlation coefficient computed for the relationship between the VO<sub>2<\/sub> on the treadmill and the VO<sub>2<\/sub> on the 1-mile walk test, as follows:\r\n\r\nr = 0.37 and r<sup>2<\/sup> = 0.139 x 100 = approximately 14%\r\n\r\nWe can then say that the variable x and the variable y have a very low relationship and when this relationship is expressed in terms of variance, then the variables x and y in this example share only about 14% of the variance between these two variables, leaving more than 86% of the variance between these two variables unexplained.\r\n\r\n<strong>Conversely<\/strong>, if we had computed a correlation coefficient of 0.9 between the variable x and the variable y then we would say that there is a strong relationship and could express the variance shared by these two variables as follows:\r\n\r\nr = 0.9 and r<sup>2<\/sup> = 0.81 x 100 = approximately 81% explained variance.\r\n\r\n<hr \/>\r\n\r\n<h2 style=\"text-align: left\">Here is what we covered in this chapter<\/h2>\r\nIn this chapter you were introduced to:\r\n<ul>\r\n \t<li style=\"text-align: left\">The Pearson Product Moment Correlation Coefficient which we defined as an estimate of a relationship between two dependent variables.<\/li>\r\n \t<li style=\"text-align: left\">We also stated, explicitly, that the outcome estimate of the Pearson Product Moment Correlation Coefficient does NOT imply cause or causality between the two variables.<\/li>\r\n \t<li style=\"text-align: left\">The correlation coefficient, which is represented by the letter \u2018r\u2019 expresses a positive relationship between two variables (a bivariate relationship) when the r-value is greater than 0 and less than 1, a negative relationship between two variables when the r value is less than 0 and greater than -1, and no relationship when the r-value is in close proximity to 0 and is deemed to be not significant based on the formula: [latex]t = r \\sqrt\\frac{n-2}{1-r^2}[\/latex]\u00a0 with degrees of freedom (n_pairs - 2).<\/li>\r\n \t<li style=\"text-align: left\">In the examples presented here we observed how SAS code enables us to not only produce the estimates of the relationship but also produce a visual representation of the data from the two variables being compared and include a representative line of best fit.<\/li>\r\n<\/ul>\r\n\r\n<hr \/>\r\n\r\n<h2 style=\"text-align: left\">Practice Question for This Chapter<\/h2>\r\nSo, you\u2019ve decided to take on a positive lifestyle that, among other behaviours, includes changes in diet and exercise. You are really interested in eating smarter and becoming more active to enhance your cardiovascular efficiency. You want to become physically fit. But, how does one know that they are achieving a higher level of physical fitness? For some individuals, they may perceive that they are achieving a state of physical fitness by simply looking in the mirror after bathing and observing a change in body shape. While this approach invokes a response, it is not a good indicator of the intrinsic cardiovascular changes that you may actually be gaining. An alternative to mirror gazing is to measure heart rate response after performing a physically demanding task. For example, for many individuals measuring heart rate after climbing stairs is a good indication that their involvement in physical fitness pursuits is having a positive change in cardiovascular dynamics. While this approach seems extremely simple it is certainly easily measured, and changes are easily recognized.\r\n\r\nIn the Canadian Physical Activity Test novice fire fighters are evaluated on a stepping test in which they are required to walk on a stepping ergometer (a treadmill like device that simulates stepping) at a stepping rate of 60 steps per minute for three minutes while wearing two 5.67 kg weights on their shoulders. The weights are used to represent wearing fully charged air packs during an actual fire-fighting event. In the following fictitious experiment, data were collected from a sample of 20 individuals ranging in ages from 40 to 60 years that climbed 180 steps at a rate of 60 steps per minute. Heart rates were measured in each participant within the first minute following activity and 3 minutes following the activity. The number of minutes of physical activity in which the individual was engaged per week was also recorded for each participant.\r\n\r\nIn this exercise compute the correlation coefficient of the relationship between the reported number of minutes of physical activity in which the individual reportedly averaged per week with both the immediate heart rate response to stair climbing (1-minute post-exercise heart rate) and the 3-minute recovery heart rate following the stair climbing exercise. Produce the correlation coefficient in table form and a graphical representation of each bivariate relationship. Likewise, determine the significance of the relationship using the formulae shown above.\r\n<h3>Table of Raw Data from the Mock Stair Climbing Experiment<\/h3>\r\n<table class=\"aligncenter\">\r\n<tbody>\r\n<tr>\r\n<td style=\"text-align: center\">Participant<\/td>\r\n<td style=\"text-align: center\">Age<\/td>\r\n<td style=\"text-align: center\">Amount of exercise per week (minutes)<\/td>\r\n<td style=\"text-align: center\">1-minute post-exercise heart rate (bpm)<\/td>\r\n<td style=\"text-align: center\">3-minute post-exercise heart rate (bpm)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">01<\/td>\r\n<td style=\"text-align: center\">56<\/td>\r\n<td style=\"text-align: center\">420<\/td>\r\n<td style=\"text-align: center\">144<\/td>\r\n<td style=\"text-align: center\">75<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">02<\/td>\r\n<td style=\"text-align: center\">56<\/td>\r\n<td style=\"text-align: center\">315<\/td>\r\n<td style=\"text-align: center\">163<\/td>\r\n<td style=\"text-align: center\">84<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">03<\/td>\r\n<td style=\"text-align: center\">45<\/td>\r\n<td style=\"text-align: center\">210<\/td>\r\n<td style=\"text-align: center\">178<\/td>\r\n<td style=\"text-align: center\">97<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">04<\/td>\r\n<td style=\"text-align: center\">49<\/td>\r\n<td style=\"text-align: center\">210<\/td>\r\n<td style=\"text-align: center\">147<\/td>\r\n<td style=\"text-align: center\">66<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">05<\/td>\r\n<td style=\"text-align: center\">47<\/td>\r\n<td style=\"text-align: center\">140<\/td>\r\n<td style=\"text-align: center\">144<\/td>\r\n<td style=\"text-align: center\">88<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">06<\/td>\r\n<td style=\"text-align: center\">56<\/td>\r\n<td style=\"text-align: center\">105<\/td>\r\n<td style=\"text-align: center\">142<\/td>\r\n<td style=\"text-align: center\">101<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">07<\/td>\r\n<td style=\"text-align: center\">53<\/td>\r\n<td style=\"text-align: center\">70<\/td>\r\n<td style=\"text-align: center\">180<\/td>\r\n<td style=\"text-align: center\">117<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">08<\/td>\r\n<td style=\"text-align: center\">59<\/td>\r\n<td style=\"text-align: center\">350<\/td>\r\n<td style=\"text-align: center\">144<\/td>\r\n<td style=\"text-align: center\">53<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">09<\/td>\r\n<td style=\"text-align: center\">44<\/td>\r\n<td style=\"text-align: center\">90<\/td>\r\n<td style=\"text-align: center\">190<\/td>\r\n<td style=\"text-align: center\">106<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">10<\/td>\r\n<td style=\"text-align: center\">47<\/td>\r\n<td style=\"text-align: center\">315<\/td>\r\n<td style=\"text-align: center\">144<\/td>\r\n<td style=\"text-align: center\">57<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">11<\/td>\r\n<td style=\"text-align: center\">46<\/td>\r\n<td style=\"text-align: center\">420<\/td>\r\n<td style=\"text-align: center\">124<\/td>\r\n<td style=\"text-align: center\">55<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">12<\/td>\r\n<td style=\"text-align: center\">56<\/td>\r\n<td style=\"text-align: center\">315<\/td>\r\n<td style=\"text-align: center\">133<\/td>\r\n<td style=\"text-align: center\">54<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">13<\/td>\r\n<td style=\"text-align: center\">55<\/td>\r\n<td style=\"text-align: center\">210<\/td>\r\n<td style=\"text-align: center\">158<\/td>\r\n<td style=\"text-align: center\">77<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">14<\/td>\r\n<td style=\"text-align: center\">59<\/td>\r\n<td style=\"text-align: center\">210<\/td>\r\n<td style=\"text-align: center\">147<\/td>\r\n<td style=\"text-align: center\">86<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">15<\/td>\r\n<td style=\"text-align: center\">60<\/td>\r\n<td style=\"text-align: center\">140<\/td>\r\n<td style=\"text-align: center\">164<\/td>\r\n<td style=\"text-align: center\">98<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">16<\/td>\r\n<td style=\"text-align: center\">40<\/td>\r\n<td style=\"text-align: center\">105<\/td>\r\n<td style=\"text-align: center\">162<\/td>\r\n<td style=\"text-align: center\">101<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">17<\/td>\r\n<td style=\"text-align: center\">53<\/td>\r\n<td style=\"text-align: center\">70<\/td>\r\n<td style=\"text-align: center\">176<\/td>\r\n<td style=\"text-align: center\">117<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">18<\/td>\r\n<td style=\"text-align: center\">54<\/td>\r\n<td style=\"text-align: center\">350<\/td>\r\n<td style=\"text-align: center\">144<\/td>\r\n<td style=\"text-align: center\">59<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">19<\/td>\r\n<td style=\"text-align: center\">40<\/td>\r\n<td style=\"text-align: center\">90<\/td>\r\n<td style=\"text-align: center\">184<\/td>\r\n<td style=\"text-align: center\">126<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center\">20<\/td>\r\n<td style=\"text-align: center\">60<\/td>\r\n<td style=\"text-align: center\">315<\/td>\r\n<td style=\"text-align: center\">134<\/td>\r\n<td style=\"text-align: center\">77<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Some hints to get you started<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<p class=\"indent\">DATA hrCorr01;<\/p>\r\nTITLE 'CORRELATION BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND HR RESPONSES TO STAIR CLIMBING';\r\nINFILE '\/HOME\/USERNAME\/YOURFOLDERS\/HRCORR.DAT' DELIMITER= '09'X ;\r\n\/* NOTES \u2013 IF YOU USE THE INFILE STATEMENT AS SHOWN ABOVE THEN BE SURE TO\r\nCHANGE THE USERNAME AND FOLDERS WHERE THE DATA RESIDE, ALSO SINCE THIS EXAMPLE IS TAKEN DIRECTLY FROM THE TABLE BE SURE TO SET DELIMITER TO TAB BETWEEN VALUES *\/\r\nINPUT ID AGE EX_MIN HR_1MIN HR_3MIN;\r\nPROC CORR PEARSON; VAR EX_MIN HR_1MIN HR_3MIN; RUN;\r\nPROC SGPLOT NOAUTOLEGEND DATA= hrCorr01;\r\nTITLE1 \"SCATTERPLOT OF CORR BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND IMMEDIATE POST EXERCISE HEART RATE RESPONSE TO STAIR CLIMBING\";\r\nTITLE2 \"LINE OF BEST FIT ADDED TO SCATTERPLOT\";\r\nLABEL\u00a0 EX_MIN\u00a0 ='REPORTED EXERCISE IN MINUTES PER WEEK'\r\nHR_1MIN ='IMMEDIATE POST EXERCISE HEART RATE';\r\nREG Y= EX_MIN\u00a0 \u00a0X= HR_1MIN; RUN;\r\n<div>\r\n<p class=\"indent\">PROC SGPLOT NOAUTOLEGEND DATA= hrCorr01;<\/p>\r\n<p class=\"indent\">TITLE1\u00a0 \"SCATTERPLOT OF CORR BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND 3 MINUTE POST EXERCISE HEART RATE RECOVDERY TO STAIR CLIMBING\";<\/p>\r\n<p class=\"indent\">TITLE2\u00a0 \"LINE OF BEST FIT ADDED TO SCATTERPLOT\";<\/p>\r\n<p class=\"indent\">LABEL\u00a0 EX_MIN\u00a0 ='REPORTED EXERCISE IN MINUTES PER WEEK'<\/p>\r\n<p class=\"indent\">HR_3MIN ='3 MINUTE RECOVERY HEART RATE';<\/p>\r\n<p class=\"indent\">REG Y= EX_MIN\u00a0 \u00a0X= HR_3MIN;<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n* Explain the outcome of your calculation in terms related to the original research question.\r\n\r\n&nbsp;\r\n\r\n<strong>\u00a0<\/strong>\r\n\r\n&nbsp;\r\n\r\n<\/div>","rendered":"<h1>Defining the Correlation Coefficient for Continuous Data: the Pearson Product Moment Correlation Coefficient<\/h1>\n<p>Pearson\u2019s Product Moment Correlation Coefficient is aptly named for the mathematical computational steps that are used to produce the outcome.\u00a0 First, the computation is based on the multiplication of variables, which result in generating a product. Second, the variables, labelled x and y, are computed as independent statistical moments, whereby each score is evaluated against the variable\u2019s algebraic measure of centrality of the group scores, a.k.a. the mean. In this way, the correlation coefficient provides the researcher with an estimate of a relationship between two dependent variables.<\/p>\n<p>The outcome estimate of the Pearson Product Moment Correlation Coefficient does NOT imply cause or causality between the two variables. Rather, the outcome estimate is merely an estimate of how closely two variables describe independent responses for a sample. The correlation coefficient is calculated by combining the estimates of variance on each of the separately measured variables of interest.<\/p>\n<p>Specifically, the correlation coefficient is a ratio score that ranges from -1.00 to +1.00 and is created from a cross product:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-300x43.png\" alt=\"\" class=\"size-medium wp-image-627 aligncenter\" width=\"300\" height=\"43\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-300x43.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-65x9.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-225x32.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1-350x50.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/xprod1.png 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>as the numerator term and then adjusted through division by the error term in the denominator, which is the square root of the product of the sum of squares for the x variable and the sum of squares for the y variable, as shown here:<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1-300x45.png\" alt=\"\" class=\"size-medium wp-image-626 aligncenter\" width=\"300\" height=\"45\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1-300x45.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1-65x10.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1-225x33.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumsquares1.png 336w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The formula to compute the Pearson product-moment correlation coefficient is shown here:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr1-300x59.png\" alt=\"\" class=\"wp-image-625 aligncenter\" width=\"544\" height=\"107\" \/><\/p>\n<p>When presented graphically, the paired measures of the x and y variables for the set of scores are represented as a single point within the graphing space. The calculation of the correlation coefficient describes the mathematical relationship between the x and y variable pairs are associated within a geometric space.\u00a0 The following three graphs illustrate the extremes of the Pearson Product Moment Correlation Coefficients for the relationships between x and y variable pairs. In Figure 1, the relationship illustrates a Pearson Product Moment Correlation Coefficient as extreme positive with an r value of 1.00. In Figure 2, the relationship illustrates an extreme negative r value of -1.00.\u00a0 In Figure 3, the relationship is shown as a Pearson Product Moment Correlation Coefficient of zero, or no mathematical relationship between each participant\u2019s paired x and y scores.<\/p>\n<p>Figure 1. Representation of the Pearson Product Moment Correlation Coefficient as r=1.00<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic1.png\" alt=\"\" class=\"wp-image-633 aligncenter\" width=\"331\" height=\"326\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic1.png 251w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic1-65x64.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic1-225x221.png 225w\" sizes=\"auto, (max-width: 331px) 100vw, 331px\" \/><\/p>\n<p>In the figure above,\u00a0 the cluster of paired scores on the variable x and the variable y are presented in a positive direction within the graphing space. For each individual\u2019s score on the x variable there is an equal score on the y variable relative to the scale of scores. This means that a correspondingly high score on the y variable matches a high score on the x variable; and similarly a correspondingly low score on the y variable matches a low score on the x variable.\u00a0 When the x and y variables as represented as a single point in the graphing space the resulting image suggests a positive correlation between the variables x and y for the set of participants\u2019 scores.<\/p>\n<p>Figure 2. Representation of the Pearson Product Moment Correlation Coefficient as r= -1.00<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic2.png\" alt=\"\" class=\"wp-image-632 aligncenter\" width=\"313\" height=\"325\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic2.png 227w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic2-65x68.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic2-225x234.png 225w\" sizes=\"auto, (max-width: 313px) 100vw, 313px\" \/><\/p>\n<p>In the figure above, the cluster of paired scores on the variable x and the variable y are presented in a negative direction within the graphing space. For each individual\u2019s score on the x variable, there is an inverse score on the y variable relative to the scale of scores. This means that a correspondingly high score on the y variable matches a low score on the x variable, and similarly, a correspondingly low score on the y variable matches a high score on the x variable.\u00a0 When the x and y variables as represented as a single point in the graphing space the resulting image suggests a negative correlation between the variables x and y for the set of participants\u2019 scores.<\/p>\n<p>Figure 3. Representation of the Pearson Product Moment Correlation Coefficient as r= 0.00<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic3.png\" alt=\"\" class=\"wp-image-631 aligncenter\" width=\"299\" height=\"300\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic3.png 206w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic3-150x150.png 150w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corrPic3-65x65.png 65w\" sizes=\"auto, (max-width: 299px) 100vw, 299px\" \/><\/p>\n<p>In Figure 3, above, the cluster of paired scores on the variable x and the variable y are presented as having no definitive direction within the graphing space. For each individual\u2019s score on the x variable, there is no corresponding score on the y variable relative to the scale of scores. In this instance, the x and y variables are simply represented as pairs of scores within the graphing space. No relationship exists when there is complete randomness in the scoring by an individual on the x and on the y variables and thereby do not depict a relationship between the two variables for the set of participants\u2019 scores.<\/p>\n<p>The correlation coefficient provides the researcher with an estimate of a relationship between two variables. The Pearson Product Moment Correlation Coefficient does\u00a0<strong>NOT<\/strong>\u00a0imply cause or causality between the two variables. Rather, the measure is merely an estimate of how closely two variables describe independent responses for a sample. The correlation coefficient is calculated by combining the measures of variance on each of the separately measured variables, as shown in the following formula:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corr1-300x150.gif\" alt=\"\" class=\"size-medium wp-image-630 aligncenter\" width=\"300\" height=\"150\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corr1-300x150.gif 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corr1-65x33.gif 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/corr1-225x113.gif 225w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<hr \/>\n<h2>A SAS Example<\/h2>\n<p>Consider the following data set, with 6 participants measured on two separate variables.\u00a0 Your intention is to determine if the group measures on VAR_1 are similar to the group measures of VAR_2. For those of you that need more tangible labels, let\u2019s consider that VAR_1 represents IQ scores and that VAR_2 represents SHOE SIZE.<\/p>\n<p>So that our query is simply, is there a relationship between IQ scores and SHOE SIZE. In order to analyze these data, you create the following SAS program which produces the output shown below.<\/p>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">SAS Code to produce Pearson Correlation Coefficient and A Line of Best Fit in a Scatterplot<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<div>\n<p class=\"indent\">DATA CORREX1;<\/p>\n<p class=\"indent\">\u00a0 TITLE &#8216;CORRELATION BETWEEN 2 MEASURES IN SAME PERSON&#8217;;<\/p>\n<p class=\"indent\">INPUT ID VAR1 VAR2;<\/p>\n<p class=\"indent\">LABEL VAR1=&#8217;MEASURE FOR VARIABLE 1&#8242;<\/p>\n<p class=\"indent\">\u00a0\u00a0\u00a0\u00a0\u00a0 VAR2=&#8217;MEASURE FOR VARIABLE 2&#8242;;<\/p>\n<p class=\"indent\">DATALINES;<\/p>\n<p class=\"indent\">001 55 7<\/p>\n<p class=\"indent\">002 77 9<\/p>\n<p class=\"indent\">003 88 10<\/p>\n<p class=\"indent\">004 92 10.5<\/p>\n<p class=\"indent\">005 100 11<\/p>\n<p class=\"indent\">006 105 12<\/p>\n<p class=\"indent\">;<\/p>\n<p class=\"indent\">RUN;<\/p>\n<p class=\"indent\">PROC UNIVARIATE; VAR VAR1 VAR2;<\/p>\n<p class=\"indent\">PROC CORR PEARSON; VAR VAR1 VAR2;<\/p>\n<p class=\"indent\">PROC SGPLOT NOAUTOLEGEND DATA= CORREX1;<\/p>\n<p class=\"indent\">TITLE1\u00a0 &#8220;SCATTER PLOT OF CORRELATION BETWEEN VAR1 AND VAR2&#8221;;<\/p>\n<p class=\"indent\">TITLE2\u00a0 &#8220;LINE OF BEST FIT ADDED TO SCATTERPLOT&#8221;;<\/p>\n<p class=\"indent\">REG Y=VAR1 X=VAR2;<\/p>\n<p class=\"indent\">RUN;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><strong>Output from PROC CORR with Corresponding Line of Best Fit in a Scatterplot<\/strong><\/p>\n<p><strong>Correlation between 2 measures in the same person using the SAS PROC<\/strong><strong> CORR Procedure. Table 1. Simple Statistics<br \/>\n<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table style=\"width: 0px\">\n<thead>\n<tr>\n<td style=\"width: 59.4px\"><strong>Variable<\/strong><\/td>\n<td style=\"width: 11.1333px\"><strong>N<\/strong><\/td>\n<td style=\"width: 56.6833px\"><strong>Mean<\/strong><\/td>\n<td style=\"width: 54.9px\"><strong>Std Dev<\/strong><\/td>\n<td style=\"width: 67.1667px\"><strong>Sum<\/strong><\/td>\n<td style=\"width: 67.8px\"><strong>Minimum<\/strong><\/td>\n<td style=\"width: 70.1167px\"><strong>Maximum<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 59.4px\"><strong>Measure for Var_1 (IQ scores)<br \/>\n<\/strong><\/td>\n<td style=\"width: 11.1333px\">6<\/td>\n<td style=\"width: 56.6833px\">86.16667<\/td>\n<td style=\"width: 54.9px\">18.10433<\/td>\n<td style=\"width: 67.1667px\">517.00000<\/td>\n<td style=\"width: 67.8px\">55.00000<\/td>\n<td style=\"width: 70.1167px\">105.00000<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 59.4px\"><strong>Measure for Var_2 Shoe Size<br \/>\n<\/strong><\/td>\n<td style=\"width: 11.1333px\">6<\/td>\n<td style=\"width: 56.6833px\">9.91667<\/td>\n<td style=\"width: 54.9px\">1.74404<\/td>\n<td style=\"width: 67.1667px\">59.50000<\/td>\n<td style=\"width: 67.8px\">7.00000<\/td>\n<td style=\"width: 70.1167px\">12.00000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>Table 2. Matrix of Pearson Correlation Coefficients, N = 6, <\/strong><strong>Prob &gt; |r| under H0: Rho=0<\/strong><\/p>\n<div style=\"margin: auto;\">\n<table style=\"height: 181px; width: 403px;\">\n<thead>\n<tr>\n<td style=\"width: 161.333px\"><strong>\u00a0<\/strong><\/td>\n<td style=\"width: 85.1833px\"><strong>IQ scores (Var_1)<br \/>\n<\/strong><\/td>\n<td style=\"width: 114.25px\"><strong>Shoe Size (Var_2)<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"width: 161.333px\"><strong>IQ scores (Var_1)<\/strong><\/td>\n<td style=\"width: 85.1833px\">1.00000<\/p>\n<p>&nbsp;<\/td>\n<td style=\"width: 114.25px\">r= 0.99500<\/p>\n<p>p &lt;.0001<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 161.333px\"><strong>Shoe Size (Var_2)<\/strong><\/td>\n<td style=\"width: 85.1833px\">r= 0.99500<\/p>\n<p>p &lt;.0001<\/td>\n<td style=\"width: 114.25px\">1.00000<\/p>\n<p>&nbsp;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-300x225.png\" alt=\"\" class=\"wp-image-637 aligncenter\" width=\"467\" height=\"350\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-300x225.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-65x49.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-225x169.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1-350x263.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/scatter1.png 432w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/p>\n<p>The results indicate that there is a strong correlation between IQ scores and shoe size as indicated by the correlation coefficient value in Table 2 of the SAS output in the scatterplot, above. The reported correlation coefficient (r value) was 0.995. which is considered statistically significant (p&lt;0.0001)<a class=\"footnote\" title=\"Note: just because the p value extends beyond 0.01 you need only to report p&lt;0.01\" id=\"return-footnote-618-1\" href=\"#footnote-618-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a>. The r value indicates that as a group the data on each variable are traveling in the same direction. In other words, low IQ scores were associated with small shoe sizes and high IQ scores were associated with larger shoe sizes.<\/p>\n<hr \/>\n<h2>Another SAS Working Example<\/h2>\n<p>Consider the following comparison of VO<sub>2<\/sub> maximum tests to illustrate the computations for the Pearson product-moment correlation coefficient.<\/p>\n<p>An individual\u2019s ability to perform maximal re-synthesis of ATP is often determined from their estimated VO<sub>2<\/sub> maximum. Yet the true estimate of VO<sub>2<\/sub> maximum requires an individual to undergo an extensive performance test in a \u201cclinical or laboratory\u201d setting.<\/p>\n<p>Further, because physical fitness is often established from the VO<sub>2<\/sub> maximum, researchers strive to develop approaches that can provide a suitable estimate for VO<sub>2<\/sub> maximum without requiring the laboratory test. To this end, several \u201cfield tests\u201d have been presented as reliable and valid proxies for the laboratory estimate of VO<sub>2<\/sub> maximum.<\/p>\n<p>The validity of field-tests for VO<sub>2<\/sub> maximum as effective measures of true physiological functioning within this system are based on the linear relationship between heart rate and oxygen consumption. Since the changes in heart rate match the changes in aerobic metabolism, an individual\u2019s ability to respire can be predicted indirectly by heart rate rather than the direct determination of oxygen utilization from a controlled laboratory setting.<\/p>\n<p>Laboratory tests for VO<sub>2<\/sub> maximum typically require that the individual runs or walks on a treadmill, or cycles on a standard bicycle ergometer while expired air is collected and the oxygen concentration in the expired air, is measured. The field tests, however, can use several stimulus modalities (e.g. walking, running, stepping, and cycling) and rather than measure the oxygen concentration in expired air, the technician simply records heart rate at specific stages of the exercise stress test. The relationship between field-tests and a declared \u201cgold standard\u201d is determined by comparing the statistical probability of the association between the predictive nature of the field test and a baseline reference standard measured in the laboratory.<\/p>\n<p>In determining the accuracy of a clinical or diagnostic test, researchers compare the performance of subjects on the selected diagnostic (field) test against the &#8220;gold standard\u201d. In the following example, this clinical epidemiological approach was used to determine the accuracy of field tests for predicting maximal oxygen consumption against a laboratory standard treadmill test (Bruce protocol). The field tests included the Cooper&#8217;s 12-minute run, the Astrand-Rhyming bicycle test, the Canadian Aerobic Fitness Test, and the one-mile walking test. A sample of the results for each test is presented in the table, below.<\/p>\n<h5 style=\"text-align: center\">Table of VO2 Maximum Estimates For A Sample Of Ten Individuals On 5 Different Procedures<\/h5>\n<table class=\"aligncenter\" style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">Subject<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">treadmill<br \/>\nVO<sub>2<\/sub>\u00a0max<br \/>\nml\/kg\/min<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">12-minute run<br \/>\nVO<sub>2<\/sub>\u00a0max<br \/>\nml\/kg\/min<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">Bicycle ergometer<br \/>\nVO<sub>2\u00a0<\/sub>max<br \/>\nml\/kg\/min<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">Step test<br \/>\nVO<sub>2<\/sub>\u00a0max<br \/>\nml\/kg\/min<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">1-mile walk test<br \/>\nVO<sub>2<\/sub>\u00a0max<br \/>\nml\/kg\/min<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">01<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">47<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">33<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">44<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">02<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">36<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">19<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">53<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">53<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">43<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">03<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">55<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">25<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">49<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">61<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">47<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">04<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">39<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">41<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">23<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">56<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">05<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">27<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">50<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">58<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">06<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">46<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">39<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">52<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">61<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">53<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">07<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">43<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">36<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">55<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">08<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">29<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">31<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">42<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">53<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">42<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">09<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">54<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">28<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">44<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">56<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10.8997%;text-align: center;vertical-align: middle\">10<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">37<\/td>\n<td style=\"width: 17.474%;text-align: center;vertical-align: middle\">44<\/td>\n<td style=\"width: 21.1073%;text-align: center;vertical-align: middle\">54<\/td>\n<td style=\"width: 15.7439%;text-align: center;vertical-align: middle\">57<\/td>\n<td style=\"width: 18.6851%;text-align: center;vertical-align: middle\">45<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The following computations illustrate the application of the Pearson product-moment correlation coefficient to the oxygen consumption data shown above.<\/p>\n<p>STEP 1: Select two variables to compare\u00e0, for example, we will begin with VO2 measured with the treadmill test versus VO2 measured with the 1-mile walk test. The mean for the scores on the treadmill, which in this example we designate as the x variable is 44.3 (\u00b1 9.23), and the scores on the walk test, which in this example we designate as the y variable and is 45.2 (\u00b1 3.04).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-300x42.png\" alt=\"\" class=\"size-medium wp-image-642 aligncenter\" width=\"300\" height=\"42\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-300x42.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-65x9.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-225x31.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1-350x49.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/pearson1.png 504w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The mean score for the variable x and the mean score for the variable y are used independently in Step 2: computing variance for each selected variable.<\/p>\n<p>STEP 2:\u00a0Compute the sum of squares for the variance elements of each selected variable, separately, as shown below:<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-300x43.png\" alt=\"\" class=\"size-medium wp-image-645 aligncenter\" width=\"300\" height=\"43\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-300x43.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-65x9.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-225x32.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2-350x50.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/ssq2.png 419w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<table class=\"aligncenter\" style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">Scores on &#8220;x&#8221;<br \/>\ntreadmill<\/td>\n<td style=\"width: 32.526%;text-align: center\"><\/td>\n<td style=\"width: 39.4464%;text-align: center\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">47<\/td>\n<td style=\"width: 32.526%;text-align: center\">47 &#8211; 44.3 = 2.7<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(47 &#8211; 44.3)2= 7.29<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">36<\/td>\n<td style=\"width: 32.526%;text-align: center\">36 &#8211; 44.3 = -8.3<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(36 &#8211; 44.3)2= 68.89<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">55<\/td>\n<td style=\"width: 32.526%;text-align: center\">55 &#8211; 44.3 = 10.7<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(55 &#8211; 44.3)2= 114.49<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">39<\/td>\n<td style=\"width: 32.526%;text-align: center\">39 &#8211; 44.3 = -5.3<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(39 &#8211; 44.3)2= 28.09<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">57<\/td>\n<td style=\"width: 32.526%;text-align: center\">57 &#8211; 44.3 = 12.7<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(57 &#8211; 44.3)2= 161.29<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">46<\/td>\n<td style=\"width: 32.526%;text-align: center\">46 &#8211; 44.3 = 1.7<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(46 &#8211; 44.3)2= 2.89<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">43<\/td>\n<td style=\"width: 32.526%;text-align: center\">43 &#8211; 44.3 = -1.3<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(43 &#8211; 44.3)2= 1.69<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">29<\/td>\n<td style=\"width: 32.526%;text-align: center\">29 &#8211; 44.3 = -15.3<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(29 &#8211; 44.3)2= 234.09<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">54<\/td>\n<td style=\"width: 32.526%;text-align: center\">54 &#8211; 44.3 = 9.7<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(54 &#8211; 44.3)2= 94.09<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\">37<\/td>\n<td style=\"width: 32.526%;text-align: center\">37 &#8211; 44.3 = -7.3<\/td>\n<td style=\"width: 39.4464%;text-align: center\">(37 &#8211; 44.3)2= 53.29<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 27.8547%;text-align: center\"><\/td>\n<td style=\"width: 32.526%;text-align: center\">= 0<\/td>\n<td style=\"width: 39.4464%;text-align: center\">\u00a0= 766.01<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"border-collapse: collapse;width: 100%\">\n<tbody>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">Scores on &#8220;y&#8221;<br \/>\nthe walk test<\/td>\n<td style=\"width: 32.3529%;text-align: center\"><\/td>\n<td style=\"width: 38.7543%;text-align: center\"><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\n<td style=\"width: 32.3529%;text-align: center\">45 &#8211; 45.2= -0.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(45 &#8211; 45.2)2= 0.04<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">43<\/td>\n<td style=\"width: 32.3529%;text-align: center\">43 &#8211; 45.2 = -2.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(43 &#8211; 45.2)2= 4.84<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">47<\/td>\n<td style=\"width: 32.3529%;text-align: center\">47 &#8211; 45.2 = 1.8<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(47 &#8211; 45.2)2= 3.24<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\n<td style=\"width: 32.3529%;text-align: center\">44 &#8211; 45.2 = -1.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(44 &#8211; 45.2)2= 1.44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\n<td style=\"width: 32.3529%;text-align: center\">45 &#8211; 45.2 = -0.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(45 &#8211; 45.2)2= 0.04<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">53<\/td>\n<td style=\"width: 32.3529%;text-align: center\">53 &#8211; 45.2 = 7.8<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(53 &#8211; 45.2)2= 60.84<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\n<td style=\"width: 32.3529%;text-align: center\">44 &#8211; 45.2 = -1.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(44 &#8211; 45.2)2= 1.44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">42<\/td>\n<td style=\"width: 32.3529%;text-align: center\">42 &#8211; 45.2 = -3.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(42 &#8211; 45.2)2= 10.24<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">44<\/td>\n<td style=\"width: 32.3529%;text-align: center\">44 &#8211; 45.2 = -1.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(44 &#8211; 45.2)2= 1.44<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\">45<\/td>\n<td style=\"width: 32.3529%;text-align: center\">45 &#8211; 45.2 = -0.2<\/td>\n<td style=\"width: 38.7543%;text-align: center\">(45 &#8211; 45.2)2= 0.04<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 28.7197%;text-align: center\"><\/td>\n<td style=\"width: 32.3529%;text-align: center\">\u00a0= 0<\/td>\n<td style=\"width: 38.7543%;text-align: center\">= 83.6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>STEP 3: Compute the cross products of\u00a0 x and y using: \u00a0\u00a0 [latex](x_i - \\overline{x})(y_i - \\overline{y})[\/latex]<\/p>\n<table style=\"border-collapse: collapse;width: 67.0246%\">\n<tbody>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">participant<\/td>\n<td style=\"width: 24.9719%;text-align: center\">\u00a0\u00a0 [latex](x_i - \\overline{x})(y_i - \\overline{y})[\/latex]<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">01<\/td>\n<td style=\"width: 24.9719%;text-align: center\">2.7 * -0.2 = -0.54<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">02<\/td>\n<td style=\"width: 24.9719%;text-align: center\">-8.3 * -2.2 = 18.26<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">03<\/td>\n<td style=\"width: 24.9719%;text-align: center\">10.7 * 1.8 = 19.26<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">04<\/td>\n<td style=\"width: 24.9719%;text-align: center\">-5.3 * -1.2 = 6.36<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">05<\/td>\n<td style=\"width: 24.9719%;text-align: center\">12.7 * -0.2 = -2.54<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">06<\/td>\n<td style=\"width: 24.9719%;text-align: center\">1.7 * 7.8 = 13.26<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">07<\/td>\n<td style=\"width: 24.9719%;text-align: center\">-1.3 * -1.2 = 1.56<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">08<\/td>\n<td style=\"width: 24.9719%;text-align: center\">-15.3 * -3.2 = 48.96<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">09<\/td>\n<td style=\"width: 24.9719%;text-align: center\">9.7 * -1.2 = -11.64<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 12.6443%;text-align: center\">10<\/td>\n<td style=\"width: 24.9719%;text-align: center\">-7.3 * -0.2 =1.46<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 37.6162%;text-align: center\" colspan=\"2\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumxprod.png\" alt=\"\" class=\"alignnone size-full wp-image-646\" width=\"237\" height=\"25\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumxprod.png 237w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumxprod-65x7.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumxprod-225x24.png 225w\" sizes=\"auto, (max-width: 237px) 100vw, 237px\" \/>= 94.4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>STEP 4: Compute the denominator of the correlation coefficient using the square root of the product of the sum of squares for the x and the y variables.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-300x59.png\" alt=\"\" class=\"size-medium wp-image-649 aligncenter\" width=\"300\" height=\"59\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-300x59.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-65x13.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-225x44.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod-350x69.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sqsumxprod.png 430w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The specific values can be taken from the computations above where the <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumx-1.png\" alt=\"\" class=\"alignnone size-full wp-image-655\" width=\"151\" height=\"43\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumx-1.png 151w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumx-1-150x43.png 150w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumx-1-65x19.png 65w\" sizes=\"auto, (max-width: 151px) 100vw, 151px\" \/>= 766.01 and the\u00a0 <img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumy-1.png\" alt=\"\" class=\"alignnone size-full wp-image-654\" width=\"150\" height=\"43\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumy-1.png 150w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/sumy-1-65x19.png 65w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/>= 83.6 \u00a0 The denominator term is thus the square root of:\u00a0 SQRT<strong>(766.01 x 83.6) = SQRT(64038.44) = 253<\/strong><\/p>\n<p>STEP 5: Compute the correlation coefficient by substituting the values from that which was calculated, above.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-300x27.png\" alt=\"\" class=\"wp-image-656 aligncenter\" width=\"567\" height=\"51\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-300x27.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-65x6.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-225x21.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2-350x32.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rcorr2.png 634w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/p>\n<p>In our example, the correlation coefficient computed for the relationship between the VO2\u00a0on the treadmill and the VO2\u00a0on the 1 mile walk test = 0.37<\/p>\n<hr \/>\n<h2>Verifying Our Computations with SAS<\/h2>\n<p>The data set used in the example above included two columns of data: the VO2 max scores recorded for each participant on the treadmill test and the 1-mile walk test. The columns were separated by a tab character which we denote in our INFILE statement with the command: <strong>delimiter=&#8217;09&#8217;x<\/strong> . The data set has three variables: id, treadmill scores and 1-mile walk test scores.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">raw data set for three variables<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<div>\n<p class=\"indent\">01\u00a0\u00a0\u00a0 47\u00a0\u00a0\u00a0 45<\/p>\n<p class=\"indent\">02\u00a0\u00a0\u00a0 36\u00a0\u00a0\u00a0 43<\/p>\n<p class=\"indent\">03\u00a0\u00a0\u00a0 55\u00a0\u00a0\u00a0 47<\/p>\n<p class=\"indent\">04\u00a0\u00a0\u00a0 39\u00a0\u00a0\u00a0 44<\/p>\n<p class=\"indent\">05\u00a0\u00a0\u00a0 57\u00a0\u00a0\u00a0 45<\/p>\n<p class=\"indent\">06\u00a0\u00a0\u00a0 46\u00a0\u00a0\u00a0 53<\/p>\n<p class=\"indent\">07\u00a0\u00a0\u00a0 43\u00a0\u00a0\u00a0 44<\/p>\n<p class=\"indent\">08\u00a0\u00a0\u00a0 29\u00a0\u00a0\u00a0 42<\/p>\n<p class=\"indent\">09\u00a0\u00a0\u00a0 54\u00a0\u00a0\u00a0 44<\/p>\n<p class=\"indent\">10\u00a0\u00a0\u00a0 37\u00a0\u00a0\u00a0 45<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>The SAS program written for SAS Studio to compute the correlation coefficient for the relationship between the scores on the treadmill and the 1-mile walk test is shown here:<\/p>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">SAS Code to produce Pearson Correlation Coefficient for treadmill and the 1-mile walk test<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<div>\n<p class=\"indent\">DATA CORR1(LABEL= &#8216;CORRELATION COEFFICIENTS&#8217;);<\/p>\n<p class=\"indent\">TITLE &#8216;PRACTICE DATA SET TO COMPUTE CORRELATION COEFFICIENTS&#8217;;<\/p>\n<p class=\"indent\">INFILE &#8216;\/FOLDERS\/DATASETS\/CORR1.DAT&#8217; DELIMITER=&#8217;09&#8217;X ;<\/p>\n<p class=\"indent\">* THE DATA IN THE FILE CORR1.DAT ARE TAB DELIMITED;<\/p>\n<p class=\"indent\">INPUT ID 1-3 @4 TRDMILL ONEMLWLK;<\/p>\n<p class=\"indent\">PROC CORR; VAR TRDMILL ONEMLWLK;<\/p>\n<p class=\"indent\">RUN;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h3><a name=\"_Toc534877359\" id=\"_Toc534877359\"><\/a>Output from the SAS PROC CORR PROCEDURE<\/h3>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><strong>Variable<\/strong><\/td>\n<td><strong>N<\/strong><\/td>\n<td><strong>Mean<\/strong><\/td>\n<td><strong>Std Dev<\/strong><\/td>\n<td><strong>Sum<\/strong><\/td>\n<td><strong>Minimum<\/strong><\/td>\n<td><strong>Maximum<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>trdmill<\/strong><\/td>\n<td>10<\/td>\n<td>44.30000<\/td>\n<td>9.22617<\/td>\n<td>443.00000<\/td>\n<td>29.00000<\/td>\n<td>57.00000<\/td>\n<\/tr>\n<tr>\n<td><strong>Onemlwlk<\/strong><\/td>\n<td>10<\/td>\n<td>45.20000<\/td>\n<td>3.04777<\/td>\n<td>452.00000<\/td>\n<td>42.00000<\/td>\n<td>53.00000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div style=\"margin: auto;\">\n<table>\n<thead>\n<tr>\n<td><\/td>\n<td><strong>trdmill<\/strong><\/td>\n<td><strong>Onemlwlk<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Trdmill<\/strong><\/td>\n<td>r= 1.00000<\/td>\n<td>r = 0.37301<\/p>\n<p>p &lt; 0.2884<\/td>\n<\/tr>\n<tr>\n<td><strong>Onemlwlk<\/strong><\/td>\n<td>r = 0.37301<\/p>\n<p>p &lt; 0.2884<\/td>\n<td>r = 1.00000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h2>Testing the significance of the sample correlation coefficient<\/h2>\n<p>When we compute the r statistic (correlation coefficient) the relationship that we observe is specific to the sample from which the data were drawn. If we wish to compute the population parameter of a correlation coefficient, that is the extension of the statistic for the sample to the parameter in the population, then our next step is to compute the rho statistic \u2013 rho is the population parameter estimate of the correlation coefficient and it is determined using a t test with (n-2 degrees of freedom).<\/p>\n<p>To determine if the computed correlation coefficient is equal to 0 as in the null hypothesis test:\u00a0 H<sub>0<\/sub>: r = 0 at\u00a0 p&lt;0.05 we use the following equation:<\/p>\n<p style=\"text-align: center\">[latex]t = r \\sqrt\\frac{n-2}{1-r^2}[\/latex]<\/p>\n<p>with the degrees of freedom (npairs &#8211; 2).<\/p>\n<p>Therefore, in the example presented above, the correlation coefficient was r=0.37, and the sample size was n=10. The t value to evaluate the population parameter is shown below with degrees of freedom = (npairs &#8211; 2) = (10 \u2013 2) = 8.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-300x25.png\" alt=\"\" class=\"wp-image-667 aligncenter\" width=\"1020\" height=\"85\" srcset=\"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-300x25.png 300w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-768x63.png 768w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-65x5.png 65w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-225x19.png 225w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2-350x29.png 350w, https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-content\/uploads\/sites\/49\/2020\/05\/rtcorr2.png 900w\" sizes=\"auto, (max-width: 1020px) 100vw, 1020px\" \/><\/p>\n<p>The <em>t <\/em>critical value for t=1.126 with df=8 is 2.31 for p&lt;0.05. Therefore, because our t statistic is less than the critical value, we would accept the null hypothesis at p&lt;0.05 and suggest that in this sample, the estimate of the relationship between treadmill VO2 maximum scores with 1-mile walk test scores is not an estimate of the true population parameter (i.e. the rho score). Finally, in addition to computing the significance of the correlation coefficient, we can also determine the strength of the correlation coefficient.\u00a0 Typically,\u00a0 the decision rule concerning the strength of a correlation coefficient is as follows: if the absolute value of r is low (&lt;0.7) then we say that is no correlation, but if the absolute value is (&gt;0.7) then we say that there is a correlation between the scores on the variable x and the scores on the variable y.<\/p>\n<hr \/>\n<h3><strong>Strength of the Correlation<\/strong><\/h3>\n<p>The strength of the correlation is determined by squaring the value of r (the correlation coefficient) and multiplying the result by 100. Taken in this way, we are able to express the bivariate correlation (i.e. the relationship between two variables) as a percent of variance that is explained between the two variables.<\/p>\n<p>For example, if we square the correlation coefficient computed for the relationship between the VO<sub>2<\/sub> on the treadmill and the VO<sub>2<\/sub> on the 1-mile walk test, as follows:<\/p>\n<p>r = 0.37 and r<sup>2<\/sup> = 0.139 x 100 = approximately 14%<\/p>\n<p>We can then say that the variable x and the variable y have a very low relationship and when this relationship is expressed in terms of variance, then the variables x and y in this example share only about 14% of the variance between these two variables, leaving more than 86% of the variance between these two variables unexplained.<\/p>\n<p><strong>Conversely<\/strong>, if we had computed a correlation coefficient of 0.9 between the variable x and the variable y then we would say that there is a strong relationship and could express the variance shared by these two variables as follows:<\/p>\n<p>r = 0.9 and r<sup>2<\/sup> = 0.81 x 100 = approximately 81% explained variance.<\/p>\n<hr \/>\n<h2 style=\"text-align: left\">Here is what we covered in this chapter<\/h2>\n<p>In this chapter you were introduced to:<\/p>\n<ul>\n<li style=\"text-align: left\">The Pearson Product Moment Correlation Coefficient which we defined as an estimate of a relationship between two dependent variables.<\/li>\n<li style=\"text-align: left\">We also stated, explicitly, that the outcome estimate of the Pearson Product Moment Correlation Coefficient does NOT imply cause or causality between the two variables.<\/li>\n<li style=\"text-align: left\">The correlation coefficient, which is represented by the letter \u2018r\u2019 expresses a positive relationship between two variables (a bivariate relationship) when the r-value is greater than 0 and less than 1, a negative relationship between two variables when the r value is less than 0 and greater than -1, and no relationship when the r-value is in close proximity to 0 and is deemed to be not significant based on the formula: [latex]t = r \\sqrt\\frac{n-2}{1-r^2}[\/latex]\u00a0 with degrees of freedom (n_pairs &#8211; 2).<\/li>\n<li style=\"text-align: left\">In the examples presented here we observed how SAS code enables us to not only produce the estimates of the relationship but also produce a visual representation of the data from the two variables being compared and include a representative line of best fit.<\/li>\n<\/ul>\n<hr \/>\n<h2 style=\"text-align: left\">Practice Question for This Chapter<\/h2>\n<p>So, you\u2019ve decided to take on a positive lifestyle that, among other behaviours, includes changes in diet and exercise. You are really interested in eating smarter and becoming more active to enhance your cardiovascular efficiency. You want to become physically fit. But, how does one know that they are achieving a higher level of physical fitness? For some individuals, they may perceive that they are achieving a state of physical fitness by simply looking in the mirror after bathing and observing a change in body shape. While this approach invokes a response, it is not a good indicator of the intrinsic cardiovascular changes that you may actually be gaining. An alternative to mirror gazing is to measure heart rate response after performing a physically demanding task. For example, for many individuals measuring heart rate after climbing stairs is a good indication that their involvement in physical fitness pursuits is having a positive change in cardiovascular dynamics. While this approach seems extremely simple it is certainly easily measured, and changes are easily recognized.<\/p>\n<p>In the Canadian Physical Activity Test novice fire fighters are evaluated on a stepping test in which they are required to walk on a stepping ergometer (a treadmill like device that simulates stepping) at a stepping rate of 60 steps per minute for three minutes while wearing two 5.67 kg weights on their shoulders. The weights are used to represent wearing fully charged air packs during an actual fire-fighting event. In the following fictitious experiment, data were collected from a sample of 20 individuals ranging in ages from 40 to 60 years that climbed 180 steps at a rate of 60 steps per minute. Heart rates were measured in each participant within the first minute following activity and 3 minutes following the activity. The number of minutes of physical activity in which the individual was engaged per week was also recorded for each participant.<\/p>\n<p>In this exercise compute the correlation coefficient of the relationship between the reported number of minutes of physical activity in which the individual reportedly averaged per week with both the immediate heart rate response to stair climbing (1-minute post-exercise heart rate) and the 3-minute recovery heart rate following the stair climbing exercise. Produce the correlation coefficient in table form and a graphical representation of each bivariate relationship. Likewise, determine the significance of the relationship using the formulae shown above.<\/p>\n<h3>Table of Raw Data from the Mock Stair Climbing Experiment<\/h3>\n<table class=\"aligncenter\">\n<tbody>\n<tr>\n<td style=\"text-align: center\">Participant<\/td>\n<td style=\"text-align: center\">Age<\/td>\n<td style=\"text-align: center\">Amount of exercise per week (minutes)<\/td>\n<td style=\"text-align: center\">1-minute post-exercise heart rate (bpm)<\/td>\n<td style=\"text-align: center\">3-minute post-exercise heart rate (bpm)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">01<\/td>\n<td style=\"text-align: center\">56<\/td>\n<td style=\"text-align: center\">420<\/td>\n<td style=\"text-align: center\">144<\/td>\n<td style=\"text-align: center\">75<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">02<\/td>\n<td style=\"text-align: center\">56<\/td>\n<td style=\"text-align: center\">315<\/td>\n<td style=\"text-align: center\">163<\/td>\n<td style=\"text-align: center\">84<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">03<\/td>\n<td style=\"text-align: center\">45<\/td>\n<td style=\"text-align: center\">210<\/td>\n<td style=\"text-align: center\">178<\/td>\n<td style=\"text-align: center\">97<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">04<\/td>\n<td style=\"text-align: center\">49<\/td>\n<td style=\"text-align: center\">210<\/td>\n<td style=\"text-align: center\">147<\/td>\n<td style=\"text-align: center\">66<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">05<\/td>\n<td style=\"text-align: center\">47<\/td>\n<td style=\"text-align: center\">140<\/td>\n<td style=\"text-align: center\">144<\/td>\n<td style=\"text-align: center\">88<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">06<\/td>\n<td style=\"text-align: center\">56<\/td>\n<td style=\"text-align: center\">105<\/td>\n<td style=\"text-align: center\">142<\/td>\n<td style=\"text-align: center\">101<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">07<\/td>\n<td style=\"text-align: center\">53<\/td>\n<td style=\"text-align: center\">70<\/td>\n<td style=\"text-align: center\">180<\/td>\n<td style=\"text-align: center\">117<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">08<\/td>\n<td style=\"text-align: center\">59<\/td>\n<td style=\"text-align: center\">350<\/td>\n<td style=\"text-align: center\">144<\/td>\n<td style=\"text-align: center\">53<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">09<\/td>\n<td style=\"text-align: center\">44<\/td>\n<td style=\"text-align: center\">90<\/td>\n<td style=\"text-align: center\">190<\/td>\n<td style=\"text-align: center\">106<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">10<\/td>\n<td style=\"text-align: center\">47<\/td>\n<td style=\"text-align: center\">315<\/td>\n<td style=\"text-align: center\">144<\/td>\n<td style=\"text-align: center\">57<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">11<\/td>\n<td style=\"text-align: center\">46<\/td>\n<td style=\"text-align: center\">420<\/td>\n<td style=\"text-align: center\">124<\/td>\n<td style=\"text-align: center\">55<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">12<\/td>\n<td style=\"text-align: center\">56<\/td>\n<td style=\"text-align: center\">315<\/td>\n<td style=\"text-align: center\">133<\/td>\n<td style=\"text-align: center\">54<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">13<\/td>\n<td style=\"text-align: center\">55<\/td>\n<td style=\"text-align: center\">210<\/td>\n<td style=\"text-align: center\">158<\/td>\n<td style=\"text-align: center\">77<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">14<\/td>\n<td style=\"text-align: center\">59<\/td>\n<td style=\"text-align: center\">210<\/td>\n<td style=\"text-align: center\">147<\/td>\n<td style=\"text-align: center\">86<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">15<\/td>\n<td style=\"text-align: center\">60<\/td>\n<td style=\"text-align: center\">140<\/td>\n<td style=\"text-align: center\">164<\/td>\n<td style=\"text-align: center\">98<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">16<\/td>\n<td style=\"text-align: center\">40<\/td>\n<td style=\"text-align: center\">105<\/td>\n<td style=\"text-align: center\">162<\/td>\n<td style=\"text-align: center\">101<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">17<\/td>\n<td style=\"text-align: center\">53<\/td>\n<td style=\"text-align: center\">70<\/td>\n<td style=\"text-align: center\">176<\/td>\n<td style=\"text-align: center\">117<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">18<\/td>\n<td style=\"text-align: center\">54<\/td>\n<td style=\"text-align: center\">350<\/td>\n<td style=\"text-align: center\">144<\/td>\n<td style=\"text-align: center\">59<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">19<\/td>\n<td style=\"text-align: center\">40<\/td>\n<td style=\"text-align: center\">90<\/td>\n<td style=\"text-align: center\">184<\/td>\n<td style=\"text-align: center\">126<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center\">20<\/td>\n<td style=\"text-align: center\">60<\/td>\n<td style=\"text-align: center\">315<\/td>\n<td style=\"text-align: center\">134<\/td>\n<td style=\"text-align: center\">77<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Some hints to get you started<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p class=\"indent\">DATA hrCorr01;<\/p>\n<p>TITLE &#8216;CORRELATION BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND HR RESPONSES TO STAIR CLIMBING&#8217;;<br \/>\nINFILE &#8216;\/HOME\/USERNAME\/YOURFOLDERS\/HRCORR.DAT&#8217; DELIMITER= &#8217;09&#8217;X ;<br \/>\n\/* NOTES \u2013 IF YOU USE THE INFILE STATEMENT AS SHOWN ABOVE THEN BE SURE TO<br \/>\nCHANGE THE USERNAME AND FOLDERS WHERE THE DATA RESIDE, ALSO SINCE THIS EXAMPLE IS TAKEN DIRECTLY FROM THE TABLE BE SURE TO SET DELIMITER TO TAB BETWEEN VALUES *\/<br \/>\nINPUT ID AGE EX_MIN HR_1MIN HR_3MIN;<br \/>\nPROC CORR PEARSON; VAR EX_MIN HR_1MIN HR_3MIN; RUN;<br \/>\nPROC SGPLOT NOAUTOLEGEND DATA= hrCorr01;<br \/>\nTITLE1 &#8220;SCATTERPLOT OF CORR BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND IMMEDIATE POST EXERCISE HEART RATE RESPONSE TO STAIR CLIMBING&#8221;;<br \/>\nTITLE2 &#8220;LINE OF BEST FIT ADDED TO SCATTERPLOT&#8221;;<br \/>\nLABEL\u00a0 EX_MIN\u00a0 =&#8217;REPORTED EXERCISE IN MINUTES PER WEEK&#8217;<br \/>\nHR_1MIN =&#8217;IMMEDIATE POST EXERCISE HEART RATE&#8217;;<br \/>\nREG Y= EX_MIN\u00a0 \u00a0X= HR_1MIN; RUN;<\/p>\n<div>\n<p class=\"indent\">PROC SGPLOT NOAUTOLEGEND DATA= hrCorr01;<\/p>\n<p class=\"indent\">TITLE1\u00a0 &#8220;SCATTERPLOT OF CORR BETWEEN REPORTED WEEKLY PHYSICAL ACTIVITY AND 3 MINUTE POST EXERCISE HEART RATE RECOVDERY TO STAIR CLIMBING&#8221;;<\/p>\n<p class=\"indent\">TITLE2\u00a0 &#8220;LINE OF BEST FIT ADDED TO SCATTERPLOT&#8221;;<\/p>\n<p class=\"indent\">LABEL\u00a0 EX_MIN\u00a0 =&#8217;REPORTED EXERCISE IN MINUTES PER WEEK&#8217;<\/p>\n<p class=\"indent\">HR_3MIN =&#8217;3 MINUTE RECOVERY HEART RATE&#8217;;<\/p>\n<p class=\"indent\">REG Y= EX_MIN\u00a0 \u00a0X= HR_3MIN;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>* Explain the outcome of your calculation in terms related to the original research question.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>&nbsp;<\/p>\n<\/div>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-618-1\">Note: just because the p value extends beyond 0.01 you need only to report p&lt;0.01 <a href=\"#return-footnote-618-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":56,"menu_order":1,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-618","chapter","type-chapter","status-publish","hentry"],"part":614,"_links":{"self":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/users\/56"}],"version-history":[{"count":35,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/618\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/618\/revisions\/623"}],"part":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/parts\/614"}],"metadata":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapters\/618\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/media?parent=618"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/pressbooks\/v2\/chapter-type?post=618"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/contributor?post=618"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.library.upei.ca\/montelpare\/wp-json\/wp\/v2\/license?post=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}