The One and Two Sample Z proportion is used to test the proportion of one or two samples. It is a parametric test.

One Sample proportion

In one-sample Z proportion, we compare one sample with a target value.

For run this test it’s important that:

• The sample come from a binomial distribution;
• When we have mean (n*p) and variance (n*(1-p)) > 10, the binomial distribution can be approzimated with a standard normal distribution;

In this case the hypothesis are like (in case of two tail test):

• H0: The population proportion is equal to a specific value;
• H1The population proportion is different from a specific value;

The way to conduct the hypothesis test is like the one-sample t-tests, but we use another statistics.

In this test we use the Z statistic in the image1:

where:

• p is the observed proportion in the sample;
• p0 is the target proportion;
• n is the number of observations of the sample;

```Example: We have a coin toss experiment where we count the number of heads. Our sample is about ten flips where we look at eight heads. In this case we have
- P = 8/10 = 0,8
- P0 = 5/10 = 0,5 because we suppose a fair coin;
- n = 10```

After we have computer our Z statistics, we need to look at the critical value from the Z table. Then we only need to compare the statistics with the critical value for reject or fail to reject H0.

Two Sample proportion

In two-sample Z proportion we compare the proportion between two sample.

The process is similar of the one sample proportion (using the standard distribution) but we use the statitics in image2: