I want to determine if the data(tmin) are Gaussian distributed or not by using Montecarlo simulation with skewness.

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 件のコメント

How will that determine if your data happen to follow a normal distribution?
Chris
Chris 2022 年 10 月 29 日
I will see if skewness distribution is similar to zero or not

サインインしてコメントする。

回答 (1 件)

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!

カテゴリ

ヘルプ センター および File ExchangeCondensed Matter & Materials Physics についてさらに検索

製品

質問済み:

2022 年 10 月 29 日

回答済み:

2023 年 9 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by