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