ForHosting KIT · Math

Sampling distribution of a sample proportion

With a true share of 0.6 and samples of 100, the sample proportion centres on 0.6 with a variance of 0.0024 and a standard deviation equal to its square root. Enter the share and the sample size to see the full pair, plus the complement. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Population proportion
0.6
Sample size
100
You get
Mean
0.6
Q
0.4
Variance
0.0024
Standard deviation
0.0489897949

This sampling distribution of a sample proportion calculator reports both parameters of the distribution of p-hat. The mean equals the population proportion p, and the standard deviation equals the square root of p times one minus p divided by the sample size n. You enter a population proportion in the closed unit interval and a positive integer sample size; the engine returns the cleaned inputs, the complement q equals one minus p, the binomial sampling variance p times q over n, and the standard deviation as the positive square root of that variance. Classic checks include a sixty percent population share with one hundred draws, which yields mean zero point six and a standard deviation near four point nine percent. The path is pure deterministic floating-point arithmetic: no network calls, no bootstrap resampling, and no date-dependent shortcuts.

What this distribution is and what you get

The sampling distribution of a sample proportion p-hat is the probability distribution of that sample share across all simple random samples of size n drawn from a population whose true proportion of successes is p. Its two parameters are completely determined by p and n: the mean equals p, so the sample proportion is unbiased for the population proportion, and the standard deviation equals the square root of p times one minus p divided by n, which is how much p-hat is expected to wobble from sample to sample.

This calculator returns both numbers, together with the complement q equals one minus p and the sampling variance p times q over n, so a homework write-up or a poll-design memo can show the full classical pair instead of only a standard-error fragment. That pair is the theoretical sampling distribution when the population parameter p is known; it is not the same search as a plug-in standard error that substitutes an observed p-hat for p after the sample is already collected.

Students meet this object when a textbook asks for the mean and standard deviation of p-hat, when they check how the spread shrinks as n grows, and when they compare a hypothesized population share with the sampling variability of a planned sample. Sample size must be a positive integer because n is a count of independent Bernoulli trials; a decimal, zero, or negative n is not a valid trial count for this distribution. Population proportion must lie in the closed unit interval.

Where the sampling distribution of a sample proportion earns its keep

Classrooms and tutoring platforms use a sampling distribution of a sample proportion calculator so learners can check both the mean and the standard deviation for arbitrary p and n without mixing up the plug-in standard-error formula that uses an observed p-hat with the theoretical distribution that uses the population p. Exam-prep generators need a deterministic oracle that rejects a non-integer sample size instead of silently flooring n and producing a plausible-looking but wrong sigma that a buggy grader might treat as success.

Survey designers and poll desks use the same pair when they ask how large n must be before the sampling distribution of a yes-share is tight enough for a press release: the mean stays at p while sigma shrinks like one over the square root of n.

Product and operations teams watch the theoretical spread of a conversion rate, defect rate, or churn share when they know a historical baseline p and are planning a sample of n users; that is a different question from estimating a standard error after the sample is already collected. Researchers writing methods sections can pin the exact mean and standard deviation of p-hat in supplementary tables without re-implementing a square root in every notebook.

Keep n a positive integer, keep p inside the unit interval, and you get reproducible parameters of the sampling distribution of a sample proportion for worksheets, LMS plugins, and edge workers without standing up a statistics package of your own.

Homework and exam keys

Check both μ = p and σ = √(p(1−p)/n) for textbook sampling-distribution items, including the rejection of a non-integer sample size.

Poll and survey design

Plan how tightly p-hat will concentrate around a known population share as n grows, before any sample is collected.

What does the sampling distribution of a sample proportion calculator cost?

It is free in your browser on this page.

How is this different from the standard error of a proportion?

This page uses the known population proportion p and returns both the mean μ = p and the standard deviation σ = √(p(1−p)/n) of the sampling distribution of p-hat. A standard-error calculator plugs an observed sample p-hat into √(p-hat(1−p-hat)/n) after the sample is collected.

Why must sample size be a positive integer?

Sample size n is a count of independent Bernoulli trials.

What formulas does the calculator use?

The mean of p-hat is the population proportion p. The variance is p times one minus p divided by n. The standard deviation is the positive square root of that variance.

What happens if the population proportion is 0 or 1?

The product p(1−p) vanishes, so the sampling variance and standard deviation are exactly zero. The mean is still p. That matches the classical formula.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/stat/sampling-distribution-sample-proportion

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/stat/sampling-distribution-sample-proportion \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"population_proportion":0.6,"sample_size":100}'
{
  "population_proportion": 0.6,
  "sample_size": 100
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "stat.sampling_distribution_sample_proportion",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What the sampling distribution of a sample proportion is and what this response contains

The engine never invents a bootstrap histogram or a random draw: it evaluates the closed-form mean and square-root formula on finite numbers and either returns a cacheable JSON object or rejects the request with invalid_input. Use the free browser path to check a textbook item, then the API at $0.002 per successful call when you need the same pair in an automated key or pipeline.

How inputs are read and how the mean and standard deviation stay stable

Each value is parsed as a finite decimal; optional leading signs and scientific notation are allowed, while empty tokens, bare letters, and non-numeric objects fail with a clear field name in the message so a bad cell does not become a silent zero. After parsing, the engine enforces the closed unit interval for the population proportion and requires the sample size to be a positive integer, not merely a number greater than or equal to one. Boundary cases are intentional and useful: when the population proportion is zero or one the product vanishes and the standard deviation is exactly zero, which matches the classical formula even though real-world intervals may need continuity corrections elsewhere. The preferred fields are population_proportion and sample_size, but aliases p and proportion map to the population proportion, while n and size map to the sample size, so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. Providing more than one alias for the same role at once is rejected to avoid ambiguous precedence. A value such as two point five, zero, or negative three fails with invalid_input naming the sample-size field, because a sampling distribution of a sample proportion is defined on a count of trials. Computation is then a handful of arithmetic steps: mean is the population proportion, q is one minus that proportion, variance is the product of the proportion and q divided by n, and standard_deviation is the positive square root of that variance. Pair the free browser run on this page with the priced API when you need the identical descriptive result inside an automated pipeline without re-implementing the square-root formula yourself.

Where the sampling distribution of a sample proportion earns its keep

Each successful API request costs the published $0.002 with no model tokens and no outbound network; invalid input does not consume balance.

Deterministic LMS and CI fixtures

Generate reproducible mean, variance, and standard-deviation values for unit tests and auto-graders without hand-maintaining tables.

Read the full KIT documentation →