How to plot normal distribution of a 24x45x65 matrix - showing in parabola curve

1 visualización (últimos 30 días)
Hey
i wanna plot a normal distribution, parabola form of a 24x45x65 matrix. the matrix means: 24 hours x 45 days x 63 customers, (last customer have more data then rest) the parabola plot is showing me like this: http://upload.wikimedia.org/wikipedia/commons/8/8c/Standard_deviation_diagram.svg i will include the data.
the diagram should be showing me how many percent of the data is more than the mean(right side) and how many is less than mean (left side) etc..
thanks for helping :D i love u guys

Respuesta aceptada

Star Strider
Star Strider el 27 de Abr. de 2014
Didn’t we do this in Normal Distribution - using 24x45x65 matrix. - How to do this?? I calculated three vectors for your data in this code. The median, the value for which half the data are above and half below (for each hour, which is what you requested previously) in the pmdn vector. In the second loop, the gtmen vector gives the number of data greater than the mean for each hour, and ltmen the number of data less than the mean for each hour, and pctgt gives the percent greater than the mean. The pmen vector is the mean for each hour:
load x_weekday
xwkd = x_weekday;
for k1 = 1:size(xwkd,1)
hrdata = xwkd(k1,:,:);
pmdn(k1) = median(hrdata(:)); % Median for each hour
end
for k1 = 1:size(xwkd,1)
hrdata = xwkd(k1,:,:);
hrvct = hrdata(:);
pmen(k1) = mean(hrvct); % Mean for each hour
gtmen(k1) = length(find(hrvct > pmen(k1))); % Number > Mean for each hour
ltmen(k1) = length(find(hrvct < pmen(k1))); % Number < Mean for each hour
pctgt(k1) = 100*gtmen(k1)/length(hrvct); % Percent greater than mean
end
  7 comentarios
Star Strider
Star Strider el 27 de Abr. de 2014
Editada: Star Strider el 27 de Abr. de 2014
My pleasure!
With respect to understanding the standard error and standard deviation, I again refer you to the Wikipedia article on it. Wikipedia explains Standard error of mean versus standard deviation clearly.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by