MONT 106N -- Identifying Patterns
The SD line and the point of averages.

For our class siblings vs. cousins data:
 

restart; 1; with(Statistics); -1 

`assign`(siblings, `<,>`(1, 5, 2, 2, 1, 1, 2, 1, 0, 3, 2, 1, 2, 1, 2, 1, 1, 1)); -1 

`assign`(cousins, `<,>`(11, 15, 6, 19, 14, 1, 5, 8, 5, 9, 3, 4, 11, 1, 4, 4, 5, 5)); -1

The correlation coefficient is:
 

Correlation(siblings, cousins, ignore); 1 

.4475769217 (1)
 

with(plots); -1; `assign`(SP, ScatterPlot(siblings, cousins, color = blue)); -1; `assign`(SDx, evalf(`*`(StandardDeviation(siblings), `*`(sqrt(`/`(17, 18)))))); 1
with(plots); -1; `assign`(SP, ScatterPlot(siblings, cousins, color = blue)); -1; `assign`(SDx, evalf(`*`(StandardDeviation(siblings), `*`(sqrt(`/`(17, 18)))))); 1
with(plots); -1; `assign`(SP, ScatterPlot(siblings, cousins, color = blue)); -1; `assign`(SDx, evalf(`*`(StandardDeviation(siblings), `*`(sqrt(`/`(17, 18)))))); 1
with(plots); -1; `assign`(SP, ScatterPlot(siblings, cousins, color = blue)); -1; `assign`(SDx, evalf(`*`(StandardDeviation(siblings), `*`(sqrt(`/`(17, 18)))))); 1
 

1.061387399 (2)
 

 

`assign`(SDy, evalf(`*`(StandardDeviation(cousins), `*`(sqrt(`/`(17, 18)))))); 1 

4.859761718 (3)
 

`assign`(Avex, Mean(siblings)); 1 

1.611111111 (4)
 

`assign`(Avey, Mean(cousins)); 1 

7.222222222 (5)
 

`assign`(LP, plot(`+`(Avey, `/`(`*`(SDy, `*`(`+`(x, `-`(Avex)))), `*`(SDx))), x = 0 .. 5)); -1; `assign`(AP, plot([[Avex, Avey]], style = point, symbol = circle, color = black)); -1
`assign`(LP, plot(`+`(Avey, `/`(`*`(SDy, `*`(`+`(x, `-`(Avex)))), `*`(SDx))), x = 0 .. 5)); -1; `assign`(AP, plot([[Avex, Avey]], style = point, symbol = circle, color = black)); -1
 

display(SP, LP, AP); 1 

Plot_2d