错误计算边边距
查找调查比例的误差差差。
输入结果时更新 。
关于此计算器
The margin of error tells you how far a survey result is likely to be from the true population value — the "plus or minus" figure quoted next to poll results. For a proportion it is z*·√(p(1 − p) / n), where p is the sample proportion, n the sample size and z* the critical value for your confidence level (1.96 for 95%).
It reports the margin, the confidence-interval bounds around your proportion and the full interval width, and a table shows how the margin shrinks as the sample grows. The default 50% proportion gives the most conservative (largest) margin, because the quantity p(1 − p) peaks at p = 0.5, which is why pollsters often quote it.
Worked example: with 1,000 respondents split 50/50 at 95% confidence, the margin is 1.96 × √(0.5 × 0.5 ÷ 1000) ≈ 1.96 × 0.0158 ≈ 3.1 percentage points. So a poll result of 50% really means somewhere between about 46.9% and 53.1%. To halve that margin you would need roughly four times the sample.
经常问到的问题
为什么更大的样本会降低误差差?
差值随样本大小的平方根缩小, 误差幅度的幅度翻了四倍。 回报率的下降就是为什么需要大样本将差值推到一两个百分点以下的原因。
为什么50%是默认比例?
p(1 - p) 数量最大, = 0.5, 所以假设50/50的分成产生最大、 最保守的误差差差。 使用它可以保证真实差值不大于报告。
误差率怎么算?
Multiply the critical value z* for your confidence level by the square root of p(1 − p) ÷ n. For p = 0.5, n = 1000 and 95% confidence, that is 1.96 × √(0.25 ÷ 1000) ≈ 3.1 percentage points.
误差和置信间隔之间的差别是什么?
误差是半宽; 置信区间是您从结果中增减差差数后得到的全程。 48%的结果差差差为3点,置信区间为45%至51%。
人口越多, 是否需要更大的误差?
否。 超过几千人的人口规模对差值影响不大,重要的是抽样规模,因此全国民意测验和城市民意测验可以与相同数目的答卷人分享同样的差值。
信任度如何改变误差差?
更高的置信度使用较大的z*, 从而扩大了差幅。 同一样本的比值从95%( z* = 1.96) 升至 99%( z* = 2.576) 增加约 31% 。
API - 使用代码中的计算器
将此计算器称为自由 JSON 端点 。 不需要按键 。 将字段值发送到下面作为查询参数或 JSON 。 任何您省略的, 都会使用相同的默认值, 此页面预填的默认值是预填的; 未知参数是 400, 而不是静音零 。 读取 API 全部文件 →
终点
GET https://calculator.free/api/v1/margin-of-error/
curl
curl "https://calculator.free/api/v1/margin-of-error/?n=1000&p=50&conf=1.96"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/margin-of-error/?" + new URLSearchParams({
"n": "1000",
"p": "50",
"conf": "1.96"
}));
const data = await r.json();
console.log(data.results);
成果仅是一般指导的估计数,而不是财务、医疗或税务咨询。