What is p-hat in statistics?
P-hat (p̂) is the sample proportion — the ratio of the number of times an event occurs (successes) to the total sample size. It is used in inferential statistics to estimate the true population proportion. P-hat always falls between 0 and 1. See also our Effect Size Calculator.
How do I calculate p-hat?
The formula is simple: p̂ = x / n, where x is the number of occurrences (successes) and n is the total sample size. For example, if 25 out of 60 survey respondents prefer a product, then p̂ = 25 / 60 ≈ 0.4167.
What is the difference between p-hat and population proportion (p)?
The population proportion (p) represents the true proportion across the entire population, which is usually unknown. P-hat (p̂) is an estimate of p calculated from a sample. Because it's based on a sample, p-hat is subject to sampling variability and may differ from the true p.
Can p-hat be negative?
No. Since p-hat is a ratio of counts (occurrences divided by sample size), it can only range from 0 to 1. A value of 0 means the event never occurred in the sample, and a value of 1 means it occurred in every observation.
What is q-hat and how is it related to p-hat?
Q-hat (q̂) is the complement of p-hat: q̂ = 1 − p̂. It represents the proportion of the sample that did NOT experience the event of interest. Together, p̂ and q̂ always sum to 1.
How does sample size affect p-hat?
A larger sample size generally makes p-hat a more reliable estimate of the true population proportion. Smaller samples are more susceptible to random variation, meaning p-hat can differ significantly from the actual population proportion. Larger samples reduce this sampling variability.
What does it mean if p-hat equals 0.6 in a political poll?
A p-hat of 0.6 means that 60% of the sampled respondents share the characteristic being measured — for example, 60% intend to vote for a particular candidate. This is a sample-based estimate and may differ from the actual population preference due to sampling error.
What are the applications of p-hat?
P-hat is widely used in hypothesis testing, confidence interval construction, quality control, opinion polling, and medical research. Whenever you want to estimate what proportion of a population has a certain trait based on a sample, p-hat is your key statistic. You might also find our Runs Test Calculator useful.