Solution-1
use mean function in R studio to get mean and sd function in R
to get the standard deviation
x1 <- c(3.5  ,3.7,  4.2, Â
3.9,  3.3,  4.1,  1.8, Â
4.8,  2.9,  3.1)
x1
length(x1)
x2 <- c(3.5  ,4.1,  4.5, Â
5.3,  3.3,  4.8,  3.5, Â
2.4  ,3.1,  3.5  ,5.2, Â
2.8)
length(x2)
mean(x1)
sd(x1)
mean(x2)
sd(x2)
Output:
length(x1)
[1] 10
> x2 <- c(3.5  ,4.1,  4.5, Â
5.3,  3.3,  4.8,  3.5, Â
2.4  ,3.1,  3.5  ,5.2, Â
2.8)
> length(x2)
[1] 12
> mean(x1)
[1] 3.53
> sd(x1)
[1] 0.8287206
> mean(x2)
[1] 3.833333
> sd(x2)
[1] 0.9413079
mean of x1=3.53
standard deviation of x1=s1=0.83
mean of x2=3.83
standard deviationof x2=s2=0.94
Solution-2:
test statistic
t=x1-x2/sqrt(s1^2/n1+s2^2/n2)
t=(3.53-3.833333)/sqrt(0.8287206^2/10+0.9413079^2/12)
t=-0.8035032
t=-0.804