To illustrate Confidence Interval construction:

Manipulate[
Module[{p1,p2,p3,siga,zcrit},
siga=Sqrt[p(1-p)/n];
zcrit=InverseCDF[NormalDistribution[],(1-confidence)/2];
p1=Plot[{PDF[NormalDistribution[p,siga],x]},{x,p-3siga,p+3siga},PlotRange->All,PlotLabel->StringJoin[{"phat:",TextString[p],"; n:",TextString[n],"; confidence:",TextString[confidence]}]];
p2=Plot[{PDF[NormalDistribution[p,siga],x]},{x,p-3siga,p+zcrit*siga},PlotRange->All,Filling->Axis,PlotLabels->StringJoin[{"phat<",TextString[p+zcrit*siga]}]];
p3=Plot[{PDF[NormalDistribution[p,siga],x]},{x,p-zcrit*siga,p+3siga},PlotRange->All,Filling->Axis,PlotLabels->StringJoin[{"phat>",TextString[p-zcrit*siga]}]];
Show[p1,p2,p3]
],
{p,0.2,.8},
{n,30,500},
{confidence,0.90,.99}]