Plots the exact Normal function and random generated points.
scidemo_normaldist ( mu , sigma , nrandx , nhclass )
a 1-by-1 matrix of doubles, the mean
a 1-by-1 matrix of doubles, the variance
a 1-by-1 matrix of doubles, the number of generated random numbers
a 1-by-1 matrix of doubles, the number of classes in the histogram
a 1-by-1 matrix of doubles, the minimum x
a 1-by-1 matrix of doubles, the maximum x
Computes the exact distribution function of the Normal (Laplace-Gauss) distribution function in the range [xmin,xmax] and draw it. Then generate nrandx points and draw the histogram with nhclass classes. Then plots the intervals [mu-n*sigma,mu+n*sigma] for n=1,2,3. In the legend, display the corresponding integrals approximated from the intg function.
The current function is a demonstration of the following functions.
The Normal distribution function definition is:
This implies that, if X is a random variable from the Normal distribution, the probability that X is inside the interval [a,b] is
The previous equality can be associated with the erf function, which satisfies the equality
where n=1,2,3,....
distfun/normpdf, 2009-2010 - DIGITEO - Michael Baudin, http://forge.scilab.org/index.php/p/distfun/source/tree/HEAD/macros/normpdf.sci