with(stats): age := [1,1,1,1,2,2,2,3,3,4]; ppop := [4,5,7,3,3,3,1,1,1,1]; ave := dat -> stats[describe,mean](dat): sd := dat -> stats[describe,standarddeviation](dat): r := (x,y) -> stats[describe,linearcorrelation](x,y): aveAge := ave(age); sdAge := sd(age); avepp:= ave(ppop);sdpp:=sd(ppop); rAp := r(age,ppop); scatter:=(x,y) -> stats[statplots,scatterplot](x,y): scatter(age,ppop); sdline := t -> 2.9 - 1.92*(t-2): l1 := plot(sdline(t),t= -1..5): scatt := scatter(age,ppop): with(plots): display({l1,scatt}); rl := plot(2.9 - 0.78*1.92*(t-2),t=-1..5): display({l1,rl,scatt}); RMS := sqrt(1 - 'r'^2)*SDy; RMS := sqrt(1. - 0.78^2)*1.92; x_in_sus := (3.5 - ave(age))/sd(age); y_in_sus := x_in_sus * r(age,ppop); y_predicted := ave(ppop) + y_in_sus * sd(ppop); a_in_sus := (1 - 0.65)/1.2; Answer := (100 - 23.5)/2;