Sampling Distributions 22 min read September 21, 2026
BY: Statistics Fundamentals Team  |  Reviewed By: Minsa A (Senior Statistics Editor)

Sample Proportion Examples: Formula, Calculation & Solutions

A coach records how many players make a free throw. A quality engineer counts defective parts in a batch. A researcher notes how many participants meet a study criterion. In every case, the number of matching outcomes divided by the total gives the sample proportion. This page shows you how to calculate it, what p-hat means, and how it connects to the broader machinery of inference.

What You'll Find Here
  • ✓ The p-hat formula with immediate examples
  • ✓ A quick-reference table of 10 worked examples
  • ✓ Interactive sample proportion calculator
  • ✓ Population vs sample proportion explained clearly
  • ✓ Standard error, sampling distributions, confidence intervals, hypothesis testing
  • ✓ Practice generator and simulation visualizer
  • ✓ Common mistakes and a formula cheat sheet

What Is a Sample Proportion?

Definition — Sample Proportion
A sample proportion is the fraction of observations in a sample that belong to a category of interest. It is denoted p-hat (p̂) and calculated by dividing the number of successes by the total sample size.
p̂ = x / n

x is the count of observations with the characteristic you're measuring (called successes, regardless of whether the outcome is desirable). n is the total number of observations in the sample. The result is a number between 0 and 1.

💡
Quick answer for homework

If 30 out of 100 students prefer online classes: p̂ = 30/100 = 0.30, which equals 30%. The word "success" just means the outcome you're counting, not a positive result.

Sample Proportion Formula

Sample Proportion Formula
p̂ = x / n
= sample proportion (p-hat) x = number of successes n = sample size

Converting to a percentage: multiply by 100. So p̂ = 0.30 becomes 30%. To go the other direction, divide a percentage by 100: 30% = 0.30.

Sample Proportion Examples at a Glance

The table below shows 10 illustrative examples. All numbers are hypothetical and are provided to demonstrate the calculation.

Situation (Illustrative) Successes (x) Sample Size (n) p̂ = x/n Percentage
Students preferring online classes301000.3030%
Customers making a repeat purchase452000.22522.5%
Patients meeting a study criterion18500.3636%
Survey respondents selecting option A721200.6060%
Employees working remotely7250.2828%
Voters choosing candidate X (hypothetical)903000.3030%
Products passing inspection12400.3030%
Households owning a pet1505000.3030%
Machines requiring maintenance3200.1515%
Survey respondents selecting a preference27510000.27527.5%

Sample Proportion Calculator

Calculate p-Hat Instantly

What Is p-Hat?

The symbol p̂ is read as p-hat. The hat (̂) signals that it is a statistic estimated from sample data, rather than a fixed population value. Every time you draw a different sample from the same population, you will likely get a different value of p̂.

Symbol Name What It Represents
pPopulation proportionThe true proportion in the entire population. Usually unknown and the target of inference.
Sample proportion (p-hat)The proportion observed in your sample. Calculated from data. Varies across samples.

The key point: p̂ estimates p, but the two are rarely identical. A sample is just a window into a population. The gap between them is sampling error, and understanding it is why the sampling distribution matters.

How to Calculate a Sample Proportion

The process has five steps, each taking a few seconds once you know which number is x and which is n.

1

Identify the outcome you are counting

Decide what counts as a "success." This is simply the category you want to measure: preferred option, defective item, yes/no, pass/fail. The choice must be consistent throughout the problem.

2

Count the successes (x)

Go through the data and count how many observations belong to your defined category. This is x. It must be a whole number and cannot exceed n.

3

Record the sample size (n)

n is the total number of observations in the sample, not the population size. If you surveyed 150 people, n = 150 regardless of how large the underlying population is.

4

Divide: p̂ = x / n

Carry out the division. Keep at least three or four decimal places during intermediate calculations to avoid rounding errors in later steps.

5

Convert to percentage if needed

Multiply by 100. p̂ = 0.36 becomes 36%. Report in the form the question asks for and check that the decimal/percentage distinction is correct.

Worked Sample Proportion Examples

Example 1: Simple Sample Proportion

Worked Example 1 — Basic Calculation

Problem: A survey of 200 students finds that 80 prefer in-person classes. What is the sample proportion who prefer in-person?

1

Identify x: 80 students prefer in-person classes.

2

Identify n: 200 students were surveyed in total.

3

Apply the formula: p̂ = x/n = 80/200

4

Calculate: p̂ = 0.40

5

Convert: 0.40 × 100 = 40%

✓ 40% of the sampled students preferred in-person classes (p̂ = 0.40).

Example 2: Small Sample

Worked Example 2 — Small Sample

Problem: 7 of 20 employees report working remotely full-time. Find p-hat.

1

x = 7 (employees working remotely full-time)

2

n = 20

3

p̂ = 7/20 = 0.35 = 35%

✓ p̂ = 0.35. With only 20 observations, this proportion is likely to fluctuate considerably across different random samples from the same workplace.

Example 3: Large Sample

Worked Example 3 — Large Sample

Problem: 275 of 1,000 survey respondents selected option B. Find p̂.

1

x = 275, n = 1,000

2

p̂ = 275/1000 = 0.275 = 27.5%

✓ p̂ = 0.275. With a larger sample, individual sample proportions from repeated sampling will cluster more tightly around the true population proportion.

Example 4: Quality Control

Worked Example 4 — Quality Control

Problem: A manufacturer inspects 500 units and finds 12 defective. Define "success" as defective. Find the sample proportion of defective units.

1

"Success" here means defective. x = 12, n = 500.

2

p̂ = 12/500 = 0.024 = 2.4%

✓ An estimated 2.4% of units in this batch are defective. Remember: "success" is just the event being counted. It does not imply a desirable outcome.

Example 5: Zero Successes

Worked Example 5 — Zero Successes

Problem: None of 50 items inspected showed the characteristic of interest. What is p-hat?

1

x = 0, n = 50

2

p̂ = 0/50 = 0

✓ p̂ = 0. A sample proportion of 0 is valid. It does not prove the population proportion is 0, only that the characteristic was absent in this particular sample. Larger samples give stronger evidence.

Example 6: All Successes

Worked Example 6 — 100% Successes

Problem: Every one of 50 tested units passed the check. What is p-hat?

1

x = 50, n = 50

2

p̂ = 50/50 = 1.00 = 100%

✓ p̂ = 1.00. Every sampled unit passed. This does not guarantee the population proportion is 1; other samples might include failures. The Wilson confidence interval (discussed below) handles edge cases like this better than the standard Wald interval.

Example 7: Identifying x from a Frequency Table

Worked Example 7 — Frequency Table

Problem: A survey records the following responses. Find the sample proportion answering "Yes."

ResponseCount
Yes72
No128
Total200
1

The "success" is Yes. x = 72, n = 200 (total responses).

2

p̂ = 72/200 = 0.36 = 36%

✓ 36% of sampled respondents answered Yes. The failure proportion is 1 − 0.36 = 0.64, or 64%.

Example 8: Research Context

Worked Example 8 — Research (Hypothetical)

Problem (Hypothetical): A study observes 250 participants and 40 meet a predefined criterion. Find p̂.

1

x = 40, n = 250

2

p̂ = 40/250 = 0.16 = 16%

✓ p̂ = 0.16. These numbers are hypothetical and illustrate the calculation only.

Example 9: Full Exam-Style Problem

Worked Example 9 — Full Solution

Problem: A researcher randomly selects 400 people and finds 156 meet a specified criterion. Find (a) the sample proportion, (b) the percentage, (c) the number who did not meet the criterion, and (d) the failure proportion.

1

Identify values: x = 156, n = 400

2

Sample proportion: p̂ = 156/400 = 0.39

3

Percentage: 0.39 × 100 = 39%

4

Did not meet criterion: 400 − 156 = 244

5

Failure proportion: 244/400 = 1 − 0.39 = 0.61

✓ p̂ = 0.39 (39%). Failure proportion = 0.61. These two proportions always sum to 1.00.

Example 10: Identifying x and n from a Word Problem

Worked Example 10 — Word Problem

Problem: A school administrator reports that out of 85 applicants this term, 34 were accepted. A further 12 applicants withdrew before a decision. What is the sample proportion of those who applied and received an offer?

1

Define the sample: Total applicants = 85. The 12 who withdrew are part of the applicant pool, so n = 85.

2

Define successes: "Success" = received an offer. x = 34.

3

p̂ = 34/85 = 0.400 = 40%

✓ p̂ = 0.40. Reading carefully to identify x and n is the most important skill in word problems. The 12 withdrawals are part of n because they were applicants. They are simply not successes.

Sample Proportion vs Population Proportion

These two quantities are related but distinct. The confusion between them causes the most common errors in proportion problems.

p
Population Proportion
(fixed, usually unknown)
n
Random Sample
of size n
Sample Proportion
(estimated from data)
Population vs Sample Example

Hypothetical scenario showing how the two proportions can differ

Suppose a population contains 10,000 adults. Exactly 6,000 prefer a particular scheduling option: p = 6,000/10,000 = 0.60.

A researcher randomly samples 100 adults and finds 57 prefer that option: p̂ = 57/100 = 0.57.

A second random sample of 100 from the same population finds 63 prefer it: p̂ = 0.63.

✓ Both samples came from the same population (p = 0.60) but produced different p̂ values (0.57 and 0.63). This variation across samples is sampling variability.

Sample Proportion and the Sampling Distribution

A single p̂ is one outcome. If you could repeat the sampling process many times, each giving a fresh p̂, those values would form a sampling distribution.

Under standard random-sampling conditions:

Sampling Distribution of p̂
E(p̂) = p
and the standard deviation (standard error) is:
SE(p̂) = √[p(1−p)/n]
When p is unknown, estimate it with p̂: SE(p̂) ≈ √[p̂(1−p̂)/n]

The first equation says the sampling distribution is centered on the true population proportion. The second gives the spread. Larger samples (bigger n) produce smaller standard errors, which means your individual sample proportions cluster more tightly around p.

Standard error formula depends on context

When you know p (for example, in a hypothesis test where you specify a null value), use p in the formula. When estimating from data (confidence intervals), substitute p̂ for p, since p is unknown. These two uses are not interchangeable.

Standard Error Examples

Standard Error — Example

Given p = 0.40 and n = 100, find the standard error of p̂.

1

SE(p̂) = √[p(1−p)/n] = √[(0.40)(0.60)/100]

2

= √[0.24/100] = √[0.0024]

3

SE(p̂) = 0.049 (to 3 d.p.)

✓ A standard error of 0.049 means that across repeated samples of size 100 from this population, p̂ values will typically be within about 0.05 of the true proportion.

When Can You Use a Normal Approximation?

The sampling distribution of p̂ approaches a normal distribution as n grows. A widely taught rule of thumb checks that both the expected number of successes and the expected number of failures are at least 10:

Success-Failure Condition
np ≥ 10   and   n(1−p) ≥ 10
📝
Context matters

Some courses use 5 instead of 10, or check np̂ and n(1−p̂) when p is unknown. The threshold varies across textbooks. The condition is a guideline, not a mathematical theorem. When in doubt, verify which rule your course uses.

Sample Proportion and Confidence Intervals

A confidence interval uses p̂ to estimate a range that likely contains p. The basic Wald interval is:

Wald Confidence Interval for p
p̂ ± z* √[p̂(1−p̂)/n]
For 95% confidence: z* = 1.96  |  For 99%: z* = 2.576
Confidence Interval — Example

Problem: From a sample of 400 people, 156 meet a criterion (p̂ = 0.39). Construct a 95% confidence interval for the population proportion p.

1

p̂ = 0.39, n = 400, z* = 1.96

2

SE = √[(0.39)(0.61)/400] = √[0.2379/400] = √[0.000595] = 0.0244

3

Margin of error = 1.96 × 0.0244 = 0.0478 ≈ 0.048

4

Interval: 0.39 − 0.048 to 0.39 + 0.048 = (0.342, 0.438)

✓ We are 95% confident the true population proportion lies between 0.342 and 0.438 (34.2% to 43.8%). The Wald interval works well with moderate sample sizes and proportions away from 0 or 1. For smaller samples or extreme proportions, the Wilson interval (available at the Wilson Score Interval page) is preferable.

For a deeper comparison of interval methods, see the Wilson vs Clopper-Pearson vs Normal Approximation guide.

Sample Proportion and Hypothesis Testing

p̂ plays a direct role in testing claims about population proportions. In a one-proportion z-test, the test statistic measures how many standard errors p̂ is from the null value p₀:

One-Proportion Z-Test Statistic
z = (p̂ − p₀) / √[p₀(1−p₀)/n]
= observed sample proportion p₀ = null hypothesis value n = sample size
Use p₀, not p̂, in the standard error for the test statistic

In hypothesis testing you assume H₀ is true, so the standard error is computed using the null proportion p₀. In a confidence interval you do not assume a null proportion, so you substitute p̂ instead. This distinction is easy to mix up.

Hypothesis Test — Example

Problem: A company claims 50% of customers prefer its product. A survey of 100 customers shows 60 prefer it. At α = 0.05, is the claim supported?

1

Hypotheses: H₀: p = 0.50  |  H₁: p ≠ 0.50 (two-tailed)

2

Calculate p̂: p̂ = 60/100 = 0.60

3

SE under H₀: √[(0.50)(0.50)/100] = √[0.0025] = 0.05

4

Test statistic: z = (0.60 − 0.50)/0.05 = 0.10/0.05 = 2.00

5

p-value: Two-tailed: 2 × P(Z > 2.00) ≈ 2 × 0.0228 = 0.046

6

Decision: p = 0.046 < α = 0.05. Reject H₀.

✓ There is sufficient evidence at the 5% level to conclude that the true proportion differs from 0.50. The sample data (p̂ = 0.60) is statistically inconsistent with the claimed proportion of 50%. See the full hypothesis testing guide for p-value interpretation and the z-table for critical values.

Sampling Distribution Visualizer

Simulate Repeated Sampling

Adjust the population proportion and sample size, then run the simulation to see how sample proportions are distributed across many samples. All calculations run locally in your browser.

This is a simulation for illustration purposes. Results will vary each time you run it.

Practice Problems

Sample Proportion Practice Generator

Problems generated randomly. All calculations run in your browser.
Click "New Problem" to begin.

Sample Proportion vs Sample Mean

Feature Sample Proportion Sample Mean
Symbol
Data typeBinary / categorical outcomeQuantitative measurement
Formulax/n∑x/n
Population parameterpμ
Standard error formula√[p(1−p)/n]σ/√n
Typical useYes/No, pass/fail, success/failureHeights, scores, times, prices

Common Mistakes

MistakeWrongCorrect
Confusing p and p̂p = 0.30 because the sample gave 0.30p̂ = 0.30. p is the unknown population proportion.
Using population size instead of sample sizen = 10,000 (population)n = number actually sampled
Percentage vs decimal confusionp̂ = 30%p̂ = 0.30 (decimal); 30% is the percentage form
Reporting 0.30 as 0.30%0.30%30% or 0.30
Wrong standard error formula in hypothesis test√[p̂(1−p̂)/n] when testing H₀√[p₀(1−p₀)/n] — use the null value
Forgetting to check normal approximation conditionsApplying a normal CI with n = 5Check np̂ ≥ 10 and n(1−p̂) ≥ 10 first
Using failures count as xx = 70 when 30 of 100 are successesx = 30 (successes); 70 are failures
Rounding too early17/60 → 0.28 → multiplied laterKeep 0.28333... until the final step
Treating p̂ = 0 or 1 as proof about the populationp must be 0 because this sample had nonep̂ = 0 from a small sample is weak evidence
Inconsistent definition of successSwitching between defective/non-defective mid-problemDefine success once and keep it throughout

Formula Cheat Sheet

FormulaWhat It Calculates
p̂ = x/nSample proportion from count data
x = n p̂Implied number of successes from a known proportion and sample size
n = x/p̂Sample size from known successes and proportion
1 − p̂Failure proportion
p̂ × 100Convert sample proportion to percentage
SE(p̂) = √[p(1−p)/n]Standard error when population proportion p is known
SE(p̂) ≈ √[p̂(1−p̂)/n]Estimated standard error (p unknown; used for CIs)
z = (p̂−p₀)/√[p₀(1−p₀)/n]Test statistic for one-proportion z-test
p̂ ± z*√[p̂(1−p̂)/n]Wald confidence interval for p (basic form)
🔗
Related pages on Statistics Fundamentals

Sampling Distributions overview  •  Sample Mean Distribution  •  Confidence Intervals  •  Hypothesis Testing  •  p-Values  •  Population vs Sample

Frequently Asked Questions

A sample proportion is the fraction of observations in a sample that have a particular characteristic. It equals x divided by n, where x is the number of successes and n is the sample size. It is denoted p̂ (p-hat) and serves as an estimate for the population proportion p.

p-hat (p̂) is the symbol for the sample proportion. The hat indicates it is a statistic estimated from sample data, as opposed to p, which is the population proportion. p̂ varies from sample to sample; p is a fixed (though usually unknown) value.

p̂ is a statistic. It is calculated from sample data and varies across samples. The population proportion p is a parameter. Parameters describe populations; statistics describe samples and are used to estimate parameters.

Multiply the decimal proportion by 100. p̂ = 0.35 becomes 35%. To go the other direction, divide the percentage by 100: 35% / 100 = 0.35. A common error is writing 0.30 as 0.30% instead of 30%.

p̂ = 0/n = 0. A sample proportion of 0 is a valid result. However, it does not prove the population proportion is 0. With a small sample, the absence of observed successes may reflect chance. Confidence intervals for proportions near 0 or 1 are better handled with the Wilson or Clopper-Pearson methods than with the standard Wald interval.

SE(p̂) = √[p(1−p)/n] when p is known, or SE(p̂) ≈ √[p̂(1−p̂)/n] when p must be estimated from the sample. The standard error decreases as sample size increases, meaning larger samples give more precise estimates.

In a one-proportion z-test, the test statistic is z = (p̂ − p₀) / √[p₀(1−p₀)/n], where p₀ is the null hypothesis value. The standard error uses p₀ (not p̂) because you compute it under the assumption that H₀ is true.

A common rule checks that np ≥ 10 and n(1−p) ≥ 10. Some courses use 5 as the threshold. This is a guideline rather than a mathematical theorem, and different textbooks vary slightly. Always check the rule your course specifies.

Read the problem to identify (1) the total number of observations studied (this is n) and (2) how many of those observations had the characteristic of interest (this is x). Then apply p̂ = x/n. Be careful: n is the sample size, not the population size, and x is successes, not failures.