Statistical Analysis in Matlab: Hot Topic - 18 Jan 2006 Sanjeev Pillai Barc
Statistical Analysis in Matlab: Hot Topic - 18 Jan 2006 Sanjeev Pillai Barc
MATLAB
n Strings
¨ Row vectors that can be concatenated
¨ x = ‘Matlab’
¨ y = ‘class’
¨ z = [x ‘ ’ y] % z gets ‘Matlab class’
¨ end
Comparing proportions
n Analyze proportions instead of values
n Chi-square test
¨ No single command in matlab
¨ x= [matrix of 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)
Some more tests
n Enrichment analysis
¨ Isthe given data enriched for a category?
¨ Used widely in biological data analysis
¨ Hypergeometric probability analysis
n Y = hygecdf(X,M,K,N);
n Correlation
¨ Identify correlation between paired values
¨ From -1 to +1: perfect +ve and inverse
correlations
n [R,P] = corrcoef(x,y);
Matlab resources