**Table of Contents**hide

## What is One Sample Proportion z-test

The one-sample proportion Z-test is a statistical tool used to conduct a hypothesis test about population proportions(p). It is used to estimate the difference between the proportion of responses(or number of successes) in sample data and the actual proportion in the population data from which we draw the sample.

## What are the conditions required for conducting a one-sample proportion z test?

Assumptions for the one sample proportion z-test are as follows:-

- The sample should be drawn at random from the population.
- Population should follow a binomial distribution.
- np
_{0}>10 & n(1-p_{0})>10 where n is the sample size and p is the hypothesized value for the population proportion. - The population size should be 10 times larger than the sample size.

## Hypothesis for the one sample proportion z-test

Let p_{0} denote the hypothesized value for the proportion.

p denotes the population proportion

**Null Hypothesis:**

**H _{0}: p=p0** The population proportion is equal to the hypothesized proportion.

**Alternative Hypothesis:** Three forms of alternative hypothesis are as follows:

**H**Population proportion is less than the hypothesized proportion. It is called the lower-tail test (left-tailed test)._{a}: p < p_{0}**H**Population proportion is greater than the hypothesized proportion. It is called the Upper-tail test(right-tailed test)._{a}: p > p_{0}**H**Population proportion is not equal to the hypothesized proportion. It is called a two-tail test._{a}: p ≠ p_{0}

## Calculating the Test Statistic

The test statistic for a one-sample proportion Z-test is computed using the formula:

`z = (p`^{^} - p_{0)}/√(p_{0}(1- p_{0} )/n

where :

n: sample size

p^{^}: observed sample proportion

p_{0}: hypothesized population proportion

**Summary for the one sample Proportion Z-test**

Left-tailed Test | Right-tailed Test | Two-tailed Test | |

Null Hypothesis | H_{0} : p≥p_{0} | H_{0} : p≤p_{0} | H_{0} : p=p_{0} |

Alternate Hypothesis | H_{a} : p<p_{0} | H_{a} : p>p_{0} | H_{a} : p ≠ p_{0} |

Test Statistic | z= (p^{^} – p_{0)}/√(p_{0}(1- p_{0} )/n | z= (p^{^} – p_{0)}/√(p_{0}(1- p_{0} )/n | z= (p^{^} – p_{0)}/√(p_{0}(1- p_{0} )/n |

Decision Rule: p-value approach (where α is level of significance) | If p-value ≤α then Reject H _{0} | If p-value ≤α then Reject H _{0} | If p-value ≤α then Reject H _{0} |

Decision Rule: Critical-value approach | If z ≤ -z_{α}then Reject H _{0} | If z ≥ z_{α}then Reject H _{0} | If z ≤ -z_{α} or z ≥ z_{α} then Reject H_{0} |

## How do you find the z-score of a proportion?

We will calculate the z-score of a proportion by using one sample proportion z-test.

**Procedure to find z-score using One Sample Proportion Z-Test**:

- Define the Null Hypothesis and Alternate Hypothesis.
- Decide the level of significance α (alpha).
- Check the assumptions for the one-sample proportion hypothesis z-test.
- i.e. np
_{0}>10 & n(1-p_{0})>10 where n is the sample size and p is the hypothesized value for the population proportion. - Calculate the test statistic using the formula mentioned above.
- Find the critical value at a given significance level. (Use Z Critical Value table for Various Confidence Levels)
- Determine the rejection criteria for the given confidence level.
- Conclude the results whether the test statistic lies in the rejection region or non-rejection region.

## Example of One Sample Z Proportion Test

In a sample of 1,000 people in Delhi,530 are tea drinkers and the rest are coffee drinkers. Can we assume that both tea and coffee drinkers are equally popular in the state at the 5% level of significance?

**Solution:** Given data :

sample size (n) = 1000

Number of tea-drinkers = 530

sample proportion = number of tea drinkers/sample size

p^{^} = 530/1000 = 0.53

Let’s solve this example with a step-by-step procedure.

**Define the Null Hypothesis and Alternate Hypothesis:**

let p be the population proportion for the tea drinkers.

**Null Hypothesis**: Both tea and coffee drinkers are equally popular in the state

**H _{0} : p = 0.5**

**Alternate Hypothesis**: Tea and Coffee drinkers are not equal in the state.

**H _{a} : p ≠ 0.5**

**Level of significance (α)**: 0.05

**Check Assumption:**

Lets check the condition np_{0}>10 & n(1-p_{0})>10

here n=1000 & p_{0} = 0.5

np_{0} = 1000*0.5 = 500>10

n(1-p_{0}) = 1000(1-0.5) = 500 >10

Hence, both the conditions are satisfied so Here, we are able to use the one sample proportion test.

**Calculate the test statistic (Z) **

Use formula z = (p^{^} – p_{0)}/√(p_{0}(1- p_{0} )/n

z = (0.53-0.5)/ √ (0.5(1-0.5))/1000

z = 0.03/ √ (0.5*0.5)/1000

z = 1.89737

**Find the critical value at a given significance level**:

Use the Z Critical Value table for Various Confidence Levels

Critical Value at α =0.05 for two-tailed test is z_{α} = 1.960

Determine the rejection criteria for the given confidence level.

Decision Rule : If z ≤ -z_{α} or z ≥ z_{α} then Reject H_{0}

**Conclusion**:

Here z statistic = 1.89737 & z_{α} = 1.96

Since z-statistic < z_{α} i.e. 1.89737<1.96

There is not enough evidence to reject the null hypothesis. Hence it is not statistically significant.

Therefore, we accept the null hypothesis that both tea and coffee drinkers are equally popular in the state.

**Cool Tip:** How to use a one-sample z-test in R for continuous numerical data!

## Conclusion

The one-sample proportion z-test is used when you have categorical data, specifically a binary outcome (success /failure), and tests for differences in proportions.