We can use Minitab to find confidence interval for the mean of a normal distribution, knowing and not knowing the variance. For example, in the car data, assuming that sigma=3, to find a 99 % confidence interval for mu, we do MTB > Retrieve 'C:\ISTAT\CAR.MTW' Retrieving worksheet from file: C:\ISTAT\CAR.MTW Worksheet was saved on 11/25/1995 MTB > zinter .99 3 c3 THE ASSUMED SIGMA =3.00
N |
MEAN |
STDEV |
SE MEAN |
99.0 PERCENT C.I. | |
Tur_Diam |
109 |
35.514 |
3.321 |
0.287 |
( 34.773, 36.254) |
The default confidence interval is the one with 1-alpha= .95 and sigma=1. We get that n=109, x-bar=35.514, s=3.321, s/sqrt(n)=0.287 and the 99 % confidence interval for mu is ( 34.773, 36.254) To find t-intervals we do MTB > tinter.99 c3
N | MEAN |
STDEV |
SE MEAN |
99.0 PERCENT C.I |
|
Tur_Diam |
109 |
35.514 |
3.321 |
0.318 |
( 34.680, 36.348) |
The meaning of a 1-alpha confidence interval for a parameter is that if find repeatedly confidence intervals, approximately (1-alpha)100 percent of these confidence intervals cover the true value of the parameter. Using minitab, we may simulate data and confidence intervals. Approximately (1-alpha)100 percent of these confidence intervals cover the true value of the parameter. So, if we want to estimate the mean of distribution, we create 500 samples of this distribution and find confidence intervals for the mean for each of these samples, approximately 95 % (495) of the confidence intervals, contain the true value of the mean. Running the macro 6-4B.MTB, 500 times, we get 500 confidence intervals for the mean of a gamma (2,3) distribution. MTB > Execute 'C:\ISTAT\MACROS\6-4B.MTB' 500. ************6-4B.MTB************* random 100 c1; gamma 2 3. let k1=mean(c1)-stdev(c1)*1.96/sqrt(99) let k2=mean(c1)+stdev(c1)*1.96/sqrt(99) stack k1 c2 c2 stack k2 c3 c3 end ****************************** The lower ends of the confidence intervals are in c2. The upper ends of the confidence intervals are in c3. The mean of the gamma (2,3) distribution is 6. We should expect roughly 500*.95=475 confidence intervals containing the mean 6. Running the macro: ************6-4A.MTB****************** code (-100:6)1 (6:100)0 c2 c4. code (-100:6)0 (6:100)1 c3 c5. let c6=c4*c5 let k1=n(c6)*mean(c6) print k1 end ****************************** we get the number of intervals containing 6 (the mean): MTB > Execute 'C:\ISTAT\MACROS\6-4A.MTB' 1. Executing from file: C:\ISTAT\MACROS\6-4A.MTB K1 478.000 This is number obtained through simulations. If you repeat the procedure, you could get something else.
Comments to: Miguel A. Arcones