I want to determine the confidence interval for my set of data. I have obtained the data by sampling from several Normal Distributions and running a Monte Carlo Simulation. I was wondering how I could determine the confidence interval interval for the $\mu$ of my data? I don't know the $\mu$ or $\sigma$ of the population data. Also, is there a way by which I can determine the % confidence associated with my sampled data being a good representation of the overall data? Is this possible?
Edit:
% Each of the parameters input to the Nielsenneworiginal() are samples from Normal Distributions.
% A single value from the output of Nielsenneworiginal() is then assigned to thresh_strain and a plot of this will provide a Normal Distribution itself.
function [final_matrix] = MCsolutionsimilar()
tic
no_iterations = input('No. of iterations?:');
thresh_strain = zeros(no_iterations, 1);
%
casechoice =input('Enter 1 for 1st Layup and 2 for 2nd layup:');
diamchoice = input('Enter 1 for Christmas tree-shaped and 2 for Cylindrical:');
[layup, overall_p0] = fibreanglerng(no_iterations, casechoice);
% [E11 E22] = elasticmodulusrng(); % N/m^2
Ef = 235e9; Em = 3.5e9 ; %GPa
[vol_f, overall_p1] = vol_fraction(no_iterations);
E11 = (Ef.*vol_f) + (Em.*(1-vol_f));
E22 = 1./((vol_f./Ef) + ((1-vol_f)./Em));
% Poisson Ratio
nuf = 0.340; num = 0.33;
v12 = (nuf*vol_f) + num*(1-vol_f);
% % Shear Modulus
Gf = 96.52; Gm = 1.8; %GPa
G12 = (Gf*Gm)./(vol_f .* Gm + (Gf.*(1-vol_f)));
[GIC, overall_p2] = shearmodulusstrainenergyrng(no_iterations);
[diamfromimpact_energy, dentsize, overall_p3] = impactenergyrng(no_iterations);
[diam, overall_p4] = diameterng(no_iterations,diamchoice, diamfromimpact_energy);
[time] = detectiontime(no_iterations);
[new_dentsize] = dent_size(dentsize,time);
for i=1:no_iterations
for j=1:16
[J] = Nielsenneworiginal(layup,E11(1,i),E22(1,i),v12(1,i),G12(1,i),GIC(1,i));
if (isreal(J(1,j)))==0
J(1,j) = sqrt(imag(J(1,j))^2 + (real(J(1,j)))^2);
end
[thresh_strain(i,1), I] = min(J,[],2);
end
end
%%%%%%% Plot 1 %%%%%%%%%%%%%
figure(1); clf(1)
[mu_j,sigma_j] = normfit(thresh_strain);
x=linspace(mu_j-4*sigma_j,mu_j+4*sigma_j,200);
pdf_x = 1/sqrt(2*pi)/sigma_j*exp(-(x-mu_j).^2/(2*sigma_j^2));
plot(x,pdf_x/10000);
title(sprintf('Mu = %g, sigma = %g',mu_j,sigma_j));
xlabel('Threshold Strains','FontSize',12);
ylabel('Probabilities of occurrence','FontSize',12);
title('\it{Threshold Strains versus Probabilities of occurrence(Christmas tree diameter configuration)}','FontSize',16);
figure(2); clf(2)
X_j = min(thresh_strain) : (max(thresh_strain) - min(thresh_strain))/100 : max(thresh_strain);
P_j = normcdf(abs(X_j),real(mu_j),real(sigma_j));
title('Normal cdf')
plot(X_j,P_j,'blue.-')