- Step2. 中級編
- 1. 2×2のクロス集計表と様々な比率
1-2. 検査精度の信頼区間
2×2のクロス集計表から得られた値に対する信頼区間の求め方は、「母比率の信頼区間の求め方」で学んだ方法と同じです。母比率pの95%信頼区間は次の式から求められます。
![Rendered by QuickLaTeX.com \displaystyle \widehat{p}-1.96 \times \sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}} \leq p \leq \widehat{p} + 1.96 \times \sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}}](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-277ed9249a3911cd5b2b87a72e5617f3_l3.png)
この式を見ても分かる通り、サンプルサイズが多いほど95%信頼区間の幅は狭くなります。この式を使って、次のようなデータから「感度」と「特異度」の信頼区間を求めてみます。
罹患している | 罹患していない | |
---|---|---|
検査陽性(+) | 95 | 3 |
検査陰性(-) | 5 | 97 |
■感度:0.95
![Rendered by QuickLaTeX.com \displaystyle 0.95-1.96 \times \sqrt{\frac{0.95(1-0.95)}{100}} \leq sensitivity \leq 0.95 + 1.96 \times \sqrt{\frac{0.95(1-0.95)}{100}}](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-8750716a10530fc744f831010c72cf4d_l3.png)
![Rendered by QuickLaTeX.com \displaystyle 0.907 \leq sensitivity \leq 0.993](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-fec87b230151444c298f575ccf90a900_l3.png)
■特異度:0.97
![Rendered by QuickLaTeX.com \displaystyle 0.97-1.96 \times \sqrt{\frac{0.97(1-0.97)}{100}} \leq specificity \leq 0.97 + 1.96 \times \sqrt{\frac{0.97(1-0.97)}{100}}](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-9c5b7b1d0e652aee302455ef1c2e781e_l3.png)
![Rendered by QuickLaTeX.com \displaystyle 0.937 \leq specificity \leq 1.007](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-ec6ed44c2dfdba6770746d6db6f4fb7a_l3.png)
上の式は、「サンプルサイズがある程度大きい場合(目安はnp>5、およびn(1-p)>5と言われています)、二項分布は正規分布
に近似できるという定理(ラプラスの定理)」を利用しています。したがって、サンプルサイズが十分に大きくない場合や、標本比率(ここでは感度や特異度)が0や1に近い場合には次の式が用いられる場合があります。nはサンプルサイズ、xはあるイベントの発生回数を表します。
![Rendered by QuickLaTeX.com \displaystyle L \leq p \leq U](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-f5db77f23703d094ecfca694d7f5d5ae_l3.png)
ただし信頼区間の下限値は、次の式から
![Rendered by QuickLaTeX.com \displaystyle L = \frac{x}{x+(n-x+1)F_{1-\alpha/2}(2(n-x+1),2x)}](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-3c10b0f478596abd755d75c3a6aeb90e_l3.png)
信頼区間の上限値は次の式から求めます。
![Rendered by QuickLaTeX.com \displaystyle U = \frac{(x+1)F_{1-\alpha/2}(2(x+1),2(n-x))}{(n-x)+(x+1)F_{1-\alpha/2}(2(x+1),2(n-x))}](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-910eb0838afb54f43040bb011212ed38_l3.png)
この式は「ClopperとPearsonの正確信頼区間」と呼ばれ、F分布を使って信頼区間を算出します。この式を使って感度と特異度の95%信頼区間を算出すると、次のようになります。
■感度:0.95
n=100、x=95を代入
![Rendered by QuickLaTeX.com \displaystyle 0.887 \leq sensitivity \leq 0.984](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-51ea7b728df5b0098828d438deb17d0e_l3.png)
■特異度:0.97
n=100、x=97を代入
![Rendered by QuickLaTeX.com \displaystyle 0.915 \leq specificity \leq 0.994](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-7788f362ee54dcaab1bea292d68c1fb8_l3.png)
母比率の信頼区間を求める公式は上に挙げた2つ以外にもいくつかの手法があります。エクセル統計には合計5つの手法が搭載されています。
![](https://bellcurve.jp/statistics/wp-body/wp-content/uploads/2017/09/fig.1-1.png)
また、陽性尤度比と陰性尤度比の95%信頼区間は次の式から算出します。指数関数を使う点がポイントです。
罹患している | 罹患していない | 合計 | |
---|---|---|---|
検査陽性(+) | a | b | a+b |
検査陰性(-) | c | d | c+d |
合計 | a+c | b+d | a+b+c+d |
■陽性尤度比:{a/(a+c)}/{b/(b+d)}=感度/{1-特異度}=感度/偽陽性率
![Rendered by QuickLaTeX.com \displaystyle \exp \left[\ln\left(\frac{sensitivity}{1-specificity}\right)\pm 1.96 \sqrt{-\frac{1-sensitivity}{a}+\frac{specificity}{b}} \right]](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-e1d745d5a00403c3608138ddaff94444_l3.png)
■陰性尤度比:{c/(a+c)}/{d/(b+d)}={1-感度}/特異度=偽陰性率/特異度
![Rendered by QuickLaTeX.com \displaystyle \exp \left[\ln\left(\frac{1-sensitivity}{specificity}\right)\pm 1.96 \sqrt{\frac{sensitivity}{c}+\frac{1-specificity}{d}} \right]](https://bellcurve.jp/statistics/wp-body/wp-content/ql-cache/quicklatex.com-bf15bc6dcecd5a138c3c014db2860bdc_l3.png)