I want to determine if the data(tmin) are Gaussian distributed or not by using Montecarlo simulation with skewness.
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
nn=143;
for n=1:1000;
load('ERA_Livneh_Birmingham.mat')
ss(n)=std(tmin);
m(n)=mean(tmin);
med(n)=median(tmin);
nu(n)=numel(tmin)
skew_FP(n) = sum((r-m(n)).^3)/(length(n)-1)/ss(n).^3
end
hist(skew_FP())
xlabel('Skew_FP()')
ylabel('Frequency')
In this case, what do I have to change for doing montecarlo simulation by using skewness??
댓글 수: 2
  John D'Errico
      
      
 2022년 10월 29일
				How will that determine if your data happen to follow a normal distribution?
답변 (1개)
  Ayush
      
 2023년 9월 6일
        Hey Chris, 
I understand that you want to know the changes required in your code for doing Montecarlo simulation using skewness.
If you intend to perform a "Monte Carlo simulation" to assess the uncertainty of the skewness calculation, you will need to introduce random variations in the data or model parameters. This could involve generating random samples or perturbing the existing data in a meaningful way to simulate different scenarios. I have provided a sample code below for the same:
nn = 143;
skewness_MC = zeros(1, nn);
for n = 1:nn
    load('ERA_Livneh_Birmingham.mat')
    % Introduce random variations or perturbations to the data
    perturbed_tmin = tmin + randn(size(tmin)); % Example: Adding Gaussian noise
    ss(n) = std(perturbed_tmin);
    m(n) = mean(perturbed_tmin);
    med(n) = median(perturbed_tmin);
    nu(n) = numel(perturbed_tmin);
    skewness_MC(n) = sum((perturbed_tmin - m(n)).^3) / (length(perturbed_tmin) - 1) / ss(n).^3;
end
hist(skewness_MC)
xlabel('Skewness_MC')
ylabel('Frequency')
Hope this helps!
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Monte-Carlo에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


