How to find p-hat (the sample proportion)

By Jude Wallis · Published

The sample proportion p-hat is successes divided by sample size: p-hat = x/n. Decide what counts as a success before you count anything. A reported 43% is already p-hat = 0.43, so the count is x = 0.43n. p-hat is a statistic from your sample; p is the population parameter it estimates.

AP Statistics: Unit 3 (topics 3.1 Estimators, 3.2 Sampling Distributions for Sample Proportions, 2.2 Summary Statistics for Two Categorical Variables). In the Fall 2026 AP Statistics course, $\hat{p}$ enters formally at Unit 3, topic 3.1 (Estimators), where a sample statistic is described as a point estimator of the matching population parameter, and topic 3.2 gives its sampling distribution a mean of $p$ and a standard deviation of $\sqrt{p(1-p)/n}$. Pulling a proportion out of a two-way table belongs to Unit 2, topic 2.2.

The formula for the sample proportion

The sample proportion is written p^\hat{p} and read "p-hat". It is the fraction of your sample that has the characteristic you are counting:

p^=xn\hat{p} = \frac{x}{n}

Here xx is the number of successes in the sample and nn is the sample size. Both are counts of individuals, so xx is a whole number, xx is never larger than nn, and p^\hat{p} always lands between 0 and 1.

The hat is the whole point of the notation. It marks a number computed from one sample, as opposed to pp with no hat, which is the proportion in the entire population.

Because p^\hat{p} is a fraction of two counts, it can only take the values 0/n0/n, 1/n1/n, 2/n2/n, and so on. With n=20n = 20, p^\hat{p} moves in steps of 0.05, so a reported sample proportion of 0.37 from 20 people is impossible.

Define what counts as a success first

A "success" is whichever category you are measuring the proportion of. The word carries no judgment: in a study of defective parts, a defective part is the success.

Write that definition down before you compute, because p^\hat{p} flips when the definition flips. If 84 of 150 library patrons used the e-book service, then p^=84/150=0.56\hat{p} = 84/150 = 0.56 for users and p^=66/150=0.44\hat{p} = 66/150 = 0.44 for non-users. Both numbers are correct arithmetic, and only one answers the question that was asked.

Two habits keep this clean:

  • Name the success in a sentence, such as "success = the patron used the e-book service".
  • Confirm that your xx and your nn describe the same group of people, counted the same way.

The second habit matters more than it looks. Most wrong values of p^\hat{p} come from a numerator and a denominator that were taken from different groups.

Finding p-hat in a word problem

A word problem hands you xx and nn in ordinary English, usually in that order. Your job is to spot them.

In a random sample of 250 households in a county, 90 said they compost food waste. Success is composting, so x=90x = 90 and n=250n = 250:

p^=90250=0.36\hat{p} = \frac{90}{250} = 0.36

The phrases that signal nn are "a random sample of 250", "surveyed 250 households", or "250 were selected". The phrases that signal xx are "90 said yes", "90 of them", or "90 responded".

One trap is common enough to plan for. Some problems report the failures instead: "of the 250 households sampled, 160 do not compost". Subtract first, x=250160=90x = 250 - 160 = 90, and only then divide.

Finding p-hat in a two-way table

A two-way table gives you several different sample proportions, and the question tells you which denominator to use. Here are 400 library patrons classified by age group and by whether they used the e-book service.

Age groupUsed e-booksDid not use e-booksTotal
Under 308466150
30 and over102148250
Total186214400

Three questions, three denominators:

  • Proportion of all patrons who used e-books: divide by the grand total, p^=186/400=0.465\hat{p} = 186/400 = 0.465.
  • Proportion of the under-30 patrons who used e-books: divide by that row total, p^=84/150=0.56\hat{p} = 84/150 = 0.56.
  • Proportion of the e-book users who are under 30: divide by that column total, p^=84/186=0.4516\hat{p} = 84/186 = 0.4516.

The cell 84 appears in all three, and the answers differ because the group you are describing differs. Before dividing, finish this sentence out loud: "out of the ...". Whatever follows is your denominator. Working with the rows and columns of a table is covered in topic 2.2.

Finding p-hat from a reported percentage

A percentage is a sample proportion that has already been divided. Move the decimal two places left and you have p^\hat{p} directly, so a reported 43% is p^=0.43\hat{p} = 0.43.

Never carry 43 into a formula. Every standard error, confidence interval, and test statistic for proportions expects a decimal between 0 and 1, and feeding in 43 produces answers that are wrong by a factor of 100 or that fail outright.

To recover the count, multiply the proportion by the sample size:

x=p^×nx = \hat{p} \times n

With 43% of n=400n = 400 people, x=0.43×400=172x = 0.43 \times 400 = 172. That count is what the Large Counts condition needs, since the condition is checked on counts of successes and failures rather than on proportions. See why you need 10 successes and 10 failures.

When the multiplication does not land on a whole number, the reported percentage was rounded. With 43% of 350, you get 0.43×350=150.50.43 \times 350 = 150.5, so the true count was 150 or 151 and the percentage was rounded to the nearest whole percent. Say which one you chose and move on.

p-hat is a statistic, p is the parameter

These two symbols are not interchangeable, and the difference drives every inference procedure you will run.

  • p^\hat{p} is a statistic. You computed it from a sample, so you know its value, and a different sample would give a different value.
  • pp is a parameter. It describes the whole population, its value is fixed, and you almost never know it.

A sample statistic is a point estimator of the matching population parameter, so p^\hat{p} is the point estimate of pp. It is also an unbiased estimator: across all possible samples of size nn, the values of p^\hat{p} center on pp rather than sitting systematically above or below it.

That is why hypotheses are always written about pp and never about p^\hat{p}. Writing H0:p^=0.25H_0: \hat{p} = 0.25 claims something about a number you already computed, which is not a claim worth testing. More on the split in parameter vs statistic and null vs alternative hypothesis.

Why p-hat changes from sample to sample

Take a second random sample of 400 patrons and you will get a different p^\hat{p}. Nothing went wrong. Two samples contain different people, so their proportions differ, and that is called sampling variability.

Collect the values of p^\hat{p} from every possible sample of size nn and you get the sampling distribution of the sample proportion, described in topic 3.2. When the sampled values are independent, that distribution has

μp^=pandσp^=p(1p)n\mu_{\hat{p}} = p \qquad \text{and} \qquad \sigma_{\hat{p}} = \sqrt{\frac{p(1-p)}{n}}

The symbol μp^\mu_{\hat{p}} (mu sub p-hat) is the mean of all those sample proportions, and σp^\sigma_{\hat{p}} (sigma sub p-hat) is their standard deviation. Since pp is unknown in practice, you substitute your own p^\hat{p} and call the result the standard error:

SEp^=p^(1p^)nSE_{\hat{p}} = \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}

Two readable facts come straight out of the formula. Because nn sits in the denominator, larger samples give less variable estimates: at p=0.5p = 0.5, moving from n=100n = 100 to n=400n = 400 drops the standard deviation from 0.25/100=0.05\sqrt{0.25/100} = 0.05 to 0.25/400=0.025\sqrt{0.25/400} = 0.025, so quadrupling nn halves it. Because p(1p)p(1-p) is largest at p=0.5p = 0.5, proportions near a half are the noisiest to estimate.

That standard error is the engine of the confidence interval: the interval is p^\hat{p} plus or minus a critical value times SEp^SE_{\hat{p}}. The difference between σp^\sigma_{\hat{p}}, which uses the true pp, and SEp^SE_{\hat{p}}, which uses your estimate, is worth keeping straight in every write-up.

Mistakes that cost points

  • Using 43 instead of 0.43. Convert the percentage before it touches a formula.
  • Swapping xx and nn. Any p^\hat{p} above 1 is that error, every time.
  • Taking the numerator from one group and the denominator from another in a two-way table.
  • Writing p^\hat{p} in a hypothesis. Hypotheses are claims about pp.
  • Rounding p^\hat{p} to two decimals and then building an interval from it. Carry the full value, or the fraction x/nx/n, through the arithmetic and round only the final answer.
  • Reporting p^\hat{p} with no sample size attached. A proportion of 0.60 means something very different from 5 people than from 500, because the standard error changes by a factor of 10.

Recovering the count from a reported percentage

A polling firm reports that 43% of the 400 randomly selected voters it surveyed support a school bond measure. Find p^\hat{p}, find the number of supporters, check the Large Counts condition, and compute the standard error.

  1. Convert the percentage to a proportion: p^=43%=0.43\hat{p} = 43\% = 0.43. This is already the sample proportion, so no division is needed.

  2. Recover the count of successes: x=p^×n=0.43×400=172x = \hat{p} \times n = 0.43 \times 400 = 172 supporters.

  3. Check the division back: 172/400=0.43172/400 = 0.43, which matches the reported percentage.

  4. Count the failures: 400172=228400 - 172 = 228 voters who do not support the measure.

  5. Check Large Counts: np^=17210n\hat{p} = 172 \geq 10 and n(1p^)=22810n(1-\hat{p}) = 228 \geq 10, so the sampling distribution of p^\hat{p} is approximately normal.

  6. Standard error, step by step. Multiply: (0.43)(0.57)=0.2451(0.43)(0.57) = 0.2451. Divide by nn: 0.2451/400=0.000612750.2451/400 = 0.00061275. Take the square root: 0.00061275=0.024754\sqrt{0.00061275} = 0.024754.

p^=0.43\hat{p} = 0.43 from x=172x = 172 supporters out of n=400n = 400. Both counts clear 10 (172 successes and 228 failures), and the standard error is SEp^=0.0248SE_{\hat{p}} = 0.0248.

Three sample proportions from one two-way table

Using the table of 400 library patrons above, find the proportion of all patrons who used e-books, the proportion of under-30 patrons who used e-books, and the standard error of that second proportion.

  1. Check the table first. The rows add: 84+66=15084 + 66 = 150 and 102+148=250102 + 148 = 250. The columns add: 84+102=18684 + 102 = 186 and 66+148=21466 + 148 = 214. Both grand totals agree: 150+250=400150 + 250 = 400 and 186+214=400186 + 214 = 400.

  2. All patrons who used e-books. Success is using the service, and the group is everyone, so x=186x = 186 and n=400n = 400: p^=186/400=0.465\hat{p} = 186/400 = 0.465.

  3. Under-30 patrons who used e-books. The group is now the first row only, so x=84x = 84 and n=150n = 150: p^=84/150=0.56\hat{p} = 84/150 = 0.56.

  4. Standard error for the under-30 group. Multiply: (0.56)(0.44)=0.2464(0.56)(0.44) = 0.2464. Divide by 150: 0.2464/150=0.001642670.2464/150 = 0.00164267. Square root: 0.00164267=0.040530\sqrt{0.00164267} = 0.040530.

  5. Compare with the 30-and-over group, p^=102/250=0.408\hat{p} = 102/250 = 0.408, to see that the two age groups do not use the service at the same rate in this sample.

Overall, p^=0.465\hat{p} = 0.465. Among under-30 patrons, p^=0.56\hat{p} = 0.56 with SEp^=0.0405SE_{\hat{p}} = 0.0405. Among patrons 30 and over, p^=0.408\hat{p} = 0.408.

Frequently asked questions

Should I report p-hat as a decimal or a percentage?

Report it as a decimal in every formula, and translate to a percentage only in the sentence you write for a reader. Keeping p^=0.43\hat{p} = 0.43 in the arithmetic and saying "about 43% of the sampled voters" in the conclusion gets you both.

Can p-hat be exactly 0 or exactly 1?

Yes. If none of your 60 sampled parts are defective, then p^=0/60=0\hat{p} = 0/60 = 0. The value is legitimate, but the standard error collapses to 0(1)/60=0\sqrt{0(1)/60} = 0 and the Large Counts condition fails, so the usual z procedures do not apply to that sample.

What is the difference between p-hat and p?

p^\hat{p} is the proportion in your sample: known, computable, and different for every sample you take. pp is the proportion in the population: fixed and unknown. You use p^\hat{p} to estimate pp, which is what a confidence interval and a significance test are both built to do.

How much should I round p-hat?

Do not round it at all inside a calculation. Store x/nx/n in your calculator and carry it through the standard error and the interval, then round the reported interval to three or four decimals. Rounding p^\hat{p} early can shift an endpoint enough to change your conclusion in a close case.

The percentage times n gave me a decimal count. Which whole number do I use?

Either neighbor is defensible, since the source rounded the percentage. Use the nearest whole number, say which one you used, and check that the resulting proportion still rounds back to the reported percentage.