You are a guest. Restricted access. Read more


jMathLab is well suited for statistical calculations. You can calculate the major statistical characteristics for matrices and vectors.

Let us calculate mean, variance and standard deviations for a vector:

a=mean(v); printf('%f\n',a)
a=var(v); printf('%f\n',a)
a=std(v); printf('%f\n',a)

Similarly, you can do this for matrices:

v=[1,10,20,2,4,7,4,3; 6,1,2,20,42,7,41,3;]
a=mean(v); printf('%f\n',a)
a=var(v); printf('%f\n',a)
a=std(v); printf('%f\n',a)


You can also calculate correlations between two vectors or two matrices. For example, calculate covariance and coefficient of correlations as:

a=cov(v1,v2);           printf('Covariance=%f\n',a)
a=correlation(v1,v2);   printf('Coeff. correlation=%f\n',a)

Analogously, you can do similar calculations for matrices.

Probability distributions

jMathlab supports custom tailored numerical integration of certain probability distributions. Look at the package statistics_probability in jMathLab reference. As example, normal_prob returns the area under the Normal (Gaussian) probability density function, integrated from minus infinity to x. The argument can be either a number or vector. In the latter case, one can plot such integrals for any sequence of numbers.

Here is an example:

draw2d(a,y) % draw areas under the normal distribution for a vector

jmathlab/statistics/descriptive.txt · Last modified: 2015/05/10 17:18 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0