# Statistics - One Proportion Z Test

The test statistic is a z-score (z) defined by the following equation. ${z = \frac{(p - P)}{\sigma}}$ where P is the hypothesized value of population proportion in the null hypothesis, p is the sample proportion, and ${\sigma}$ is the standard deviation of the sampling distribution.

Test Statistics is defined and given by the following function:

## Formula

${ z = \frac {\hat p -p_o}{\sqrt{\frac{p_o(1-p_o)}{n}}} }$

Where −

• ${z}$ = Test statistics

• ${n}$ = Sample size

• ${p_o}$ = Null hypothesized value

• ${\hat p}$ = Observed proportion

### Example

Problem Statement:

A survey claims that 9 out of 10 doctors recommend aspirin for their patients with headaches. To test this claim, a random sample of 100 doctors is obtained. Of these 100 doctors, 82 indicate that they recommend aspirin. Is this claim accurate? Use alpha = 0.05.

Solution:

Define Null and Alternative Hypotheses

${ H_0;p = .90 \\[7pt] H_0;p \ne .90 }$

Here Alpha = 0.05. Using an alpha of 0.05 with a two-tailed test, we would expect our distribution to look something like this:

Here we have 0.025 in each tail. Looking up 1 - 0.025 in our z-table, we find a critical value of 1.96. Thus, our decision rule for this two-tailed test is: If Z is less than -1.96, or greater than 1.96, reject the null hypothesis.Calculate Test Statistic:

${ z = \frac {\hat p -p_o}{\sqrt{\frac{p_o(1-p_o)}{n}}} \\[7pt] \hat p = .82 \\[7pt] p_o = .90 \\[7pt] n = 100 \\[7pt] z_o = \frac {.82 - .90}{\sqrt{\frac{ .90 (1- .90)}{100}}} \\[7pt] \ = \frac{-.08}{0.03} \\[7pt] \ = -2.667 }$

As z = -2.667 Thus as result we should reject the null hypothesis and as conclusion, The claim that 9 out of 10 doctors recommend aspirin for their patients is not accurate, z = -2.667, p < 0.05.