Let the elements in set A be x1,x2,x3,x4,x5
Now given mean is=5
Now subtracting 3 from each term we get,
New mean as (x1−3,x2−3…,x5−3)=5−3=2
So, sum of elements will be 2×5=10
Also given variance,
Var(X)=12
Now we know that subtracting 3 from each term will not change the variance,
So, Var(x1−3,x2−3,…x5−3)=12
⇒5∑(xi−3)2−4=12
⇒∑(xi−3)2=80
Now let elements in set B be y1,y2…y5
Given mean (y1,y2…y5)=8
Now adding each element by 2 we get,
New mean (y1+2,y2+2,…y5+2)=10
So, sum of elements will be 10×5=50
Also given Var(y1,y2…y5)=20
Similarly new variance,
Var(y1+2,y2+2…y5+2)=20
⇒5∑(yi+2)2−100=20
⇒∑(yi+2)2=120×5
Now finding, combined mean we get,
10∑i=15(xi−3)+∑(yi+2)=1010+50=6
And combined variance =10∑(xi−3)2+∑(yi+2)2−62
=1080+120×5−36=32
Hence, the sum of combined mean and variance will be 32+6=38