exercise:7dfb78dcdd: Difference between revisions
(Created page with "<div class="d-none"><math> \newcommand{\NA}{{\rm NA}} \newcommand{\mat}[1]{{\bf#1}} \newcommand{\exref}[1]{\ref{##1}} \newcommand{\secstoprocess}{\all} \newcommand{\NA}{{\rm NA}} \newcommand{\mathds}{\mathbb}</math></div> When we have pairs of data <math>(x_i,y_i)</math> that are outcomes of the pairs of dependent random variables <math>X</math>, <math>Y</math> we can estimate the coorelation coefficient <math>\rho</math> by <math display="block"> \bar r = \frac {...") |
No edit summary |
||
Line 1: | Line 1: | ||
When we have pairs of data <math>(x_i,y_i)</math> that are outcomes of the pairs of dependent random variables <math>X</math>, <math>Y</math> we can estimate the coorelation coefficient <math>\rho</math> by | |||
the pairs of dependent random variables <math>X</math>, <math>Y</math> we can estimate the coorelation | |||
coefficient | |||
<math>\rho</math> by | |||
<math display="block"> | <math display="block"> | ||
Line 15: | Line 6: | ||
where <math>\bar x</math> and <math>\bar y</math> are the sample means for <math>X</math> and <math>Y</math>, | where <math>\bar x</math> and <math>\bar y</math> are the sample means for <math>X</math> and <math>Y</math>, | ||
respectively, and <math>s_X</math> and <math>s_Y</math> are the sample standard deviations for <math>X</math> and <math>Y</math> | respectively, and <math>s_X</math> and <math>s_Y</math> are the sample standard deviations for <math>X</math> and <math>Y</math> | ||
(see | (see [[exercise:2efc106914|Exercise]]). Write a program to compute the sample means, variances, and correlation for such dependent | ||
program to compute the sample means, variances, and correlation for such dependent | data. Use your program to compute these quantities for Galton's data on heights of parents and children given in Appendix B. | ||
data. Use your program to compute these quantities for Galton's data on heights of | |||
parents and children given in Appendix B. | |||
Plot the equal density ellipses as defined in [[exercise:F25f83f07c |Exercise]] for <math>r = | |||
Plot the equal density ellipses as defined in | |||
4</math>, 6, and 8, and on the same graph print the values that appear in the table at the | 4</math>, 6, and 8, and on the same graph print the values that appear in the table at the | ||
appropriate points. For example, print 12 at the point | appropriate points. For example, print 12 at the point |
Latest revision as of 21:53, 14 June 2024
When we have pairs of data [math](x_i,y_i)[/math] that are outcomes of the pairs of dependent random variables [math]X[/math], [math]Y[/math] we can estimate the coorelation coefficient [math]\rho[/math] by
where [math]\bar x[/math] and [math]\bar y[/math] are the sample means for [math]X[/math] and [math]Y[/math], respectively, and [math]s_X[/math] and [math]s_Y[/math] are the sample standard deviations for [math]X[/math] and [math]Y[/math] (see Exercise). Write a program to compute the sample means, variances, and correlation for such dependent data. Use your program to compute these quantities for Galton's data on heights of parents and children given in Appendix B.
Plot the equal density ellipses as defined in Exercise for [math]r = 4[/math], 6, and 8, and on the same graph print the values that appear in the table at the appropriate points. For example, print 12 at the point [math](70.5,68.2)[/math], indicating that there were 12 cases where the parent's height was 70.5 and the child's was 68.12. See if Galton's data is consistent with the equal density ellipses.