I have a question in Statistics.
q1: Suppose a random sample of size n=1000 is obtained from a population with probability of success $p=0.25.$
- Find the value $a$ such that $P(\hat p ≤ a) = 0.05.$
- Find the value $c$ such that $P(0.25 − c ≤ \hat p ≤ 0.25 + c) = 0.99.$
- Find the quartiles of the distribution of $\hat p.$
Now Since I am given the $n$ and $p,$ I tried to do $X \sim B(n = 1000, p = 0.25).$ To find the $\hat p$ value, I divided $X/n$ which turned out to be 0.00025 (0.25/1000). Now If I do that then I get $P(0.00025 ≤ a) = 0.05.$
That is all I could think off. Idk how to do the rest and Idek If what I did so far is right or wrong.
Can someone please help me.
Thank You.
As a start, let $X \sim \mathsf{Binom}(1000, .25).$ Then $P(X \le 228) = .05$ from R software:
Then $$.05 = P(X \le 228) = P(\hat p = X/n = 220/1000 = 0.228)$$ gives the answer in terms of $\hat p.$
You can compute this using normal tables as follows: $\mu =E(\hat p) = E(X/n) = np/n = p = 0.25$ and one can show $\sigma = SD(\hat p) = \sqrt{\frac{p(1-p)}{n}} = 0.013693060.$ And $\hat p \stackrel{aprx}{\sim} \mathsf{Norm}(\mu = .25, \sigma=.0137).$
[Earlier: You should also be able to get this answer (or very close) using normal tables. Try to show some progress and answer questions in my Comment. I'll try to check back in 8 or 9 hrs. to see if you or someone else has shown something more.]
Added later: Then, for $\hat p:$ $$.05 = P(\hat p \le a) = P\left(\frac{\hat p - \mu}{\sigma} \le \frac{a-0.25}{.0137}\right) \approx P\left(Z \le \frac{a-0.25}{.0137}\right),$$ where $Z$ is standard normal and from normal tables $\frac{a-0.25}{.0137} = -1.645,$ so $a = 0.227.$ Within the accuracy allowed by printed tables, that may be as close to the exact 0.228 as you can get.
For the second part, use symmetry: $P(.25 - c \le \hat p \le .25 + c) = .99$ implies that $P(\hat p \le .25 - c) = (1-.99)/2 = .005.$ Then use the normal approximation as in the first part.
An exact solution is based on the following R computations:
For the last part, notice that the first, second, and third quartiles of the standard normal distribution are $Q_1 = -.6745, \text{Median} = 0,$ and $Q_3 = .6745,$ from printed standard normal CDF tables. In R:
Here is a plot of the PDF of $\mathsf{Binom}(1000, .25)$ along with the density curve (blue) of the 'best-fitting' normal density. This is for $X$; for $\hat p$, divide the numbers on the horizontal axis by 1000.