estimate almost alwaysincreasing the confidence level will widen the confidence interval the calculation of confidence interval generally requires assumptions about the nature of the space being sampled it assumes that the distribution of errors of estimation is normal and has mean of zero the empirical rule for normal distributions provides handy way to estimate confidence intervals and levels given the mean and standard deviation of the data will fall within standard deviation of the mean of the data will fall within standard deviations of the meanand almost all ( %of the data will fall within standard deviations of the mean suppose that we run trials of coin flips each suppose further that the mean fraction of heads is and the standard deviation if we assume that the distribution of the means of the trials was normalwe can conclude that if we conducted more trials of flips each of the time the fraction of heads will be +- and > of the time the fraction of heads will be +- it is often useful to visualize confidence intervals using error bars the code in figure calls the version of flipsim in figure and then uses pylab errorbar(xvalsmeansyerr *pylab array(sds)to produce the plot on the right the first two arguments give the and values to be plotted the third argument says that the values in sds should be used to create vertical error bars the call showerrorbars( produces the plot on the right unsurprisinglythe error bars shrink as the number of flips per trial grows these values are approximations for example of the data will fall within standard deviations of the mean standard deviations is convenient approximation