2009年9月30日 星期三

布瓦松分佈與區間估計 (Poisson Distribution and Estimation of Confidence Interval)

Poisson Distribution 可視為二項式分佈 (Binomial Distribution) 的極限情形。亦即,當試驗次數 (n) 趨近無窮大,p 很小,但一段時間裏面 np 為一不大不小的定值時。從品質管理的角度,如:每日不良產品的數目,不良事件的發生數目等等,每週醫療照顧相關感染的發生次數等等,皆適用於布瓦松分佈。[1]

依從 Poisson 分布的群體,最佳的點估計即為平均值 u。當我們只做了一個單次的觀察,可利用卡方分佈 (Chi square Distribution) 與 Poisson 分布的關係,很快的求出對應的 95% 信賴區間估計 (exact confidence interval)。[2-4]

令 x 為單次的觀察結果 (發生次數),InvChiSqare (v,y) 函數代表自由度 v 的 Chi Sqare 分布下面積為 y 的機率分布對應的 Chi Sqare 值。則依從 Poisson 分布的 95 % 信賴區間上下限 (exact confidence interval; UL; LL) 與卡方分布有如下的關係:

LL = 1/2 * InvChiSqare (2x, 0.025)
UL = 1/2 * InvChiSqare (2x + 2, 0.975)

當觀察次數不止一次時 (observations = N),所有的觀察次數合 (n) 依從 Poisson 分布。其 95% 信賴區間上下限可如此表示:[5]

LL = 1/2 * InvChiSqare (2n, 0.025) / N
UL = 1/2 * InvChiSqare (2n + 2, 0.975) / N

References:
  1. Poisson 分布. Available at: http://episte.math.ntu.edu.tw/articles/sm/sm_16_07_1/index.html [Accessed Sep 30, 2009]
  2. Confidence intervals for the mean of a Poisson distribution. Available at: http://www.math.mcmaster.ca/peter/s743/poissonalpha.html [Accessed Sep 30, 2009]
  3. Poisson confidence interval. Available at: http://www.statsdirect.com/help/parametric_methods/pest.htm [Accessed Sep 30, 2009]
  4. An exact method for calculating a confidence interval of a poisson parameter. Mulder et al. American Journal of Epidemiology 117 (3): 337. Available at: http://aje.oxfordjournals.org/cgi/pdf_extract/117/3/377 [Accessed Sept 30, 2009]
  5. Estimating the mean of a Poisson population. Chapter 6.3. Available at Google Books [Accessed Sep 30, 2009]

2009年1月5日 星期一

GDIPLUS.DLL dependency of AdvStringGrid

This is an excerpt from the website of TMS Component suite
---
Q22: Users of older operating systems have an error message on application startup related to a missing gdiplus.dll

A22: Either redistribute the Microsoft GDIPLUS.DLL (explained in README.TXT) or remove the gdiplus.dll dependency by commenting the line {$DEFINE TMSGDIPLUS} in TMSDEFS.INC

2008年12月29日 星期一

2008年12月6日 星期六

APACHE II Score and Predicted Mortality Rate

The following result was based on original APACHE II (Acute Physiology and Chronic Health Evaluation II) score, published by Knaus et al. in 1985.
----
score = predicted mortality reate
0 = 0.0288323804597415
1 = 0.0332141827839264
2 = 0.0382356916987282
3 = 0.0439818435946882
4 = 0.0505461568401609
5 = 0.0580307274067857
6 = 0.0665458910150112
7 = 0.0762094426987653
8 = 0.0871452904871902
9 = 0.0994814113171375
10 = 0.113346978732479
11 = 0.12886854890866
12 = 0.146165230272512
13 = 0.165342828461315
14 = 0.186487056810361
15 = 0.209656033245229
16 = 0.234872441095319
17 = 0.262115898694886
18 = 0.291316235325043
19 = 0.322348474912558
20 = 0.355030345948782
21 = 0.389123033352462
22 = 0.424335648915215
23 = 0.460333532118856
24 = 0.496750045768218
25 = 0.533201073292596
26 = 0.569301043624338
27 = 0.604679084771601
28 = 0.638993887971074
29 = 0.671946054939952
30 = 0.70328705911182
31 = 0.732824402144069
32 = 0.760423002108014
33 = 0.78600323342325
34 = 0.809536301764071
35 = 0.831037763630525
36 = 0.85056000246354
37 = 0.868184382009093
38 = 0.884013650945879
39 = 0.898165005907147
40 = 0.910764060077794
41 = 0.921939828549029
42 = 0.93182073729233
43 = 0.940531590674707
44 = 0.948191389177323
45 = 0.954911868587507
46 = 0.960796628155722
47 = 0.96594072236451
48 = 0.970430604427108
49 = 0.974344325979221
50 = 0.977751914291392
51 = 0.980715864241253
52 = 0.983291696442564
53 = 0.985528544995485
54 = 0.987469748266567
55 = 0.989153424071641
56 = 0.990613016854848
57 = 0.991877809199794
58 = 0.992973393538575
59 = 0.993922102483462
60 = 0.994743398004825
61 = 0.995454220894235
62 = 0.996069302727867
63 = 0.99660144299736
64 = 0.9970617542933
65 = 0.997459878479777
66 = 0.997804176739593
67 = 0.998101896237682
68 = 0.998359315973963
69 = 0.998581874196749
70 = 0.99877427953855
71 = 0.998940607827617