data covar_ex ; input group x y @@ ; cards ; 1 1 1 1 2 3 1 4 4 1 7 7 2 10 15 2 20 5 2 40 57 2 70 40 ; proc print; run; proc sort ; by group ; run; proc plot ; plot y*x ; by group ; run; proc sgplot ; scatter x=x y=y; by group ;run; proc corr cov ; var x y ; by group ; run ;