[tex]p\pm z_{\alpha/2}\sqrt{\dfrac{p(1-p)}{n}}[/tex]
Where : [tex]\sqrt{\dfrac{p(1-p)}{n}}=E[/tex] is the margin of error , n is the sample size , p is the sample proportion of success and [tex]\alpha[/tex] is the significance level.
Given : Confidence level : [tex]0.99[/tex]
Then , Significance level : [tex]\alpha: 1-0.99=0.01[/tex]
Sample size : [tex]n= 1500[/tex]
Sample proportion of respondents chose chocolate pie: [tex]p=0.12[/tex]
Margin of error : [tex]E=\pm0.05[/tex]