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 Commenti

How will that determine if your data happen to follow a normal distribution?
I will see if skewness distribution is similar to zero or not

Accedi per commentare.

Risposte (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!

Categorie

Scopri di più su Condensed Matter & Materials Physics in Centro assistenza e File Exchange

Prodotti

Richiesto:

il 29 Ott 2022

Risposto:

il 6 Set 2023

Community Treasure Hunt

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

Start Hunting!

Translated by