In: Statistics and Probability
A rivet is to be inserted into a hole. A random sample n=15 of parts is selected, and the hole diameter is measured. The sample standard deviation of the hole diameter measurements is s=0.008 millimeters. Construct a 99% lower confidence bound for σ2 using MATLAB step by step . Please screenshot the MATLAB screen
We know that the is used as a point estimator of
the population variance,
. Therefore, the confidence
interval of
is depend on the sampling
distribution of (n-1)
/
. And the sampling distribution
of (n-1)
/
is a chi square distribution with
(n-1 ) degree of freedom. Thus the confidence interval for
is given as follows
Following is the matlab code to find the 99 % confidence interval:
>> n=15; %sample size
s=0.008; % sample standard deviation
alpha = 0.01;
chi2q_up = chi2inv((1-alpha/2),n-1); % calculating 1-alpha/2 th
quantile for chi sqaure distribution
chi2q_lw = chi2inv(alpha/2,n-1); % calculating alpha/2 th quantile
for chi sqaure distribution
conf_int_lower = ((n-1)*(s^2))/chi2q_up; % lower limit of
Confidence interval
conf_int_upper = ((n-1)*(s^2))/chi2q_lw; % lower limit of
Confidence interval
Confidence_Interval = [conf_int_lower, conf_int_upper]; %
Confidence interval
disp(Confidence_Interval);
1.0e-03 *
0.0286 0.2199