Sample Proportion Calculator

P-Hat Calculator (p̂)

Calculate sample proportion with confidence intervals. Estimate population proportions from sample data with statistical precision.

Last updated: March 2026

Sample Proportion (p̂)
0.2400
24.00%
95% Confidence Interval
[0.2026, 0.2774]
or [20.26%, 27.74%]
q̂ (1-p̂)
0.7600
Std Error (SE)
0.0191
Margin Error
0.0374
z* critical
1.96

What is p̂ (P-Hat)?

p̂ (p-hat) is the sample proportion—the estimated proportion of successes in a sample. It's calculated as p̂ = x/n, where x is the number of successes and n is the sample size. The "hat" notation (^) indicates it's a sample estimate of the true population proportion p.

p̂ serves as our best point estimate for the unknown population proportion. However, because samples vary randomly, we compute a confidence interval around p̂ to capture the likely range where the true population proportion lies. The interval accounts for sampling variability and provides a measure of precision.

The confidence interval is constructed as p̂ ± (z* × SE), where SE = √(p̂q̂/n) is the standard error and z* is the critical value for the desired confidence level. For example, a 95% confidence interval means if we repeated the sampling process many times, approximately 95% of the intervals would contain the true population proportion.

How to Use This Calculator

Step-by-Step Guide

1
Gather sample data: Count successes (x) in your sample of size n. Example: survey 500 voters, 275 support a candidate → x=275, n=500.
2
Choose confidence level: Select 90%, 95%, or 99%. Standard is 95%. Higher confidence = wider interval but more certainty.
3
Calculate automatically: The calculator computes p̂ = x/n, standard error SE = √(p̂q̂/n), margin of error ME = z*×SE, and confidence interval [p̂-ME, p̂+ME].
4
Interpret results: Report: "The sample proportion is p̂ (point estimate), and we're X% confident the true population proportion is between lower and upper bounds."

Key Formulas

p̂ = x / n (sample proportion)
q̂ = 1 - p̂ (complement)
SE = √(p̂q̂ / n) (standard error)
ME = z* × SE (margin of error)
CI = [p̂ - ME, p̂ + ME] (confidence interval)
z* values: 90%→1.645, 95%→1.96, 99%→2.576

Example Calculation

Political Poll Analysis

Scenario:
Sample: 500 voters surveyed, 120 support the candidate
x = 120, n = 500
Confidence level: 95%
Step 1: Calculate p̂
p̂ = 120 / 500 = 0.24 (24%)

Step 2: Calculate q̂
q̂ = 1 - 0.24 = 0.76

Step 3: Calculate Standard Error
SE = √(0.24 × 0.76 / 500) = √(0.0003648) ≈ 0.0191

Step 4: Build 95% Confidence Interval
z* = 1.96 (for 95%)
ME = 1.96 × 0.0191 ≈ 0.0375
CI = [0.24 - 0.0375, 0.24 + 0.0375]
CI = [0.2025, 0.2775] or [20.25%, 27.75%]
Interpretation:

The sample proportion is 24%, and we're 95% confident that the true proportion of all voters who support the candidate is between 20.25% and 27.75%. This range accounts for sampling variability.

Frequently Asked Questions

What is p̂ (p-hat)?

p̂ = sample proportion = x/n. Best estimate of true population proportion p using sample data. Example: 120 successes in 500 trials → p̂ = 0.24 (24% estimated success rate). Hat (^) indicates it's a sample estimate.

How does confidence interval work?

Range of plausible values for true population proportion: [p̂ - ME, p̂ + ME]. 95% CI means: if we repeated sampling 100 times, ~95 intervals would contain true p. Wider CI = more confidence but less precision.

What is margin of error?

ME = z* × SE. Uncertainty buffer around p̂. z* = critical value (1.96 for 95%, 2.576 for 99%). SE = √(p̂q̂/n) where q̂ = 1-p̂. Larger sample → smaller SE → smaller ME (more precise estimate).

Why use 90%, 95%, 99% confidence?

Tradeoff: 90% = narrower interval, less confident; 99% = wider interval, more confident. Standard: 95% balances precision & confidence. Choose 99% for critical decisions (medicine, law), 90% for quick estimates.

When is this CI valid?

Rule of thumb: np̂ ≥ 10 AND n(1-p̂) ≥ 10. Ensures normal approximation is accurate. Small samples or extreme p̂ (near 0 or 1) need alternative methods like Wilson score or Clopper-Pearson exact CI.

What's the difference: p vs p̂?

p = true population proportion (unknown, fixed). p̂ = sample proportion (calculated, varies by sample). Goal: use p̂ ± ME to estimate range containing p. Distinction critical: p never changes, p̂ varies across samples.

Real-world application?

Poll: surveyed 1000 voters, 550 support candidate (p̂=0.55). 95% CI: [0.52, 0.58]. Meaning: 'Likely 52-58% of all voters support candidate' vs claiming exactly 55% (false precision). Accounts for sampling uncertainty.

How does sample size affect CI?

Larger n → smaller SE → smaller ME → narrower CI (more precise). Example: n=100 vs n=1,000 with same p̂, CI width decreases by ~√10 ≈ 3.16×. Doubling sample cuts ME by ~29%. Returns diminish with larger n.

Related Tools