Matlab statistical commands

x, y
n=length(x)
mean(x)
std(x)
hist(x,7)
prctile(x,5)
stairs(sort(x),(1:n)/n)
normplot(x)
qqplot(x,y)
median(x)
trimmean(x)
iqr(x)
median(abs(x-median(x)))
x(random('unid',n,n,1000))
regress(y,[ones(n,1),x])
two data columns
sample size
sample mean
sample standard deviation
histogram with 7 bins
5% sample quantile
empirical cdf
normal probability plot
QQ-plot
median
10% trimmed mean
interquartile range
MAD
1000 samples resampled from x
regression line y=a+bx

Chi-square test of homogeneity and independence:

x=contingency table;
e=sum(x')'*sum(x)/sum(sum(x));
X2=(x-e).^2./e
X2=sum(sum(X2))
df=prod(size(x)-[1,1])
P=1-chi2cdf(X2,df)
More statistical commands:

matlab -> helpwin -> toolbox/stats ->