Generate Independent Identically and Lognormally Distributed Random Variables

3 views (last 30 days)
I am trying to create a script for simple reliability analysis. It works fine with other test cases. But, whenever I tried to solve the following test case the result is incorrect. I suppose that the error is in the sampling process.
Where are the independent dentically and lognormally distributed random variables with unit means and standard deviations . The value of n is chosen to be 40.
Later, the function will be applied on points and then the Probability of failure is calculated by using:
[3]
According to the references the value of Pf should be around . Meanwhile, my Pf is 1.
References:
  1. Bourinet, J.-M., Deheeger, F., & Lemaire, M. (2011). Assessing small failure probabilities by combined subset simulation and Support Vector Machines. Structural Safety, 33(6), 343–353. doi:10.1016/j.strusafe.2011.06.001 
  2. Xu, J., & Zhu, S. (2019). An efficient approach for high-dimensional structural reliability analysis. Mechanical Systems and Signal Processing, 122, 152–170.
  3. Echard, B., Gayton, N., & Lemaire, M. (2011). AK-MCS: An active learning reliability method combining Kriging and Monte Carlo Simulation. Structural Safety, 33(2), 145–154.
Here's my script:
clear;
nvar = 40;
sigma = 0.2;
nmc = 3e5;
mu = 1;
init_samp = lognrnd(mu,sigma,nmc,nvar);
% Evaluation func
gx = (nvar + 3*sigma*sqrt(nvar)) - sum(init_samp,2);
%count negative
nneg = length(find(gx < 0));
Pf = nneg/nmc;
disp(Pf)
x = -2:.1:10;
[f,xi] = ecdf(gx);
semilogy(xi,f,'LineWidth',2)
ylim([1E-4,1])
grid on;
Thank you very much!

Accepted Answer

Torsten
Torsten on 22 Jul 2019
Note that mu and sigma you supply for "lognrnd" are not mean and standard deviation of the underlying lognormal distribution, but the distribution parameters mu and sigma.
See the first example under
https://de.mathworks.com/help/stats/lognrnd.html

More Answers (0)

Products


Release

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!