What this calculator does
P-hat, written p̂, is the standard statistical symbol for a sample proportion: the share of a sample that has some characteristic or outcome, calculated as the number of successes divided by the sample size. If 68 out of 200 people surveyed said yes to a question, p̂ is 68 ÷ 200, or 34%.
The little hat over the p is not decorative. In statistics, a hat over a symbol means "this is an estimate calculated from sample data," as opposed to p on its own, which usually denotes the true, unknown proportion in the entire population. P-hat is what you actually observe; p is what you are usually trying to estimate.
The formula
Divide the number of successes by the sample size: p̂ = x ÷ n. The calculator also shows the standard error of p̂, √(p̂(1−p̂)/n), which measures how much p̂ would be expected to vary from sample to sample of the same size, and is the building block for a margin of error or confidence interval around it.
| Term | Meaning |
|---|---|
| p̂ (p-hat) | The sample proportion: the number of successes divided by the sample size, x ÷ n. |
| x | The number of successes, or the count of the sample that has the characteristic being measured. |
| n | The total sample size: the number of people, items or trials observed. |
| Standard error of p̂ | A measure of how much p̂ would typically vary if the same survey or experiment were repeated with a new sample of the same size. |
The inputs explained
| Field | What to enter |
|---|---|
| Number of successes | The number of successes in the sample: how many said yes, tested positive, or otherwise had the outcome you are counting. |
| Sample size | The total number of people, items or trials in the sample, including both successes and non-successes. |
When to use it
Summarising a survey result
A survey of 200 people where 68 gave a particular answer is most naturally reported as p̂ = 34%, the standard way to express what fraction of a sample fell into a category.
Setting up a hypothesis test or confidence interval
p̂ is the starting input for a proportion-based hypothesis test or confidence interval; this calculator gets that single number right before it feeds into a more involved calculation.
Comparing two samples informally
Calculating p̂ separately for two different groups gives a quick, comparable figure, though a formal comparison (like a relative risk or a two-proportion test) is needed to say whether any difference is statistically meaningful.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How p-hat changes with the number of successes
A fixed sample of 200, with a range of success counts.
| Successes (x) | Sample proportion (p̂) | Standard error of p̂ |
|---|---|---|
| 20 | 10.0% | 0.0212 |
| 50 | 25.0% | 0.0306 |
| 68 | 34.0% | 0.0335 |
| 100 | 50.0% | 0.0354 |
| 150 | 75.0% | 0.0306 |
| 180 | 90.0% | 0.0212 |
How p-hat changes with sample size
A fixed 68 successes, spread across a range of sample sizes.
| Sample size (n) | Sample proportion (p̂) | Standard error of p̂ |
|---|---|---|
| 100 | 68.0% | 0.0466 |
| 150 | 45.3% | 0.0406 |
| 200 | 34.0% | 0.0335 |
| 300 | 22.7% | 0.0242 |
| 500 | 13.6% | 0.0153 |
| 1000 | 6.80% | 0.0080 |
Questions
What does the p hat symbol mean?
p̂ (p with a hat, or circumflex, over it) denotes a sample proportion, an estimate calculated from actual observed data. It is distinguished from plain p, which usually refers to the true, generally unknown, proportion in the whole population.
Is p-hat the same as a percentage?
Yes, expressed as a decimal or fraction rather than a percentage: p̂ = 0.34 is the same thing as 34%. Statistical formulas usually work with the decimal form, but the two are interchangeable.
What is p-hat used for?
It is the starting point for most statistics involving proportions: confidence intervals, margins of error, and hypothesis tests that compare a sample proportion against a hypothesised value or against another sample. See the margin of error calculator for the next step.
Why does the standard error use p̂ instead of the true population proportion?
Because the true population proportion is usually exactly what you are trying to estimate and do not know. Using p̂ in its own standard-error formula is standard practice, since it is the best available estimate at that point in the calculation.
To turn p̂ into a margin of error or confidence interval at a chosen confidence level, use the margin of error calculator.