To illustrate Confidence Interval construction:

Andy Long, Spring, 2020

This animation allows one to see exactly how sample size n and confidence  impact the size of the confidence interval.

Manipulate[
Module[{p1,p2,p3,siga,zcrit,centerlabel},
siga=Sqrt[p(1-p)/n];
zcrit=InverseCDF[NormalDistribution[],(1-confidence)/2];
centerlabel=StringJoin[{TextString[p+zcrit*siga],"<p<",TextString[p-zcrit*siga]}];
p1=Plot[{PDF[NormalDistribution[p,siga],x]},{x,p-3siga,p+3siga},PlotRange->All,PlotLabel->StringJoin[{"(OverHat[p]):",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->centerlabel];
p3=Plot[{PDF[NormalDistribution[p,siga],x]},{x,p-zcrit*siga,p+3siga},PlotRange->All,Filling->Axis,PlotLabels->centerlabel];
Show[p1,p2,p3]
],
{{p,.5,"(OverHat[p])"},0.05,.95},
{n,30,500},
{confidence,0.90,.99}]