//1.22 clc; n=2; k=1; dof=n-k; chi_square=(3-5)^2/5+(7-5)^2/5; disp(chi_square,'Chi square value=') disp('From the dof and chi square value we find P=0.22') disp('Hence there are 22% chance that the distribution is just the result of random fluctuations and the coin may be unweighted')