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 and read "p-hat". It is the fraction of your sample that has the characteristic you are counting:
Here is the number of successes in the sample and is the sample size. Both are counts of individuals, so is a whole number, is never larger than , and 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 with no hat, which is the proportion in the entire population.
Because is a fraction of two counts, it can only take the values , , , and so on. With , 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 flips when the definition flips. If 84 of 150 library patrons used the e-book service, then for users and 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 and your describe the same group of people, counted the same way.
The second habit matters more than it looks. Most wrong values of 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 and 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 and :
The phrases that signal are "a random sample of 250", "surveyed 250 households", or "250 were selected". The phrases that signal 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, , 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 group | Used e-books | Did not use e-books | Total |
|---|---|---|---|
| Under 30 | 84 | 66 | 150 |
| 30 and over | 102 | 148 | 250 |
| Total | 186 | 214 | 400 |
Three questions, three denominators:
- Proportion of all patrons who used e-books: divide by the grand total, .
- Proportion of the under-30 patrons who used e-books: divide by that row total, .
- Proportion of the e-book users who are under 30: divide by that column total, .
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 directly, so a reported 43% is .
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:
With 43% of people, . 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 , 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.
- is a statistic. You computed it from a sample, so you know its value, and a different sample would give a different value.
- 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 is the point estimate of . It is also an unbiased estimator: across all possible samples of size , the values of center on rather than sitting systematically above or below it.
That is why hypotheses are always written about and never about . Writing 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 . Nothing went wrong. Two samples contain different people, so their proportions differ, and that is called sampling variability.
Collect the values of from every possible sample of size and you get the sampling distribution of the sample proportion, described in topic 3.2. When the sampled values are independent, that distribution has
The symbol (mu sub p-hat) is the mean of all those sample proportions, and (sigma sub p-hat) is their standard deviation. Since is unknown in practice, you substitute your own and call the result the standard error:
Two readable facts come straight out of the formula. Because sits in the denominator, larger samples give less variable estimates: at , moving from to drops the standard deviation from to , so quadrupling halves it. Because is largest at , proportions near a half are the noisiest to estimate.
That standard error is the engine of the confidence interval: the interval is plus or minus a critical value times . The difference between , which uses the true , and , 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 and . Any above 1 is that error, every time.
- Taking the numerator from one group and the denominator from another in a two-way table.
- Writing in a hypothesis. Hypotheses are claims about .
- Rounding to two decimals and then building an interval from it. Carry the full value, or the fraction , through the arithmetic and round only the final answer.
- Reporting 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 , find the number of supporters, check the Large Counts condition, and compute the standard error.
Convert the percentage to a proportion: . This is already the sample proportion, so no division is needed.
Recover the count of successes: supporters.
Check the division back: , which matches the reported percentage.
Count the failures: voters who do not support the measure.
Check Large Counts: and , so the sampling distribution of is approximately normal.
Standard error, step by step. Multiply: . Divide by : . Take the square root: .
from supporters out of . Both counts clear 10 (172 successes and 228 failures), and the standard error is .
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.
Check the table first. The rows add: and . The columns add: and . Both grand totals agree: and .
All patrons who used e-books. Success is using the service, and the group is everyone, so and : .
Under-30 patrons who used e-books. The group is now the first row only, so and : .
Standard error for the under-30 group. Multiply: . Divide by 150: . Square root: .
Compare with the 30-and-over group, , to see that the two age groups do not use the service at the same rate in this sample.
Overall, . Among under-30 patrons, with . Among patrons 30 and over, .
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 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 . The value is legitimate, but the standard error collapses to 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?
is the proportion in your sample: known, computable, and different for every sample you take. is the proportion in the population: fixed and unknown. You use to estimate , 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 in your calculator and carry it through the standard error and the interval, then round the reported interval to three or four decimals. Rounding 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.