# Inference for Proportions

So, now we switch gears, and look at qualitative variables. We "make" them quantitative by measuring the proportion of the sample that has the quality that we’re investigating—the parameter is p (or π), the proportion of the population; and the statistic is $\stackrel{\wedge }{p}$, the proportion of the sample.

## Do we need a new distribution?

In order to conduct inference, we need to know something about the distribution of $\stackrel{\wedge }{p}$. We did that earlier, but back then, we had a value for p. Will the loss of p cause us to switch to a new distribution?

What caused us to switch from z to t?

The loss of another parameter, ${\sigma }_{X}$, which prevented us from knowing ${\sigma }_{\stackrel{_}{x}}$.

Does the loss of p cause a similar problem?

Yes${\sigma }_{\stackrel{\wedge }{p}}=\sqrt{\frac{p\left(1-p\right)}{n}}$, so without p we can’t find ${\sigma }_{\stackrel{\wedge }{p}}$.

When we switched from z to t, what did we do to replace ${\sigma }_{X}$?

We swapped it with ${s}_{x}$. In general, ${s}_{x}$ is larger than ${\sigma }_{X}$, so that forced us to switch distributions.

So, let’s exchange $\stackrel{\wedge }{p}$ for p. Is $\stackrel{\wedge }{p}$ generally larger (or smaller) than p?

No! So there is no need to change the distribution. Whenever we don’t know p, we’ll use $\stackrel{\wedge }{p}$, and everything should work out fine.

So, in summary: the sample statistic $\stackrel{\wedge }{p}$ will have an approximately normal distribution with mean ${\mu }_{\stackrel{\wedge }{p}}$ = p and ${\sigma }_{\stackrel{\wedge }{p}}=\sqrt{\frac{p\left(1-p\right)}{n}}$, provided the sample is random, and that np and n(1 - p) are each at least 10 (remember to use $\stackrel{\wedge }{p}$ if you don’t know p).

## One Sample Procedures

### Confidence Interval

A level C confidence interval for p is $\stackrel{\wedge }{p}±{z}^{*}\sqrt{\frac{\stackrel{\wedge }{p}\left(1-\stackrel{\wedge }{p}\right)}{n}}$, where ${z}^{*}$ is the upper $\frac{1-C}{2}$ critical value from N(0,1). We definitely won’t know the value of p, so we’ll use $\stackrel{\wedge }{p}$ .

### Test of Significance

The test statistic is $z=\frac{\stackrel{\wedge }{p}-p}{\sqrt{\frac{p\left(1-p\right)}{n}}}$ (note the use of p in the denominator—we know the value of p from our null hypothesis!). The p-value is calculated in the usual way.

### Examples

[1.] a Harris Poll from June 2000 reported that 79% of U.S. citizens (based on a random sample of 2000 people) thought that elected officials should be subjected to random drug tests. Let’s construct a 90% confidence interval for the true population proportion that agree with this idea.

First, the requirements: the sample must be a random sample from the population—this is given.

Second, the distribution of $\stackrel{\wedge }{p}$ must be approximately normal—n$\stackrel{\wedge }{p}$ is 1580 and n(1 - $\stackrel{\wedge }{p}$) is 420; each of these is at least 10, so we may proceed.

90% confidence gives ${z}^{*}$ = 1.645. The interval is $0.79±1.645\sqrt{\frac{0.79\left(0.21\right)}{2000}}$ = 0.79 ± 0.0149 = (0.7750, 0.8049).

I am 90% confident that the true proportion of U.S. citizens that agree with this statement is between 77.5% and 80.5%.

[2.] A casino operator is checking to see if the Roulette wheel is working correctly. A sample of 200 spins reveals that 93 of them resulted in red. Theoretically, the probability of a spin resulting in red is $\frac{18}{38}$ ≈ 0.474. Is there evidence at the 10% level that this wheel is not working properly?

The variables are:

p = population proportion of spins resulting in red

$\stackrel{\wedge }{p}$ = sample proportion of spins resulting in red

H0: p = 0.474 (the wheel is working properly)

Ha: p ≠ 0.474 (the wheel is not working properly)

This calls for a one-sample z test for proportions. There are some requirements to conduct this test.

(a) The sample must be a random sample from the population. This was not stated; it must be assumed.

(b) np and n(1 - p) must each be at least 10. np = 94.74 and n(1 - p) = 105.26.

I’ve been told to use α = 0.10.

$\stackrel{\wedge }{p}$ = $\frac{93}{200}$ = 0.465.

$z=\frac{\frac{93}{200}-\frac{18}{38}}{\sqrt{\frac{\frac{18}{38}\left(\frac{20}{38}\right)}{200}}}$ = -0.2460. 2P($\stackrel{\wedge }{p}$ < $\frac{93}{200}$) = 2P(Z < -0.2460) = 0.8057.

If $\frac{18}{38}$ spins result in red, then I can expect to find fewer than 0.465, or more than 0.482, in about 80.57% of samples. This happens often enough to attribute to chance at the 10% level; it is not significant, and I fail to reject the null hypothesis.

It appears that the wheel is working correctly.

## Two Sample Procedures

We can combine independent samples just like we did when we learned the t procedures.

The parameter is p1 - p2, and the statistic is ${\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}$. The distribution of ${\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}$ is approximately normal with mean ${\mu }_{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}={p}_{1}-{p}_{2}$ and standard deviation ${\sigma }_{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}=\sqrt{\frac{{p}_{1}\left(1-{p}_{1}\right)}{{n}_{1}}+\frac{{p}_{2}\left(1-{p}_{2}\right)}{{n}_{2}}}$, provided the samples are random, and that each of n1p1, n1(1 - p1), n2p2, and n2(1 - p2) are at least 5.

### Confidence Interval

A level C confidence interval for p1 - p2 is $\left({\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}\right)±{z}^{*}\sqrt{\frac{{\stackrel{\wedge }{p}}_{1}\left(1-{\stackrel{\wedge }{p}}_{1}\right)}{{n}_{1}}+\frac{{\stackrel{\wedge }{p}}_{2}\left(1-{\stackrel{\wedge }{p}}_{2}\right)}{{n}_{2}}}$, where ${z}^{*}$ is the upper $\frac{1-C}{2}$ critical value from N(0,1).

### Test of Significance

We begin with the null hypothesis p1 = p2 (or p1 - p2 = 0). Notice, though, that this hypothesis does not tell us anything about the common value of p1 and p2. So, we cannot use them in the calculation of ${\sigma }_{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}$. However, we do have ${\stackrel{\wedge }{p}}_{1}$ and ${\stackrel{\wedge }{p}}_{2}$, which we could use in their stead. That would give us $z=\frac{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}{\sqrt{\frac{{\stackrel{\wedge }{p}}_{1}\left(1-{\stackrel{\wedge }{p}}_{1}\right)}{{n}_{1}}+\frac{{\stackrel{\wedge }{p}}_{2}\left(1-{\stackrel{\wedge }{p}}_{2}\right)}{{n}_{2}}}}$, which is the unpooled two sample z statistic …which is fine; but by our null hypothesis, p1 = p2. Shouldn’t we be using the same value for p1 and p2?

We have ${\stackrel{\wedge }{p}}_{1}$ and ${\stackrel{\wedge }{p}}_{2}$…can we use them to estimate the common value of p1 and p2?

Sure! Just average them (correctly).

Set $\stackrel{\wedge }{p}=\frac{\text{total number of successes}}{\text{total sample size}}$ (the pooled sample proportion), which gives us $z=\frac{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}{\sqrt{\frac{\stackrel{\wedge }{p}\left(1-\stackrel{\wedge }{p}\right)}{{n}_{1}}+\frac{\stackrel{\wedge }{p}\left(1-\stackrel{\wedge }{p}\right)}{{n}_{2}}}}$, or $z=\frac{{\stackrel{\wedge }{p}}_{1}-{\stackrel{\wedge }{p}}_{2}}{\sqrt{\stackrel{\wedge }{p}\left(1-\stackrel{\wedge }{p}\right)\left(\frac{1}{{n}_{1}}+\frac{1}{{n}_{2}}\right)}}$.

This is the pooled two sample z statistic for proportions. This is the test that the TI calculators will perform (without asking your opinion!). Note, however, that this is only appropriate if the sample sizes are approximately equal—otherwise, use the unpooled version.

Be careful to use the pooled sample proportion when checking requirements. Other than that, the remainder of the test is the same as always.

### Examples

[3.] An experiment sought to determine if folic acid, taken during pregnancy, can reduce the occurrence of major birth defects. 2701 women took folic acid, and 35 of their children had major birth defects. Another 2052 women did not receive folic acid, and 47 of their children had major birth defects. Is there evidence that folic acid reduces the occurrence of major birth defects?

The variables are pf = proportion mothers taking folic acid whose children have birth defects

pc = proportion mothers NOT taking folic acid whose children have birth defects

H0: pf = pc (folic acid has no effect on birth defects)

Ha: pf < pc (folic acid redcues birth defects))

This calls for a two-sample z test (pooled) for proportions. There are some requirements for this test:

(a) Each sample must be a random sample from the population. As long as the others were randomly assigned to one of the treatments (folic acid, or not), this will suffice.

(b) nf$\stackrel{\wedge }{p}$, nf(1 - $\stackrel{\wedge }{p}$), nc$\stackrel{\wedge }{p}$, nc(1 - $\stackrel{\wedge }{p}$) must each be at least 5. $\stackrel{\wedge }{p}=\frac{35+47}{2701+2052}$ ≈ 0.0173. nf$\stackrel{\wedge }{p}$ = 46.6, nf(1 - $\stackrel{\wedge }{p}$) = 2654.4, nc$\stackrel{\wedge }{p}$ = 35.4, nc(1 - $\stackrel{\wedge }{p}$) = 2016.6.

I’ll choose a 1% level of significance (I want to see a lot of evidence before I start recommending women take folic acid).

$z=\frac{0.013-0.0229}{\sqrt{0.0173\left(0.9827\right)\left(\frac{1}{2701}+\frac{1}{2052}\right)}}$ ≈ -2.6085.

P(${\stackrel{\wedge }{p}}_{f}-{\stackrel{\wedge }{p}}_{c}$ < -0.0099) = P(Z < -2.6085) = 0.0045.

If there is no difference in the proportions of births with major defects, then I can expect to find the proportion of birth defects to mothers who took folic acid to be at least 0.99% lower than the proportion among mothers who did not take folic acid in about 0.45% of samples. This occurs too rarely to attribute to chance at the 1% level of significance; it is significant, and I reject the null hypothesis.

It appears that taking folic acid does reduce the occurrence of serious birth defects.

[4.] A poll in 1999 asked U.S. adults whether or not they would order a vegetarian meal when at a restaurant. Of 747 men, 276 said that they would order vegetarian; of 434 women, 195 said that they would. Estimate the difference in the proportions of men and women who will order vegetarian with 90% confidence.

This calls for a two sample z interval for proportions. There are some requirements that must be met before the interval can be constructed.

(a) The samples must be random. This is not given; it will be assumed that the samples of men and women are random samples of all U.S. men and women.

(b) nm${\stackrel{\wedge }{p}}_{m}$, nm(1 - ${\stackrel{\wedge }{p}}_{m}$), nf${\stackrel{\wedge }{p}}_{f}$, nf(1 - ${\stackrel{\wedge }{p}}_{f}$) must all be at least 5. nm${\stackrel{\wedge }{p}}_{m}$ = 276, nm(1 - ${\stackrel{\wedge }{p}}_{m}$) = 471, nf${\stackrel{\wedge }{p}}_{f}$ = 195, nf(1 - ${\stackrel{\wedge }{p}}_{f}$) = 239; this requirement is met.

90% confidence gives ${z}^{*}$ = 1.645. The interval is $\left({\stackrel{\wedge }{p}}_{m}-{\stackrel{\wedge }{p}}_{f}\right)±{z}^{*}\sqrt{\frac{{\stackrel{\wedge }{p}}_{m}\left(1-{\stackrel{\wedge }{p}}_{m}\right)}{{n}_{m}}+\frac{{\stackrel{\wedge }{p}}_{f}\left(1-{\stackrel{\wedge }{p}}_{f}\right)}{{n}_{f}}}$ = $\left(0.3695-0.4493\right)±1.645\sqrt{\frac{0.3695\left(0.6305\right)}{747}+\frac{0.4493\left(0.5507\right)}{434}}$ = -0.0798 ± 1.645·0.0297 = (-0.1287, -0.0310).

I am 90% confident that the true difference in proportions (male - female) is between -12.87% and -3.1%. In other words, I am 90% confident that the proportion of women who will order vegetarian is between 3.1% and 12.87% higher than the proportion of men.

Page last updated 2012-04-01