透過 MCP 連接 →

輸入計算

數學公式

廣告

結果

Normal Distribution Table (f)
101
points generated · first value at x = -5: 0.00000149
x f(x)
-5 0.00000149
-4.9 0.00000244
-4.8 0.00000396
-4.7 0.00000637
-4.6 0.00001014
-4.5 0.00001598
-4.4 0.00002494
-4.3 0.00003854
-4.2 0.00005894
-4.1 0.00008926
-4 0.00013383
-3.9 0.00019866
-3.8 0.00029195
-3.7 0.00042478
-3.6 0.0006119
-3.5 0.00087268
-3.4 0.00123222
-3.3 0.00172257
-3.2 0.00238409
-3.1 0.00326682
-3 0.00443185
-2.9 0.00595253
-2.8 0.00791545
-2.7 0.01042093
-2.6 0.01358297
-2.5 0.0175283
-2.4 0.02239453
-2.3 0.02832704
-2.2 0.03547459
-2.1 0.0439836
-2 0.05399097
-1.9 0.06561581
-1.8 0.07895016
-1.7 0.09404908
-1.6 0.11092083
-1.5 0.1295176
-1.4 0.14972747
-1.3 0.17136859
-1.2 0.19418605
-1.1 0.21785218
-1 0.24197072
-0.9 0.26608525
-0.8 0.28969155
-0.7 0.31225393
-0.6 0.3332246
-0.5 0.35206533
-0.4 0.36827014
-0.3 0.38138782
-0.2 0.39104269
-0.1 0.39695255
0 0.39894228
0.1 0.39695255
0.2 0.39104269
0.3 0.38138782
0.4 0.36827014
0.5 0.35206533
0.6 0.3332246
0.7 0.31225393
0.8 0.28969155
0.9 0.26608525
1 0.24197072
1.1 0.21785218
1.2 0.19418605
1.3 0.17136859
1.4 0.14972747
1.5 0.1295176
1.6 0.11092083
1.7 0.09404908
1.8 0.07895016
1.9 0.06561581
2 0.05399097
2.1 0.0439836
2.2 0.03547459
2.3 0.02832704
2.4 0.02239453
2.5 0.0175283
2.6 0.01358297
2.7 0.01042093
2.8 0.00791545
2.9 0.00595253
3 0.00443185
3.1 0.00326682
3.2 0.00238409
3.3 0.00172257
3.4 0.00123222
3.5 0.00087268
3.6 0.0006119
3.7 0.00042478
3.8 0.00029195
3.9 0.00019866
4 0.00013383
4.1 0.00008926
4.2 0.00005894
4.3 0.00003854
4.4 0.00002494
4.5 0.00001598
4.6 0.00001014
4.7 0.00000637
4.8 0.00000396
4.9 0.00000244
5 0.00000149

這個計算器能做什麼

常態分布圖計算器會替常態(高斯)分布建立一張 (x, 數值) 對照表。你可以從三種函數中選擇要製表的對象:機率密度 \(f(x)\)、下側累積機率 \(P(x)\)(也就是累積分布函數 CDF),或上側累積機率 \(Q(x)\)(即生存函數)。整段 x 值序列由起始值、間距(增量)以及要產生的點數來決定。當平均數 \(\mu = 0\)、標準差 \(\sigma = 1\) 時,得到的就是標準常態分布。

Two bell curves showing left-shaded lower cumulative area P(x) and right-shaded upper cumulative area Q(x)
Lower cumulative P(x) is the shaded area to the left of x; upper cumulative Q(x) is the area to the right.

使用方式

先選定一個函數,接著輸入平均數 \(\mu\) 與標準差 \(\sigma\)(\(\sigma\) 必須大於 0)。再設定 x 的起始值、相鄰 x 值之間的增量,以及重複次數(點數)。計算器會輸出一張表,其中第 i 列代表 \(x = \text{起始值} + i \cdot \text{間距}\),以及該 x 對應的函數值。預設值(\(\mu=0\)、\(\sigma=1\)、起始值 = -5、間距 = 0.1、101 個點)會讓 x 從 -5 掃描到 +5,並描繪出大家熟悉的鐘形曲線(f)或 S 形曲線(P)。

公式說明

機率密度為 $$f(x,\mu,\sigma) = \frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{1}{2}\left(\frac{x - \mu}{\sigma}\right)^{2}}$$ 累積機率則用到誤差函數:令 \(z = \frac{x - \mu}{\sigma\sqrt{2}}\),下側累積機率為 \(P = \frac{1}{2}(1 + \operatorname{erf} z)\),上側累積機率為 \(Q = 1 - P\)。由於 Java/Groovy 並沒有內建的 erf 函數,本工具改用 Abramowitz & Stegun 7.1.26 的多項式近似法,精度約可達 \(1.5\times10^{-7}\)。

Advertisement
Bell-shaped normal distribution curve with mean mu at center and standard deviation sigma marked
The normal probability density f(x) forms a symmetric bell curve centered on the mean μ with spread set by σ.

實際範例

標準常態分布(\(\mu=0\)、\(\sigma=1\))在 \(x = 1\) 時:$$f(1) = 0.3989423 \cdot e^{-0.5} = 0.241971$$ 至於 P,\(z = \frac{1}{\sqrt{2}} = 0.70711\),\(\operatorname{erf}(z) \approx 0.68269\),因此 \(P = \frac{1}{2}(1 + 0.68269) = 0.84134\)(也就是大家熟知的 \(\Phi(1) \approx 0.8413\))。接著 \(Q = 1 - 0.84134 = 0.15866\),且 \(P + Q = 1\)。✓

常見問題

為什麼 \(\sigma\) 必須是正數?標準差若為零或負值,在數學上沒有意義,而且會在公式中造成除以零的問題,所以本工具不接受這類輸入。

間距可以是負數嗎?可以。負的間距會讓 x 值往下遞減;若間距為零,整欄 x 會得到一連串相同的數值。

P 與 Q 的準確度如何?它們採用多項式 erf 近似法,最大誤差約為 \(1.5\times10^{-7}\),對於繪圖以及大多數統計工作而言已綽綽有餘。

最後更新: