已知一组数据为x,y,5,4,6,若这组数据的平均数为5,方差为2,求x-y的值

问题描述:

已知一组数据为x,y,5,4,6,若这组数据的平均数为5,方差为2,求x-y的值

(x+y+5+4+6)/5=5
(x-5)^2+(y-5)^2+(5-5)^2+(4-5)^2+(6-5)^2=2x2x5
x+y=10
(x-5)^2+(y-5)^2=18
(x-5)^2+(y-5)^2=x^2-10x+25+y^2-10y+25=x^2+y^2-10(x+y)+50=18
x^2+y^2 -10x10+50=18
x^2+y^2=68
(x+y)^2=x^2+y^2+2xy=100
2xy=32
(x-y)^2=x^2+y^2-2xy=68-32=36
x-y=6或-6