The mean is m = (30+40+50+20+20+40)/6 = 33.33

Now if the distribution of the data is normal the sample mean has a

t-distribution with 5 degrees of freedom. But to use the t-distribution

we need the population standard deviation, which we will estimate with:

s = sqrt[1/(n-1) sum (x_1 - m)^2] = 12.11

Then the interval is:

(m - cv*s/sqrt(n), m + cv*s/sqrt(n))

where cv is the critical value for a 95% interval for a t-distribution with n-1

degrees of freedom.

The critical t-value for a 95% interval with 5 degrees of freedom is 2.57,

so the 95% interval would then be:

(33.33-2.57*12.11/sqrt(6), 33.33+2.57*12.11/sqrt(6))~= (20.62, 46.04)

We use the t-distribution because we have a sample size n=6, which is

a small sample so the use of the normal distribution is inappropriate here

as that requires large samples.

Note the use of the t-distribution is also inappropriate unless we have some

reason to believe the underlying distribution that the data is sampled from

is normal.

RonL