🔍

首页Home › 数学工具Math

p̂ 样本比例 p̂ 计算器(标准误与置信区间)P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval)

由成功次数 x 和样本量 n 算样本比例 p̂ = x/n、q̂ = 1 − p̂、标准误 √(p̂q̂/n),并给出 90%、95% 或 99% 的 Wald 与 Wilson 置信区间,检查正态近似条件 np̂ ≥ 10、nq̂ ≥ 10。本地处理。From the successes x and the sample size n, get the sample proportion p̂ = x/n, q̂ = 1 − p̂, the standard error √(p̂q̂/n) and a 90%, 95% or 99% Wald and Wilson confidence interval, with a check of the normal-approximation condition np̂ ≥ 10 and nq̂ ≥ 10. Processed locally.

使用说明与常见问题How-to & FAQ

「样本比例 p̂ 计算器(标准误与置信区间)」是什么?What is the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) tool?

由成功次数 x 和样本量 n 算样本比例 p̂ = x/n、q̂ = 1 − p̂、标准误 √(p̂q̂/n),并给出 90%、95% 或 99% 的 Wald 与 Wilson 置信区间,检查正态近似条件 np̂ ≥ 10、nq̂ ≥ 10。本地处理。From the successes x and the sample size n, get the sample proportion p̂ = x/n, q̂ = 1 − p̂, the standard error √(p̂q̂/n) and a 90%, 95% or 99% Wald and Wilson confidence interval, with a check of the normal-approximation condition np̂ ≥ 10 and nq̂ ≥ 10. Processed locally.

如何使用「样本比例 p̂ 计算器(标准误与置信区间)」?How do I use the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) tool?

在「样本比例 p̂ 计算器(标准误与置信区间)」中,填写「成功次数 x」、「样本量 n」、「置信水平」等参数,结果会随输入实时计算并显示在下方。In the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval): Fill in "Successes x", "Sample size n", "Confidence level"; results are recalculated instantly as you type.

p̂ 是什么?What is p-hat?

p̂(读作 p hat)是样本比例,用来估计总体比例 p:p̂ = 成功次数 ÷ 样本量。例如调查 100 人有 42 人赞成,p̂ = 0.42。p̂ (p-hat) is the sample proportion, an estimate of the population proportion p: p̂ = successes ÷ sample size. If 42 of 100 people agree, p̂ = 0.42.

Wald 和 Wilson 区间有什么区别?How do the Wald and Wilson intervals differ?

Wald 区间 p̂ ± z·√(p̂q̂/n) 是教科书常用公式,但样本小或 p̂ 接近 0、1 时覆盖率偏低。Wilson 区间在这些情况下更准确,样本大时两者几乎相同。The Wald interval p̂ ± z·√(p̂q̂/n) is the usual textbook formula, but it covers too little when the sample is small or p̂ is near 0 or 1. The Wilson interval is more accurate there, and the two almost match for large samples.

什么时候能用正态近似?When can I use the normal approximation?

常用条件是 np̂ ≥ 10 且 n(1 − p̂) ≥ 10(有些教材用 5)。不满足时页面会提示,并建议用 Wilson 区间。The usual condition is np̂ ≥ 10 and n(1 − p̂) ≥ 10 (some textbooks use 5). If it fails the page says so and points you to the Wilson interval.

能举个计算实例吗?Can you show a worked example?

例如在「样本比例 p̂ 计算器(标准误与置信区间)」中填 成功次数 x = 25,样本量 n = 100,置信水平 = 95%,结果区显示:样本比例 p̂ = x/n:0.25(25%);q̂ = 1 − p̂:0.75;标准误 SE = √(p̂q̂/n):0.043301;95% Wald 区间 p̂ ± z·SE(z = 1.96):[0.1651, 0.3349];误差范围 z·SE:0.0849;95% Wilson 区间:[0.1755, 0.343];✔ np̂ = 25、nq̂ = 75 都 ≥ 10,正态近似可用For example, entering Successes x = 25, Sample size n = 100, Confidence level = 95% in the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) gives: Sample proportion p̂ = x/n: 0.25 (25%); q̂ = 1 − p̂: 0.75; Standard error SE = √(p̂q̂/n): 0.043301; 95% Wald interval p̂ ± z·SE (z = 1.96): [0.1651, 0.3349]; Margin of error z·SE: 0.0849; 95% Wilson interval: [0.1755, 0.343]; ✔ np̂ = 25 and nq̂ = 75 are both…

哪些输入会被检查?Which inputs are validated?

「样本比例 p̂ 计算器(标准误与置信区间)」会检查这些输入——「成功次数 x」:必须填写,不能为负数;「样本量 n」:必须填写,须大于 0,须为整数;绝对值超过 10¹⁵ 的数也会被拒绝。不符合时结果区显示具体提示,不会给出数字。The P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) checks its inputs — "Successes x": required, cannot be negative; "Sample size n": required, must be greater than 0, must be a whole number; numbers above 10¹⁵ in absolute value are rejected too. When a value fails, the result area names the problem instead of showing a number.

有哪些选项可以调整?What options can I adjust?

「样本比例 p̂ 计算器(标准误与置信区间)」的设置:「成功次数 x」默认 42;「样本量 n」默认 100;「置信水平」可选 90%、95%、99%(默认 95%)。每次生成结果都按当前设置处理。Settings in the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) — "Successes x" default 42; "Sample size n" default 100; "Confidence level": 90%, 95%, 99% (default 95%). The result always uses the current settings.

计算精度如何?How precise are the results?

「样本比例 p̂ 计算器(标准误与置信区间)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.

「样本比例 p̂ 计算器(标准误与置信区间)」免费吗?需要注册吗?Is the P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) free? Do I need an account?

「样本比例 p̂ 计算器(标准误与置信区间)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The P-Hat Calculator (Sample Proportion, Standard Error & Confidence Interval) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

% 百分等级计算器(由数据或人数)Percentile Rank Calculator (from Data or Counts)🎯 准确率计算器(混淆矩阵与测量误差)Accuracy Calculator (Confusion Matrix & Measurement Error)eˣ 指数函数计算器(求值、反解 x、两点拟合)Exponential Function Calculator (Evaluate, Solve for x, Fit Two Points)Binomial 二项分布计算器(单点、累积概率与分布表)Binomial Distribution Calculator (Exact, Cumulative & Table)AVG% 平均百分比计算器(简单平均与加权平均)Average Percentage Calculator (Simple & Weighted)⁻¹ 模逆元计算器(扩展欧几里得,支持大整数)Modular Inverse Calculator (Extended Euclid, Big Integers)◯ 单位圆计算器(六个三角函数、精确值、象限)Unit Circle Calculator (Six Trig Functions, Exact Values, Quadrant)⊙ 圆的方程计算器(标准式、一般式互化)Equation of a Circle Calculator (Standard & General Form)Δ 绝对变化计算器(含相对变化与倍数)Absolute Change Calculator (with Relative Change & Ratio)∠ 两向量夹角计算器(二维/三维)Angle Between Two Vectors Calculator (2D/3D)R² 决定系数 R² 计算器(数据拟合或 SS)Coefficient of Determination (R²) Calculator (from Data or SS)trig 余函数计算器(sin/cos、tan/cot、sec/csc)Cofunction Calculator (sin/cos, tan/cot, sec/csc)

← 全部工具All tools