1
$\begingroup$

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.-')
$\endgroup$
7
  • $\begingroup$ How did you simulate your data, i.e. what did you do to your (pseudo-)randomly generated normal distributions, whose parameters you know? Then it might be possible to find proper CI by pencil and paper. To the second question: What is known about the overall data? $\endgroup$ Commented Mar 20, 2014 at 11:08
  • $\begingroup$ @HorstGrünbusch I am running a Monte Carlo Simulation and am sampling randomly from about 65 Normal Distributions, each with a different μ and σ and I put this data into an equation which upon obtaining 1000 samples from 1000 iterations gives me a Normal Distribution of the equations solutions. Secondly, nothing is known about the overall data. Thanks a lot. $\endgroup$
    – user131983
    Commented Mar 20, 2014 at 14:22
  • $\begingroup$ @HorstGrünbusch I am wondering, is what I am looking at even possible to calculate as I've struggled to find any information on how to do this. $\endgroup$
    – user131983
    Commented Mar 20, 2014 at 17:27
  • $\begingroup$ Maybe you can edit your question in order to share some formula or R- or Matlab-code how you generated your data? To the second question: If nothing is known, nothing can be judged. But from a practitioner's experience, if you know nothing about the overall data, you did not yet properly understand the field of intended application. $\endgroup$ Commented Mar 20, 2014 at 17:45
  • $\begingroup$ if your data is normally or approximately normally distributed then you could use regular statistical methods to get your CI. Perhaps also you could always repeatedly sample from your distribution and get an approximate confidence interval that way but hopefully there are better ways... I'd suggest you could search for, e.g. "bootstrap confidence interval for mean". I get hits like this, uvm.edu/~dhowell/StatPages/Resampling/BootstMeans/…, which seem reasonable. $\endgroup$
    – TooTone
    Commented Mar 20, 2014 at 18:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.