Suppose

X1; : : : ;Xn is a random sample from a Bernoulli distribution with probability P(Xi = 1) = p.

(i) What is the variance of Xi? Show that the estimator p* = sample meanhas expectation p and find its variance.

(ii) Using the central limit theorem construct a random variable which has an approximate standard normal distribution and indicate how this can be used to find

a 100(1-alpha)% confidence interval for p.

ok. I have E(sample mean) = p, variance = pq/n. have variance of Xi = pq

so for my confidence interval I have

-z(sqrt(pq))/n + p < sample mean < z((sqrt(pq))/n + p

but how would i rearrange this to get a CI for p?

many thanks