Is there a way to get 10-base lognormal distribution data?

조회 수: 4 (최근 30일)
Ins
Ins 2023년 9월 18일
편집: Bruno Luong 2023년 9월 19일
I want to obtain a 10-base lognormal distributed data set. (mean & std values which I set)
I know that I can get a lognormal distribution data set using the MATLAB lognrnd function.
However, this data is e-base lognormal.
Is there a way to get 10-base lognormal distribution data?
example)
N = lognrnd(5, 10, [1,10000]);
mean(log(N)) = 5
std(log(N)) = 10
-> this is e-base lognormal distribution, but I want 10-base lognormal distribution data set
Thanks :)
  댓글 수: 2
Torsten
Torsten 2023년 9월 18일
편집: Torsten 2023년 9월 18일
What is "10-base lognormal distribution" ? The distribution of Y = 10^X if X is a standard-normal ?
Ins
Ins 2023년 9월 19일
Yes! if Y=10^X, the distribution of log10(Y) is normal distribution. Y is lognormal distribution (10-base).

댓글을 달려면 로그인하십시오.

답변 (1개)

Bruno Luong
Bruno Luong 2023년 9월 18일
편집: Bruno Luong 2023년 9월 19일
log10rnd = @(mu,sigma, varargin) lognrnd(log(10)*mu, log(10)*sigma, varargin{:});
N = log10rnd(5, 10, [1 1000000]);
% Check
mean(log10(N))
ans = 4.9934
std(log10(N))
ans = 10.0102

Community Treasure Hunt

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

Start Hunting!

Translated by