this produces the additional plots as expectedthe absolute difference between the numbers of heads and tails grows with the number of flips furthermoresince we are averaging the results over twenty trialsthe plot is considerably smoother than when we plotted the results of single trial but what' up with the last plotthe standard deviation is growing with the number of flips does this mean that as the number of flips increases we should have less rather than more confidence in the estimate of the expected value of the difference between heads and tailsnoit does not the standard deviation should always be viewed in the context of the mean if the mean were billion and the standard deviation we would view the dispersion of the data as small but if the mean were and the standard deviation we would view the dispersion as quite large the coefficient of variation is the standard deviation divided by the mean when comparing data sets with highly variable means (as here)the coefficient of variation is often more informative than the standard deviation as you can see from its implementation in figure the coefficient of variation is not defined when the mean is def cv( )mean sum( )/float(len( )tryreturn stddev( )/mean except zerodivisionerrorreturn float('nan'figure coefficient of variation